可能已删除内核,但还没有关闭计算机
我/ boot已满,我无法更新,所以我试图摆脱不必要的文件,但我想我可能已经删除了一些我不应该拥有的东西。 我不知道grub或grub2是否有效,或者我是否还可以启动进入Windows。 但是,我还没有关闭我的电脑,所以我希望我现在能解决所有问题。 我能做什么?
我用这个命令:
对于akernel in $(dpkg -l’linux- ‘| sed’/ ^ ii /!d; /’“$(uname -r | sed”s /(。 ) – ([^ 0-9] +)/ \ 1 /“)”’/ d; s / ^ [^] * [^] *([^] ) 。/ \ 1 /; / [0-9] /!d’); 做sudo apt-get purge $ akernel; DONE
uname -r
3.13.0-66generics
ls -lhA / boot
总计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 12月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 2015年2月7日丢失+发现
-rw-r – r– 1 root root 173K 2014年3月12日memtest86 + .bin
-rw-r – r– 1 root root 174K 2014年3月12日memtest86 + .elf
-rw-r – r– 1 root root 175K 2014年3月12日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
打开终端并输入:
sudo apt-get install --reinstall linux-image-generic sudo grub-install / dev / sd X. sudo update-grub
……在哪里
/ dev / sd X.
替换安装GRUB引导加载程序的驱动器。 通常,用户不应包含分区号,这会产生错误消息,因为命令会尝试将信息写入分区。 您可以使用磁盘应用程序找到此驱动器的设备名称。 在磁盘中检查两次以确保键入安装了GRUB引导加载程序的驱动器的正确设备名称。
由于在执行sudo grub-install
命令时没有完成,因此在sudo grub-install
后运行sudo update-grub
将确保GRUB菜单是最新的。