所以这就是事情。我的上网本中有两个分区(加上交换区):
/dev/sda4使用 Ubuntu 10.4
/dev/sda5和 Centos 5.5
我显然使用 Ubuntu。Centos 在那里是因为我需要在那个发行版上运行一些测试。问题是 Centos 使用 Grub,而 Ubuntu 使用 Grub2。
这是/boot/grub/menu.lst来自 Centos:
default=0
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
title CentOS (2.6.18-194.17.4.el5xen)
root (hd0,4)
kernel /boot/xen.gz-2.6.18-194.17.4.el5
module /boot/vmlinuz-2.6.18-194.17.4.el5xen ro root=LABEL=/1 rhgb quiet
module /boot/initrd-2.6.18-194.17.4.el5xen.img
title CentOS (2.6.18-194.el5xen)
root (hd0,4)
kernel /boot/xen.gz-2.6.18-194.el5
module /boot/vmlinuz-2.6.18-194.el5xen ro root=LABEL=/1 rhgb quiet
module /boot/initrd-2.6.18-194.el5xen.img
Run Code Online (Sandbox Code Playgroud)
在/boot/grub/grub.cfg从Ubuntu的:
menuentry "CentOS release 5.5 (Final) (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 66daaf1a-53b0-4e12-96f3-db01d52e12d1
linux /boot/vmlinuz-2.6.18-194.17.4.el5xen root=/dev/sda5
}
menuentry "CentOS release 5.5 (Final) (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 66daaf1a-53b0-4e12-96f3-db01d52e12d1
linux /boot/vmlinuz-2.6.18-194.el5xen root=/dev/sda5
}
Run Code Online (Sandbox Code Playgroud)
这是在 Ubuntu 下运行update-grub2和生成的grub-install。它不起作用。它给了我一些类似坏的幻数的东西。
如何将 grub1 条目转换为 grub2 形状?
好吧,因为我无法找到有关 Centos5.5 的 grub1 正确转换的具体信息,所以我就这么做了。
menuentry "CentOS release 5.5 (Final) (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 66daaf1a-53b0-4e12-96f3-db01d52e12d1
drivemap -s (hd0) ${root}
chainloader +1
}
Run Code Online (Sandbox Code Playgroud)
基本上我在 grub2 加载程序中链接加载了 grub1 加载程序。
| 归档时间: |
|
| 查看次数: |
4895 次 |
| 最近记录: |