如何用U盤啟動盤來修復(fù)Ubuntu系統(tǒng)?
Ubuntu系統(tǒng)如何使用U盤啟動盤修復(fù)更新后無法啟動系統(tǒng)的問題?下文給出了詳細(xì)的描述。
最近,相信很多使用wubi在Windows下安裝Ubuntu的系統(tǒng)更新后無法再進(jìn)入系統(tǒng)的問題,讓人不寒而慄,有很多人為此不得不重裝系統(tǒng)。
出現(xiàn)此問題的原因在于更新Ubuntu時選擇更新grub組件,以至于把引導(dǎo)區(qū)grub破壞,這也是個不小的bug吧???
下面說說如何通過U盤啟動盤來修復(fù)Ubuntu。
當(dāng)然,你得有個1G以上的U盤,再有,你的主板必須支持U盤啟動!
首先,當(dāng)然是準(zhǔn)備一個1G以上容量的U盤,用來制作可啟動U盤;
其次,到官網(wǎng)上下載Ubuntudesktop鏡像文件。UbuntuDesktop鏡像一般700多兆,從而可以把它寫到1G大的U盤上,可以從Ubuntu官網(wǎng)下載10.4的鏡像文件。
用UltraISO將其寫入U盤,制作成可啟動的U盤。自作完成后重啟電腦,選擇從U盤啟動。
由于你寫入U盤的實(shí)際上是個像光盤一樣的Ubuntu安裝盤,所以進(jìn)入U盤Ubuntu后,你可以選擇不安裝而直接試用體驗(yàn)Ubuntu,這也是本方法的關(guān)鍵所在,利用LiveCD,我們可以暫時進(jìn)入系統(tǒng),借以修復(fù)原有系統(tǒng)!
進(jìn)入Ubuntu系統(tǒng)后,啟動命令終端,輸入如下指令,在線安裝lilo和mbr:
- Ubuntu@ubuntu:~$sudoapt-getinstalllilo
- Readingpackagelists...Done
- Buildingdependencytree
- Readingstateinformation...Done
- Thefollowingextrapackageswillbeinstalled:
- mbr
- Suggestedpackages:
- lilo-doc
- ThefollowingNEWpackageswillbeinstalled:
- lilombr
- 0upgraded,2newlyinstalled,0toremoveand408notupgraded.
- Needtoget413kBofarchives.
- Afterthisoperation,1,315kBofadditionaldiskspacewillbeused.
- Doyouwanttocontinue[Y/n]?y
- Get:1http://mirror.bjtu.edu.cn/Ubuntu/lucid/mainmbr1.1.10-2[23.0kB]
- Get:2http://mirror.bjtu.edu.cn/Ubuntu/lucid/mainlilo1:22.8-8ubuntu1[390kB]
- Fetched413kBin3s(124kB/s)
- Preconfiguringpackages...
- Selectingpreviouslydeselectedpackagembr.
- (Readingdatabase...129801filesanddirectoriescurrentlyinstalled.)
- Unpackingmbr(from.../archives/mbr_1.1.10-2_i386.deb)...
- Selectingpreviouslydeselectedpackagelilo.
- Unpackinglilo(from.../lilo_1%3a22.8-8Ubuntu1_i386.deb)...
- Processingtriggersforman-db...
- Settingupmbr(1.1.10-2)...
- Settinguplilo(1:22.8-8Ubuntu1)...
- WARNING:kernel&initrdnotfoundintherootdirectory(/vmlinuz&/initrd.img)
- WARNING:DoNOTrebootorLILOmayfailtobootifyourkernel+initrdislarge.
- WARNING:Pleaseread/usr/share/doc/lilo/README.Debian
- Ubuntu@ubuntu:~$
安裝過程中,會得到如下lilo的配置提示,按OK就行了:
- Packageconfiguration
- ┌───────────────────────────┤Configuringlilo├────────────────────────────┐
- ││
- │LILOconfiguration│
- ││
- │ItseemstobeyourfirstLILOinstallation.Itisabsolutelynecessary│
- │torunliloconfig(8)whenyoucompletethisprocessandexecute│
- │/sbin/liloafterthis.│
- ││
- │LILOwon'tworkifyoudon'tdothis.│
- ││
- ││
- ││
- └───────────────────────────────────────────────────────────────────────────┘
然后使用lilo修復(fù)系統(tǒng):
- Ubuntu@ubuntu:~$sudolilo-M/dev/sdambr
- Backupcopyof/dev/sdain/boot/boot.0800
- TheMasterBootRecordof/dev/sdahasbeenupdated.
- Ubuntu@ubuntu:~$
修復(fù)完成,重啟系統(tǒng):
- Ubuntu@ubuntu:~$sudo-s-H
- root@Ubuntu:/home/ubuntu#reboot
OK了,相信重啟后選擇進(jìn)入系統(tǒng)的畫面就出現(xiàn)了,是不是很簡單?
總結(jié):
希望本文介紹的使用U盤啟動盤來修復(fù)Ubuntu系統(tǒng)的方法能夠?qū)ψx者有所幫助,更多有關(guān)linux系統(tǒng)的知識還有待于讀者去探索和學(xué)習(xí)。
【編輯推薦】