歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 如何使用Ubuntu U盤啟動盤修復更新後無法啟動系統的問題

如何使用Ubuntu U盤啟動盤修復更新後無法啟動系統的問題

日期:2017/2/28 16:23:04   编辑:Linux教程

最近,相信很多使用wubi在Windows下安裝Ubuntu的系統更新後無法再進入系統的問題,讓人不寒而慄,有很多人為此不得不重裝系統。

出現此問題的原因在於更新Ubuntu時選擇更新grub組件,以至於把引導區grub破壞,這也是個不小的bug吧???

下面說說如何通過U盤啟動盤來修復Ubuntu。當然,你得有個1G以上的U盤,再有,你的主板必須支持U盤啟動!

首先,當然是准備一個1G以上容量的U盤,用來制作可啟動U盤;

其次,到官網上下載Ubuntu desktop鏡像文件。Ubuntu Desktop鏡像一般700多兆,從而可以把它寫到1G大的U盤上,可以從Ubuntu官網下載10.4的鏡像文件。

用UltraISO將其寫入U盤,制作成可啟動的U盤。自作完成後重啟電腦,選擇從U盤啟動。

由於你寫入U盤的實際上是個像光盤一樣的Ubuntu安裝盤,所以進入U盤Ubuntu後,你可以選擇不安裝而直接試用體驗Ubuntu,這也是本方法的關鍵所在,利用LiveCD,我們可以暫時進入系統,借以修復原有系統!

進入Ubuntu系統後,啟動命令終端,輸入如下指令,在線安裝lilo和mbr:

ubuntu@ubuntu:~$ sudo apt-get install lilo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mbr
Suggested packages:
lilo-doc
The following NEW packages will be installed:
lilo mbr
0 upgraded, 2 newly installed, 0 to remove and 408 not upgraded.
Need to get 413kB of archives.
After this operation, 1,315kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirror.bjtu.edu.cn/ubuntu/ lucid/main mbr 1.1.10-2 [23.0kB]
Get:2 http://mirror.bjtu.edu.cn/ubuntu/ lucid/main lilo 1:22.8-8ubuntu1 [390kB]
Fetched 413kB in 3s (124kB/s)
Preconfiguring packages ...
Selecting previously deselected package mbr.
(Reading database ... 129801 files and directories currently installed.)
Unpacking mbr (from .../archives/mbr_1.1.10-2_i386.deb) ...
Selecting previously deselected package lilo.
Unpacking lilo (from .../lilo_1%3a22.8-8ubuntu1_i386.deb) ...
Processing triggers for man-db ...
Setting up mbr (1.1.10-2) ...
Setting up lilo (1:22.8-8ubuntu1) ...

WARNING: kernel & initrd not found in the root directory (/vmlinuz & /initrd.img)
WARNING: Do NOT reboot or LILO may fail to boot if your kernel+initrd is large.
WARNING: Please read /usr/share/doc/lilo/README.Debian

ubuntu@ubuntu:~$

安裝過程中,會得到如下lilo的配置提示,按OK就行了:

Package configuration
┌───────────────────────────┤ Configuring lilo ├────────────────────────────┐
│ │
│ LILO configuration │
│ │
│ It seems to be your first LILO installation. It is absolutely necessary │
│ to run liloconfig(8) when you complete this process and execute │
│ /sbin/lilo after this. │
│ │
│ LILO won't work if you don't do this. │
│ │
│ <Ok> │
│ │
└───────────────────────────────────────────────────────────────────────────┘

然後使用lilo修復系統:

ubuntu@ubuntu:~$ sudo lilo -M /dev/sda mbr
Backup copy of /dev/sda in /boot/boot.0800
The Master Boot Record of /dev/sda has been updated.
ubuntu@ubuntu:~$

修復完成,重啟系統:

ubuntu@ubuntu:~$ sudo -s -H
root@ubuntu:/home/ubuntu# reboot

OK了,相信重啟後選擇進入系統的畫面就出現了,是不是很簡單?

Copyright © Linux教程網 All Rights Reserved