ubuntu9.04多系统无法启动问题解决

来源:互联网 发布:动画制作简单软件 编辑:程序博客网 时间:2024/06/05 05:35

我换了大硬盘后,装了中文版XP,后直接用光盘安装了ubuntu9.04,使用都还挺好。今天又给机子装了日文版的XP,没想到装好后,发现启动时只能选择XP系统了,我亲爱的ubuntu不见了,所以开始在网上查找多系统启动问题的解决方案。经过一个晚上的试验,终于解决了这个问题,现在三个系统都可以正常启动。好high啊。

 

其实我们需要解决这个问题只需要一张ubuntu9.04安装盘就可以了,很简单:
1、将ubuntu9.04安装盘放入光驱,重启机器,进入ubuntu9.04安装界面,选择第一项:不安装试用ubuntu linux。

 
2、系统不经安装直接加载完成后,会进入linux操作桌面。


3、打开一个终端,运行sudo grub命令,你会看到'grub>'这样的提示符。

 

4. 在提示符'grub>'后输入find /boot/grub/menu.lst(如果/boot是独立分区,则是:/grub/menu.lst),你会得到一个运行结果,
    比如我的机子上结果是(hd0,9) (这个命令其实就是找出/boot所在分区)

    这里花了我很多时间,因为我的boot是单独分区,很多网上资料都没说明boot单独区分的情况,所以总找不着。另外网上很多是用

    find /boot/grub/stage1 来查找boot所在分区,我的机子上就是找不着。所以用menu.lst。如果下次谁menu.lst找不着,那

    就找stage1试试。


5. 运行 grub>root (hd0,9) (这个位置要填上你机子上的运行结果)


6. 运行grub>setup (hd0) 出现几行提示文字,最后是“... succeeded” 修复成功!


7. 运行quit


8. 重启计算机,取出ubuntu9.04安装盘

 

注意:root、setup命令后都有空格,如果没有会出错误

-----------------------------------------------------------------------------------------

成功的例子:

 

ubuntu@ubuntu:~$ sudo grub


[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

 

grub> find /grub/menu.lst
(hd0,9)

 

grub> root (hd0,9)

 

grub> setup (hd0)


Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,7)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub>quit

 

-----------------------------------------------------------------------------------------

重启后就进入grub启动选项,里面有一个XP选项和Ubuntu的选项。

一开始还以为只能进入第一次装的中文版XP,后选择XP选项后,进入原来我们熟悉的

双XP系统的启动项,原来它重新启用XP下的boot.ini。再修改下XP下的boot.ini,

日文版的XP信息加个japanese,把默认启动项改为中文版的XP。

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)/WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)/WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(3)/WINDOWS="Microsoft Windows XP Professional_japanese" /noexecute=optin /fastdetect


这样我的三个系统就可以正常工作了。