dpkg -i linux-image-4.4.0-139-generic (Reading database ... 194759 files and directories currently installed.) Preparing to unpack linux-image-4.4.0-139-generic_4.4.0-139.165_amd64.deb ... Examining /etc/kernel/preinst.d/ run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic Done. Unpacking linux-image-4.4.0-139-generic (4.4.0-139.165) ... dpkg: error processing archive linux-image-4.4.0-139-generic_4.4.0-139.165_amd64.deb (--install): cannot copy extracted data for './boot/System.map-4.4.0-139-generic' to '/boot/System.map-4.4.0-139-generic.dpkg-new': failed to write (No space left on device) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic run-parts: executing /etc/kernel/postrm.d/kdump-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic Errors were encountered while processing: linux-image-4.4.0-139-generic_4.4.0-139.165_amd64.deb
|
위와 같이 no space left on device 인 경우 처리방법
우선 Device의 space 확인
$> df -k
] df -k Filesystem 1K-blocks Used Available Use% Mounted on udev 1937560 0 1937560 0% /dev tmpfs 391536 40052 351484 11% /run /dev/mapper/VGROOT-LV_root 49971364 17368560 32602804 35% / tmpfs 1957668 0 1957668 0% /dev/shm tmpfs 5120 0 5120 0% /run/lock tmpfs 1957668 0 1957668 0% /sys/fs/cgroup /dev/mapper/DATAVG01-dfp_lv 20957184 32960 20924224 1% /dfp /dev/sda1 191140 179824 11316 95% /boot tmpfs 100 0 100 0% /run/lxcfs/controllers tmpfs 391536 0 391536 0% /run/user/10001
|
boot 부분이 95% 사용중인 것 확인
/boot의 용량 확보를 위해서는 기본 방법
$> sudo apt autoremove |
이 방법으로 삭제가 안되는 경우, 일일이 삭제해줘야함.. (단 그냥 삭제하면 안됨)
apt-get purge linux-image ... |
위와 같이 안쓰는 오래된 version을 purge 해줘야 함.
/boot 경로의 file check
ls -al /boot total 162492 drwxr-xr-x 3 root root 4096 Dec 3 10:46 . drwxr-xr-x 26 root root 4096 Nov 28 10:47 .. -rw-r--r-- 1 root root 1251054 May 2 2018 abi-4.4.0-124-generic -rw-r--r-- 1 root root 1251583 May 26 2018 abi-4.4.0-128-generic -rw-r--r-- 1 root root 1246312 Apr 28 2017 abi-4.4.0-78-generic -rw-r--r-- 1 root root 190654 May 2 2018 config-4.4.0-124-generic -rw-r--r-- 1 root root 190545 May 26 2018 config-4.4.0-128-generic -rw-r--r-- 1 root root 190355 Apr 28 2017 config-4.4.0-78-generic drwxr-xr-x 5 root root 153 Jun 21 05:14 grub -rw-r--r-- 1 root root 7882667 Jun 21 05:13 initrd.img-4.4.0-119-generic -rw-r--r-- 1 root root 7882503 Jun 21 05:13 initrd.img-4.4.0-121-generic -rw-r--r-- 1 root root 37798834 Jun 21 05:13 initrd.img-4.4.0-124-generic -rw-r--r-- 1 root root 37823614 Jun 21 05:14 initrd.img-4.4.0-128-generic -rw-r--r-- 1 root root 37566862 Jun 21 05:14 initrd.img-4.4.0-78-generic -rw-r--r-- 1 root root 255 May 2 2018 retpoline-4.4.0-124-generic -rw-r--r-- 1 root root 255 May 26 2018 retpoline-4.4.0-128-generic -rw------- 1 root root 3898100 May 2 2018 System.map-4.4.0-124-generic -rw------- 1 root root 3901360 May 26 2018 System.map-4.4.0-128-generic -rw------- 1 root root 3882872 Apr 28 2017 System.map-4.4.0-78-generic -rw------- 1 root root 7143952 May 2 2018 vmlinuz-4.4.0-124-generic -rw------- 1 root root 7150336 May 26 2018 vmlinuz-4.4.0-128-generic -rw------- 1 root root 7089552 Apr 28 2017 vmlinuz-4.4.0-78-generic |
xxx-78-generic 버전을 purge 시키도록함.
$> sudo apt-get purge abi-4.4.0-78-generic config-4.4.0-78-generic initrd.img-4.4.0-78-generic System.map-4.4.0-78-generic vmlinuz-4.4.0-78-generic |
$ uname -r
4.4.0-124-generic
현재 사용중인 커널 버전은 4.4.0-124-generic 입니다.
설치되어있는 커널을 알아봅니다.
언제 롤백을해야할지 모르니 현재 버전말고도 구버전 최소 1-2개는 남겨두고 삭제하는것이 좋습니다.
설치되어잇는 패키지를 찾습니다.
모두 삭제가 완료되면 boot용량을 확인합니다.
$ du -sh /boot
41M /boot