溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Ubuntu Grub Rescue修復(fù)方法有哪些

發(fā)布時(shí)間:2021-12-19 10:34:56 來(lái)源:億速云 閱讀:857 作者:小新 欄目:系統(tǒng)運(yùn)維

這篇文章主要介紹了Ubuntu Grub Rescue修復(fù)方法有哪些,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

重啟電腦直接進(jìn)入grub rescue模式重啟后的顯示是

GRUB loading
error: no such partition
grub rescue>
連XP都進(jìn)不了了,知道怎么辦嗎!
grub2修復(fù)方法:
1.Ubuntu Grub Rescue 雙系統(tǒng)重裝windows造成grub2被改寫的修復(fù)
方法一 grub4dos0.4.4
在Windows啟動(dòng)項(xiàng)上加上grub4dos啟動(dòng)(不多說(shuō)了,看置頂貼),重啟選擇進(jìn)入grub,在命令行下輸入(/boot單獨(dú)分區(qū)的去掉 /boot)
代碼:
grub>find --set-root /boot/grub/core.img
grub>kernel /boot/grub/core.img
grub>boot
進(jìn)入grub2菜單,進(jìn)入系統(tǒng)后再執(zhí)行
代碼:
sudo grub-install /dev/sd?
Ubuntu Grub Rescue方法二 進(jìn)入Livecd 后修復(fù)
引用:
sudo -i
mount 你的根分區(qū) /mnt
mount 你的/boot 分區(qū) /mnt/boot #如果有的話
#掛載你其他的分區(qū),如果有的話
# 重建grub到sda的mbr
grub-install --root-directory=/mnt /dev/sda
2. Ubuntu Grub Rescue由于root分區(qū)uuid改變?cè)斐傻牟荒苷?dòng),只能進(jìn)入grub rescue模式的修復(fù)
代碼:

grub rescue>set  
grub rescue>prefix=(hd?,?)/grub  
grub rescue>root=hd?,?  
grub rescue>set root=hd?,?  
grub rescue>set prefix=(hd?,?)/boot/grub  
grub rescue>set  grub rescue>root=hd?,?  
grub rescue>prefix=(hd?,?)/boot/grub  
grub rescue>insmod /boot/grub/normal.mod  
grub rescue>normal

這時(shí)就可以調(diào)出 /boot/grub/grub.cfg,修改相應(yīng)uuid,
改到命令行下

grub>insmod /boot/grub/linux.mod  
grub>set root=hd?,?  
grub>linux /boot/vmlinuz-*** root=/dev/sd??  
grub>initrd /boot/initrg.img-****

進(jìn)入系統(tǒng)
hd?,? 是grub文件所在分區(qū) sda? 是/分區(qū)。
3. grub模塊和配置文件grub.cfg受損無(wú)法啟動(dòng)時(shí)修復(fù)
Livcd啟動(dòng)進(jìn)入試用
引用:
sudo -i
mount 你的根分區(qū) /mnt
mount 你的/boot 分區(qū) /mnt/boot #如果有的話
# 掛載你其他的分區(qū),如果有的話
# 重建grub到sda的mbr
grub-install --root-directory=/mnt /dev/sda
# 重建grub.cfg

mount --bind /proc /mnt/proc  
mount --bind /dev /mnt/dev  
mount --bind /sys /mnt/sys  
chroot /mnt update-grub  
umount /mnt/sys  
umount /mnt/dev  
umount /mnt/proc

感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“Ubuntu Grub Rescue修復(fù)方法有哪些”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持億速云,關(guān)注億速云行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來(lái)學(xué)習(xí)!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI