红联Linux门户
Linux帮助

grub与grub2配置文件对比

发布时间:2007-10-19 00:30:18来源:红联作者:lication
#menu.lst

#设置菜单自动启动的延时时间

timeout 14
#改变菜单颜色

#设置图形背景文件后无效

color green/black light-gray/blue
#设置默认启动的菜单项

default 0
#设置启动某菜单项失败后返回的菜单项

fallback 1
#隐藏菜单界面

hiddenmenu
# 设置图形背景文件

splashimage /mi.xpm.gz
设置中文支持的字体文件
fontfile /fonts

title Windows NT/2K/XP
fallback 1
find --set-root /ntldr
chainloader /ntldr

title commandline
commandline

title floppy (fd0)
chainloader (fd0)+1
rootnoverify (fd0)

title reboot
reboot

title halt
halt

title winpe
fallback 1
find --set-root /PELDR
chainloader /PELDR

title Linux
root (hd0,2)
kernel /boot/vmlinuz ro root=/dev/hda3 vga=791 splash=silent
initrd /boot/initrd

title dos
root (hd0,0)
#使用 memdisk 有很多好处. 首先它不需要磁盘镜像文件的连续存放,支持网络上,

#光盘上的磁盘镜像文件, 而且此文件可以使用 zip 压缩格式.

#下载地址 http://sysoft.zdwx.com/grub/grubin/boot_fdr.zip

kernel /boot/grub/memdisk.gz
initrd /boot/grub/xusboot.img

# grub2

title g2ub
#下载地址 http://grub4dos.sourceforge.net/grub2/

kernel (hd0,0)/core.img

===========

#grub.cfg
set timeout=10
set default=0
insmod vbe
insmod chain
font /unifont.pff
insmod gfxterm
terminal gfxterm
menuentry "Boot Windows NT/2K/XP" {
search --set /ntldr
chainloader +1
}
menuentry "Boot linux" {
set root=(hd0,3)
linux /boot/vmlinuz ro root=/dev/hda3 vga=791 splash=silent
initrd /boot/initrd
}
文章评论

共有 0 条评论