he upgrade needs a total of 92.1 M free space on disk '/boot'. Please free at least an additional 27

网友投稿 897 2022-10-01

he upgrade needs a total of 92.1 M free space on disk '/boot'. Please free at least an additional 27

he upgrade needs a total of 92.1 M free space on disk '/boot'. Please free at least an additional 27

当我们在ubuntu运行的时候,我们会遇到/boot目录空间不足的情况,这个时候,我们需要对内核进行一下清理,错误信息为:

he upgrade needs a total of 92.1 M free space on disk '/boot'. Please free at least an additional 27 MB....

这时,我们可以运行下面的命令:

cd /boot/dpkg -l | grep linux-imageuname -a #查看你当前的内核版本sudo apt-get purge --remove linux-image-4.4.0-34-generic #换成你的一个不用的内核

就行了.

我的输出信息为:

eric@eric-Satellite-C850:~$ ls -s /boot/total 99010 1213 abi-4.4.0-34-generic 179 memtest86+.bin 1218 abi-4.4.0-87-generic 181 memtest86+.elf 186 config-4.4.0-34-generic 181 memtest86+_multiboot.bin 186 config-4.4.0-87-generic 3777 System.map-4.4.0-34-generic 1 grub 3794 System.map-4.4.0-87-generic36909 initrd.img-4.4.0-34-generic 6882 vmlinuz-4.4.0-34-generic37361 initrd.img-4.4.0-87-generic 6930 vmlinuz-4.4.0-87-generic 12 lost+founderic@eric-Satellite-C850:~$ uname -aLinux eric-Satellite-C850 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linuxeric@eric-Satellite-C850:~$ cd /boot/eric@eric-Satellite-C850:/boot$ lsabi-4.4.0-34-generic memtest86+.binabi-4.4.0-87-generic memtest86+.elfconfig-4.4.0-34-generic memtest86+_multiboot.binconfig-4.4.0-87-generic System.map-4.4.0-34-genericgrub System.map-4.4.0-87-genericinitrd.img-4.4.0-34-generic vmlinuz-4.4.0-34-genericinitrd.img-4.4.0-87-generic vmlinuz-4.4.0-87-genericlost+founderic@eric-Satellite-C850:/boot$ dpkg -l | grep linux-imageii linux-image-4.4.0-34-generic 4.4.0-34.53 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMPii linux-image-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMPii linux-image-extra-4.4.0-34-generic 4.4.0-34.53 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMPii linux-image-extra-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMPii linux-image-generic 4.4.0.87.93 amd64 Generic Linux kernel imageeric@eric-Satellite-C850:/boot$ uname -aLinux eric-Satellite-C850 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linuxeric@eric-Satellite-C850:/boot$ sudo apt-get purge --remove linux-image-4.4.0-34-generic [sudo] password for eric: Reading package lists... DoneBuilding dependency tree Reading state information... DoneThe following packages will be REMOVED: linux-image-4.4.0-34-generic* linux-image-extra-4.4.0-34-generic*0 upgraded, 0 newly installed, 2 to remove and 306 not upgraded.After this operation, 218 MB disk space will be freed.Do you want to continue? [Y/n] Y(Reading database ... 293915 files and directories currently installed.)Removing linux-image-extra-4.4.0-34-generic (4.4.0-34.53) ...run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericupdate-initramfs: Generating /boot/initrd.img-4.4.0-34-genericrun-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericrun-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericrun-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericrun-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericGenerating grub configuration file ...Found linux image: /boot/vmlinuz-4.4.0-87-genericFound initrd image: /boot/initrd.img-4.4.0-87-genericFound linux image: /boot/vmlinuz-4.4.0-34-genericFound initrd image: /boot/initrd.img-4.4.0-34-genericFound memtest86+ image: /memtest86+.elfFound memtest86+ image: /memtest86+.binFound Windows 10 (loader) on /dev/sda1Found Windows 10 (loader) on /dev/sdb1Found Ubuntu 14.04.1 LTS (14.04) on /dev/sdb7donePurging configuration files for linux-image-extra-4.4.0-34-generic (4.4.0-34.53) ...Removing linux-image-4.4.0-34-generic (4.4.0-34.53) ...Examining /etc/kernel/postrm.d .run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericupdate-initramfs: Deleting /boot/initrd.img-4.4.0-34-genericrun-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericGenerating grub configuration file ...Found linux image: /boot/vmlinuz-4.4.0-87-genericFound initrd image: /boot/initrd.img-4.4.0-87-genericFound memtest86+ image: /memtest86+.elfFound memtest86+ image: /memtest86+.binFound Windows 10 (loader) on /dev/sda1Found Windows 10 (loader) on /dev/sdb1Found Ubuntu 14.04.1 LTS (14.04) on /dev/sdb7doneThe link /vmlinuz.old is a damaged linkRemoving symbolic link vmlinuz.old you may need to re-run your boot loader[grub]The link /initrd.img.old is a damaged linkRemoving symbolic link initrd.img.old you may need to re-run your boot loader[grub]Purging configuration files for linux-image-4.4.0-34-generic (4.4.0-34.53) ...Examining /etc/kernel/postrm.d .run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericrun-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-genericeric@eric-Satellite-C850:/boot$ uname -aLinux eric-Satellite-C850 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linuxeric@eric-Satellite-C850:/boot$ dpkg -l | grep linux-imageii linux-image-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMPii linux-image-extra-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMPii linux-image-generic 4.4.0.87.93 amd64 Generic Linux kernel image

大功告成

参考文献

[1].Can't upgrade due to low disk space on /boot. /boot空间不足”解决方法.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:小程序接口是什么意思?(微信小程序api是什么意思)
下一篇:ValueError: Negative dimension size caused by subtracting 2 from 1 for 'MaxPool_1' (op: 'MaxPool') w
相关文章

 发表评论

暂时没有评论,来抢沙发吧~