Linux-Mint

引導部分儲存空間不足,我可以擺脫未使用的東西嗎?

  • October 25, 2016

我有一個分配給 /boot 的 512MiB 分區,但 LinuxMint 不斷在更新中添加很多東西,現在抱怨磁碟使用情況。

Adf -h寫道:

Filesystem      Size  Used Avail Use% Mounted on 
udev            7,8G  0  7,8G   0% /dev 
tmpfs           1,6G  9,5M  1,6G   1% /run 
/dev/sdb5 48G   13G   35G  27% / 
tmpfs           7,8G  326M  7,5G   5% /dev/shm 
tmpfs           5,0M  4,0K  5,0M   1% /run/lock     tmpfs           7,8G   0  7,8G   0% /sys/fs/cgroup 
/dev/sdb7       183G   59G  125G  33% /home 
/dev/sdb1       484M  473M   12M  98% /boot 
cgmfs           100K 0  100K   0% /run/cgmanager/fs 
tmpfs           1,6G   60K  1,6G   1% /run/user/1000 

如何清理未使用的核心並保持/boot清潔?

編輯

# apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-extra-4.4.0-45-generic (4.4.0-45.66) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-45-generic /boot/vmlinuz-4.4.0-45-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-45-generic /boot/vmlinuz-4.4.0-45-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-45-generic /boot/vmlinuz-4.4.0-45-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-45-generic
Warning: No support for locale: en_US.utf8

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-45-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-45-generic (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-45-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

您可以找出哪些軟體包提供了所有核心使用

dpkg -S /boot/vmlinuz*

這些是佔用空間的包/boot。您可以清除不再需要的軟體包(通常保留最後兩個版本,並確保保留目前執行的核心)。

引用自:https://unix.stackexchange.com/questions/318800