2010年2月19日星期五

升级ubuntu 9.10内核后无法进入系统的解决方法(Wubi安装)

今天早上开始摆弄起自己用wubi安装的linux ubuntu 9.10系统,在查找更新中看到内核升级到2.31-17了,我就选择更新,但在更新过程终有一个任务一直没有完成更新,我就直接按“Ctrl+C”给取消了,当我在重启系统时就遇到GRUB黑屏问题了。


屏幕上显示:

GNU GRUB version 1.97~bea4

[minimal BASH-like lin editing is supported For the first word,TAB licts possible command completions Anywhere elso TAB lists possible device/file completions]

sh:grub> (光标,让你输入东西)

按下TAB后

Possible commands are:

[badram boot cat chainloader configfile cupid dump echo exit export halt help initrd insmod linux list_env load _env loopback Is Ismod parser.rescue parser.sh reader.normal reader.resue reboot rmmod root save_env search ser sleep source terminal_input.console terminal_output.console test unset]

sh:grub> (光标,让你输入东西)



经过我在网上不懈的搜索查找,以下为解决办法:





代码:

grub>ls

grub>ls (hd0,x)/ #找出WUBI安装的盘,里面有ubuntu/这个目录。

grub>insmod ntfs #加载ntfs模块,因为WUBI将ubuntu安装到了我分的ntfs盘上

grub>set root=(hd0,5) #这里(hd0,5)就是我找到的ubuntu安装的分区

grub>ls $Boot #找到我们BOOT分区的UUID,下一步要用到,我这里显示出来的是2250018e50016a3d

grub>search --no-floppy --fs-uuid --set 2250018e50016a3d #这里的UUID就是上一定找出来的那个

grub>loopback loop0 /ubuntu/disks/root.disk #设loop0,WUBI装ubuntu安装成了一个root.disk文件

grub>set root=(loop0) #重设root

grub>linux /boot/vmlinuzxxxxxxxxx (tab补全即可) root=/dev/sda5 loop=/ubuntu/disks/root.disk ro quiet splash #加载内核

grub>initrd /boot/initrd.imgxxxxxxxxxxxx(tab 补全即可) #不用说大家都知道

gurb>boot





ENTER就可以启动了。进入熟悉的系统,打开终端

代码:

#update-grub2

#reboot





这样grub就修复好了。不用再这样麻烦地整了。(在修复你自己grub的时候随机应变即可)

1 条评论:

匿名 说...

这个方法真不错啊,呵呵