grub 救援後 initramfs 提示“mount: can't read etc/fstab”

grub 救援後 initramfs 提示“mount: can't read etc/fstab”

我有一個 ubuntustudio 的可啟動 USB 金鑰,有兩個分割區:

  1. /dev/sdb1與Ubuntu
  2. 和一個 fat32 /dev/sdb2

然後我意識到 Windows 只讀取第一個分割區。所以我移動了分割區,現在 /dev/sdb2 上有 ubuntu,/dev/sdb1 上有 fat32。我/dev/sdb1透過命令使用 ubuntu建立了舊的映像dd,然後再次將其恢復到新的映像/dev/sdb2dd

很明顯,現在 USB 筆無法重新啟動並給我 grub 救援提示,我在驗證vmlinuzinitrd文件位於 (hd0,msdos2) 分區後:

grub rescue>  set root=(hd0,msdos2)/boot  
grub rescue>  insmod linux  
grub rescue>  linux (hd0,msdos2)/boot/vmlinuz-3.5.0-17-lowlatency  
grub rescue>  initrd (hd0,msdos2)/boot/initrd.img-3.5.0-17-lowlatency  
grub rescue>  boot

當我啟動時,我進入 initramfs 提示符號。我認為這是因為/dev/sdb2沒有安裝。因為在啟動命令之後我得到:

mount:can't read 'etc/fstab': No such file or directory  
Begin: Running /scripts/init-bottom ... mounting /dev on /root/dev failed: No such file or directory 

但是我要如何從 grub 救援提示中告訴 grub 哪個是新分區?

答案1

dev/sdb2(你的 ubuntu 分割區)上你需要編輯和更新/etc/fstab

您可以透過在 Ubuntu 下安裝分割區並使用 gedit 來完成此操作。

更新根分割區以指向新分割區。

然後您需要更新 grub。

相關內容