分类: LINUX
2017-04-09 04:50:47
#grub2启动Linux 2.6 menuentry "Linux 2.6.31-10-generic" { set quiet=1 insmod ext2 set root=(hd0,8) search --no-floppy --fs-uuid --set 2d61e5f9-1d2a-4167-a6f1-b991ba00878b #这句与set root=(hd0,8)效果一样,可删除其一,二者不一致以这句为准 linux /boot/vmlinuz-2.6.31-10-generic root=UUID=2d61e5f9-1d2a-4167-a6f1-b991ba00878b ro quiet splash #不喜欢看到一长串的, roo=UUID=***可用root=/dev/sda8(/分区的分区号)代替 initrd /boot/initrd.img-2.6.31-10-generic } #grub2启动Arch Linux menuentry 'Arch Linux' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' echo '载入 Linux linux ...' linux /vmlinuz-linux root=/dev/sda3 init=/usr/lib/systemd/systemd rw quiet echo '载入初始化内存盘...' initrd /initramfs-linux.img } #grub2启动Windows XP menuentry "Windows XP" { set root=(hd1,1) #这行不用应该也行 drivemap -s (hd0) ${root} chainloader +1 } menuentry "Windows XP" { insmod ntfs search --set=root --label WINDOWS_XP --hint hd0,msdos1 ntldr /ntldr } #grub2启动软盘镜像 menuentry "Boot from DOS IMG" { linux16 /memdisk initrd16 /win98.img } #grub2启动光盘镜像 menuentry 'Boot Windows 8 PE ISO'{ set root='(hd0,msdos1)' echo 'Loading Memdisk...' insmod memdisk linux16 /boot/memdisk iso raw echo 'Loading ISO...' initrd16 /boot/Win8PE.iso }
# Config file for GRUB - The GNU GRand Unified Bootloader # /boot/grub/grub.cfg # DEVICE NAME CONVERSIONS # # Linux Grub # ------------------------- # /dev/fd0 (fd0) # /dev/sda (hd0) # /dev/sdb2 (hd1,2) # /dev/sda3 (hd0,3) # # Timeout for menu set timeout=5 # Set default boot entry as Entry 0 set default=0 # (0) Arch Linux menuentry "Arch Linux" { set root=(hd0,1) linux /vmlinuz-linux root=/dev/sda3 ro initrd /initramfs-linux.img } ## (1) Windows #menuentry "Windows" { # set root=(hd0,3) # chainloader +1 #}
title linux root (hd0,0) kernel /vmlinuz-linux_oldver root=/dev/sda3 init=/usr/lib/systemd/systemd rw quiet initrd /initrd_oldver.img
menuentry 'linux' { set root='hd0,msdos1' linux /vmlinuz-linux_oldver root=/dev/sda3 init=/usr/lib/systemd/systemd rw quiet initrd /initrd_oldver.img }