|
我在virtualbox里面用lenny的网络安装盘安装的最小系统,安装完成进入系统后设定源为testing,然后update,upgrade,重启后grub提示syntax error,然后进入grub提供的shell,无法显示grub界面,更无法启动系统。
我装的是grub2,grub.cfg文件内容:
----------------------------------
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set pre_saved_entry=
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
set timeout=5
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
menuentry "Debian GNU/Linux, with Linux 2.6.32-3-686" --class debian --class gnu-linux --calss gnu --class os {
insmod xfs
set root='(hd0,1)'
search --nofloppy --fs-uuid --set 4c44d8c7-7c65-406f-8ca5-f0b9565d8a92
echo Loading Linux 2.6.32-3-686 ...
linux /boot/vmlinuz-2.6.32-3-686 root=UUID=4c44d8c7-7c65-406f-8ca5-f0b9565d8a92 ro
echo Loading initial ramdisk ...
initrd /boot/initrd.img-2.6.32-3-686
}
menuentry .........
--------------------------------------------
我从网上搜索了一下,用下面的方法可以启动:
grub>set root='(hd0,1)'
grub>linux /boot/vmlinuz-2.6.32-3-686 root=/dev/hda1 ro
grub>initrd /boot/initrd.img-2.6.32-3-686
grub>boot
这样就可以正常启动了。不过如果把/dev/hda1改成UUID=xxxxx之后,由于UUID比较长,超过的部分会使grub失去响应,如果用\换行后会无法正常启动,提示找不到根文件系统。
现在虽然能进入系统,不过这也不是一个办法啊。 |
|