Ubuntu 修復(fù)Grub問題解決
請幾天破壞了GRUB,用LIVECD修復(fù),用LIVECD進入圖形界面,打開終端輸入一下命令:
$sudosu
$grub
grub>boot(hd0,6)/*原本我內(nèi)核裝載(hd0,7),不知道怎么內(nèi)核所在扇區(qū)變了*/
grub>setup(hd0)
重啟電腦,發(fā)現(xiàn)grub不能請到到linux里面去
按照GRUB下方的提示,按E鍵編輯甘選項
將(hd0,6)改為(hd0,7)
按B鍵啟動,可以進入linux
進入后在/boot/grub/menu.list文件里面將相關(guān)的啟動項修改
以后沒有啟動電腦就不用在修改GRUB的啟動選項了。ubuntu下修復(fù)grub
1.用LiveCD啟動
2.打開一個終端,運行$sudogrub命令(這里可能需要等一會兒),你會看到'grub>'這樣的提示符grubupdate
3.在提示符'grub>'后輸入find/boot/grub/stage1,你會得到一個運行結(jié)果,比如我的機子上結(jié)果是(hd0,3)(這個命令其實就是找出/boot所在分區(qū))
4.運行g(shù)rub>root(hd0,3)(這個位置要填上你機子上的運行結(jié)果)
5.運行g(shù)rub>setup(hd0)出現(xiàn)幾行提示文字,***是“...succeeded”修復(fù)成功!
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非常優(yōu)秀的系統(tǒng)引導(dǎo)器
- Ubuntu GRUB開機選項修改
- Ubuntu grub利用安裝光盤硬盤安裝ISO文件
- Linux rescuev修復(fù)模式跨越控制臺登錄
- Linux rescue單用戶模式修復(fù)模式