当前位置: 技术问答>linux和unix
启动Linux 和 Win7的grub命令是什么?
来源: 互联网 发布时间:2016-12-04
本文导语: 启动Linux 和 Win7的grub命令是什么? | grub2 menuentry "Windows 7 (loader) (on /dev/sda2)" { insmod ntfs set root='(hd0,2)' search --no-floppy --fs-uuid --set E64699AF469980CB chainloader +1 } ...
启动Linux 和 Win7的grub命令是什么?
|
grub2
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set E64699AF469980CB
chainloader +1
}
menuentry 'Ubuntu,Linux 2.6.32-32-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 6c581437-2feb-4c28-a2e0-0b6d5b95d1dd
linux /boot/vmlinuz-2.6.32-32-generic root=UUID=6c581437-2feb-4c28-a2e0-0b6d5b95d1dd ro quiet splash
initrd /boot/initrd.img-2.6.32-32-generic
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set E64699AF469980CB
chainloader +1
}
menuentry 'Ubuntu,Linux 2.6.32-32-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 6c581437-2feb-4c28-a2e0-0b6d5b95d1dd
linux /boot/vmlinuz-2.6.32-32-generic root=UUID=6c581437-2feb-4c28-a2e0-0b6d5b95d1dd ro quiet splash
initrd /boot/initrd.img-2.6.32-32-generic
}
|
grub
title Ux86 2011-06-01 (Debug mode)
kernel /boot/kernel vga=788 modeset=0 acpi_sleep=s3_mode verbose DEBUG=1
initrd /boot/initrd.img
title Windows
rootnoverify (hd0,1)
chainloader +1
title Ux86 2011-06-01 (Debug mode)
kernel /boot/kernel vga=788 modeset=0 acpi_sleep=s3_mode verbose DEBUG=1
initrd /boot/initrd.img
title Windows
rootnoverify (hd0,1)
chainloader +1
|
win7的加载方法 chainloader +1,就是加载分区引导记录
链式加载可以加载一类的操作系统如FreeBSD系统,主分区PMR上也存在着引导程序
链式加载可以加载一类的操作系统如FreeBSD系统,主分区PMR上也存在着引导程序
|
启动Windows (位于C盘,grub版本1,第二版不知道)
grub>root (hd0,0)
grub>chainloader +1
grub>boot
grub>root (hd0,0)
grub>chainloader +1
grub>boot