那些年解决的Ubuntu系统故障
作者:网络转载 发布时间:[ 2013/3/11 13:29:24 ] 推荐标签:
找出ID为83的一行(对应的表中是Linux系统的分区),记下ubuntu系统所在分区(我的为/dev/sda5).
注:我是使用U盘系统做的以上步骤,所以会多出下面这行:
/dev/sdb4 * 63 3907583 1953760+ 6 FAT16
4、输入mkdir /media/temp 。创建文件夹temp,用来挂载/sda5。
5、输入mount /dev/sda5 /media/temp 。挂载/sda5。
6、在终端中输入命令:grub-install --root-directory=/media/temp /dev/sda。重新安装grub2到硬盘的主引导记录MBR中,显示“Installation finished.No Error Reported.”表示操作成功。
7、重启电脑,此时可以进入grub2引导界面了(注意,此时不能引导Windows 7),选择进入ubuntu系统,进入终端,输入命令:sudo update-grub2
long@long-Ubuntu:~$ sudo update-grub2
[sudo] password for long:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.7.1
Found initrd image: /boot/initrd.img-3.7.1
Found linux image: /boot/vmlinuz-3.7.1.old
Found initrd image: /boot/initrd.img-3.7.1
Found linux image: /boot/vmlinuz-3.5.0-22-generic
Found initrd image: /boot/initrd.img-3.5.0-22-generic
Found linux image: /boot/vmlinuz-3.5.0-21-generic
Found initrd image: /boot/initrd.img-3.5.0-21-generic
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
long@long-Ubuntu:~$
重启即可看到神效……双系统拯救完成

sales@spasvo.com