產生grub.cfg時出現問題

產生grub.cfg時出現問題

當我update-grub在終端運行時,它給了我這條訊息:

root@ThinkPad-W520:/dev# sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.5.0-25-generic
Found initrd image: /boot/initrd.img-3.5.0-25-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
grep: /proc/mounts: No such file or directory
grep: /proc/swaps: No such file or directory
Found Ubuntu 12.04.2 LTS (12.04) on /dev/sda1
Found Windows 8 (loader) on /dev/sda3
done

你知道為什麼會發生這種情況嗎grep

這也是給出的輸出fdisk -l

 Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   671326207   335662080   83  Linux
/dev/sda2       671328254   703326207    15998977    5  Extended
/dev/sda3   *   703326208   704043007      358400    7  HPFS/NTFS/exFAT
/dev/sda4       704043008   937699327   116828160    7  HPFS/NTFS/exFAT
/dev/sda5       671328256   703326207    15998976   82  Linux swap / Solaris

答案1

首先,似乎沒有問題,因為命令完成時沒有錯誤。然而,你應該有/proc/mounts/proc/swaps。也許您的 /proc 沒有安裝或卸載。

檢查您的 /etc/fstab 中是否有一行proc /proc proc nodev,noexec,nosuid 0 0。然後嘗試sudo mount /proc查看文件是否恢復。

相關內容