我的/boot已满,无法进行更新,因此我尝试删除不必要的文件,但我可能删除了一些不应该删除的东西。我不知道grub或grub2是否可以工作,也不知道能否仍然启动Windows。然而,我还没有关机,所以希望现在可以修复所有问题。我应该怎么办?
我使用了以下命令:
for akernel in $(dpkg -l 'linux-' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.)-([^0-9]+)/\1/")"'/d;s/^[^ ]* [^ ]* ([^ ])./\1/;/[0-9]/!d'); do sudo apt-get purge $akernel; done
uname -r
ls -lhA /boot3.13.0-66-generic
总共29M -rw-r--r-- 1 root root 1.2M Oct 7 12:34 abi-3.13.0-66-generic -rw-r--r-- 1 root root 162K Oct 7 12:34 config-3.13.0-66-generic drwxr-xr-x 5 root root 1.0K Dec 17 21:41 grub -rw-r--r-- 1 root root 19M Oct 30 18:15 initrd.img-3.13.0-66-generic drwx------ 2 root root 12K Feb 7 2015 lost+found -rw-r--r-- 1 root root 173K Mar 12 2014 memtest86+.bin -rw-r--r-- 1 root root 174K Mar 12 2014 memtest86+.elf -rw-r--r-- 1 root root 175K Mar 12 2014 memtest86+_multiboot.bin -rw------- 1 root root 3.3M Oct 7 12:34 System.map-3.13.0-66-generic -rw------- 1 root root 5.6M Oct 7 12:34 vmlinuz-3.13.0-66-generic
du -h /boot
du: 无法读取目录‘/boot/lost+found’:权限被拒绝
12K /boot/lost+found
2.1M /boot/grub/i386-pc
9.0K /boot/grub/locale
2.3M /boot/grub/fonts
6.7M /boot/grub 36M /boot
df -h /boot
文件系统 大小 已用 可用 使用% 挂载点
/dev/sda3 361M 180M 159M 54% /boot
apt-get
获取。你的版本是多少? - Sergiy Kolodyazhnyy14.04
是可靠的,所以只需运行sudo apt-get install --reinstall linux-image-generic-lts-trusty
。 - Sergiy Kolodyazhnyy