Ubuntu 修復Grub問題解決
請幾天破壞了GRUB,用LIVECD修復,用LIVECD進入圖形界面,打開終端輸入一下命令:
$sudosu
$grub
grub>boot(hd0,6)/*原本我內核裝載(hd0,7),不知道怎么內核所在扇區變了*/
grub>setup(hd0)
重啟電腦,發現grub不能請到到linux里面去
按照GRUB下方的提示,按E鍵編輯甘選項
將(hd0,6)改為(hd0,7)
按B鍵啟動,可以進入linux
進入后在/boot/grub/menu.list文件里面將相關的啟動項修改
以后沒有啟動電腦就不用在修改GRUB的啟動選項了。ubuntu下修復grub
1.用LiveCD啟動
2.打開一個終端,運行$sudogrub命令(這里可能需要等一會兒),你會看到'grub>'這樣的提示符grubupdate
3.在提示符'grub>'后輸入find/boot/grub/stage1,你會得到一個運行結果,比如我的機子上結果是(hd0,3)(這個命令其實就是找出/boot所在分區)
4.運行grub>root(hd0,3)(這個位置要填上你機子上的運行結果)
5.運行grub>setup(hd0)出現幾行提示文字,***是“...succeeded”修復成功!
6.運行quit
8.重啟計算機,取出liveCD
#menu.lst-See:grub(8),infogrub,update-grub(8)
#grub-install(8),grub-floppy(8),
#grub-md5-crypt,/usr/share/doc/grub
#and/usr/share/doc/grub-doc/.
##defaultnum
#SetthedefaultentrytotheentrynumberNUM.Numberingstartsfrom0,and
#theentrynumber0isthedefaultifthecommandisnotused.
#
#Youcanspecify'saved'insteadofanumber.Inthiscase,thedefaultentry
#istheentrysavedwiththecommand'savedefault'.
#WARNING:Ifyouareusingdmraiddonotuse'savedefault'oryour
#arraywilldesyncandwillnotletyoubootyoursystem.
default1
##timeoutsec
#Setatimeout,inSECseconds,beforeautomaticallybootingthedefaultentry
#(normallythefirstentrydefined).
timeout3
##hiddenmenu
#Hidesthemenubydefault(pressESCtoseethemenu)
#hiddenmenu
#Prettycolours
#colorcyan/bluewhite/blue
##password['--md5']passwd
#Ifusedinthefirstsectionofamenufile,disableallinteractiveediting
#control(menuentryeditorandcommand-line)andentriesprotectedbythe
#command'lock'
#e.g.passwordtopsecret
#password--md5$1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
#passwordtopsecret
【編輯推薦】
- Ubuntu GRUB非常優秀的系統引導器
- Ubuntu GRUB開機選項修改
- Ubuntu grub利用安裝光盤硬盤安裝ISO文件
- Linux rescuev修復模式跨越控制臺登錄
- Linux rescue單用戶模式修復模式