|
发表于 2008-12-8 11:12:37
|
显示全部楼层
楼上的我要跟你说一下情况
我编译lfs时是在ubuntu下
u盘被识别sdb1(10MB用来作启动的),sdb5(lfs系统)
所以安装grub时使用这个命令
grub>root (hd1,4)
grub> setup (hd1)/*(为什么呢,因为我要安装到那,而你在这里用hd0,就表示你把grub安装在hd0,你的menu.lst就不应该写成hd0了,相反应该写成hd1,如果你写成hd0,就必须把grub装在你移动硬盘上(运行grub>setup (hd1))。要理智的做事,你有qq没?我加你)*/
grub>quit
而$LFS/boot/menu.lst(也就是u盘的lfs系统的menu.lst)
写成hd0,而不是hd1,因为你是从u盘启动,要弄清楚两个不同的环境,以及两个不同的grub
如果你根本不想把grub弄在移动盘上,你就只编辑你现在的ubuntu系统里面的menu.lst,没必要执行官方步骤里的grub安装操作。。
你要作的,就是把lfs启动项加在ubuntu的/boot/grub/menu.lst下,并修改kernal及root为
root (hd1,1)
kernel /boot/lfskernel-2.6.27.4 root=/dev/sdb2), 使之指向你的移动硬盘上
本地盘为(hd0),移动盘为(hd1)
如果你想安装在移动盘上
按照你的情况我写下命令吧
在你宿主系统上(ubuntu)
执行:
grub>root (hd1,1)
grub>setup (hd1)
grub>quit
你说你现在看不到ubuntu了,那应该是你安装grub时出的问题,你可以启动livecd,把你的ubuntu分区挂上去,修改你的ubuntu启动的相关menu.lst
附上我的ubutnumenu.lst 可以作修复参考
:
/////////////////////////////////////////////////////////
title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=50ca1dcf-ccdc-49ca-8892-674f84e5c6f0 ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=50ca1dcf-ccdc-49ca-8892-674f84e5c6f0 ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,8)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
//////////////////////////////////////////////////////////
最后再跟你说一次,内核不能找到root fs 是因为磁盘慢(硬盘比移动盘快多了)
你在kernal那行必须加上这个“rw rootdelay=10“ (引号里面的) |
|