Debian Stable (Jessie 8.1) 的normal.mod not found

來源:互聯網
上載者:User

Debian Stable (Jessie 8.1) 的normal.mod not found

打算重設下default-brower, 輸入了dpkg-reconfigure 結果按了個g,又按了tab,最後還輸了斷行符號.就變成了

dpkg-reconfigure grub-pc

進入dpkg配置grub-pc的介面後, 裡面讓握輸入linux-command-line, 按了下Esc沒想到沒退出反而按到了` , 就是數字1上的那個符號. 接下來就進入了下一個選項. 這個只有個OK的可以移動到. 然後敲了下斷行符號. 就沒管它了. 沒想到重啟後. 就直接報錯了.
**
提示

error: file '/boot/grub/i386-pc/normal.mod' not foundgrub rescue>

絕大多數命令都不能獲得, 只有簡單的幾個ls,set可以

這是說normal模組找不到了. 我手裡也沒有liveCD的隨身碟.

下面是完整的恢複grub的流程, 僅供debian下的朋友參考:

grub rescue>ls(hd0, msdos), (hd0, msdos1), (hd0, msdos5)
  • 1

因為我的機器只有一個硬碟, 沒有分區, 所以msdos1是我的主目錄.

grub rescue>set root=(hd0,msdos1)grub rescue> ls /usr/lib/grub/i386-pc/normal.mod, xxx.mod search.mod ......grub rescue>set prefix=(hd0,msdos1)/usr/lib/grubgrub rescue>insmod normalgrub rescue>normal

這樣就載入上了normal.mod

但是這裡還沒完.
進入到了grub

grub>vmlinuz vmlinuz-linux-headers-3.16.0.4-xxxxgrub>initrd initrd-linux-headers-3.16.0.4-xxxxgrub>boot

這裡會卡一會兒然後進入到initramdisk
實際上這裡就是因為沒找到相關的其它mod,導致了錯誤.


重新強制關機, 重複上面的操作.
然後換了一個核心,報了如下錯誤

這就好辦了. 說明這些mod都不在/boot/grub/i386-pc下.
於是我們回到最開始載入normal.mod的時候, 把這些缺失的mod都載入一次

grub rescue>set prefix=(hd0,msdos1)/usr/lib/grubgrub rescue>insmod normalgrub rescue>insmod searchgrub rescue>insmod echogrub rescue>insmod linuxgrub rescue>insmod initrdgrub rescue>normal

這些就有了正常的大部分模組, 進入了一個不是完好的grub menu.list

然後隨便選一個就可以進tty了, 進了tty就好說多了.
直接修複一下grub就好.

root> fdisk -l這裡查看下你的硬碟, 我只有一塊, 分了幾個區. /dev/sda1, /dev/sda2, /dev/sda5, 說明掛載的是/dev/sdaroot> grub-install /dev/sdaroot> update-grubroot> shutdown -r now

重啟後. 就正常登入了. 

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.