Wednesday, October 4, 2017

upgrade - Boot Disk Full: Server boots and works fine however i cannot uprade or remove old kernels

Greetings and salutations




Question: I'm new to Linux and want to clean up my first ubuntu server which currently hosting a wordpress website, however have encounter error as I didn't clean up as I went along as I didn't know so is there anyway I can clean up this server to free up boot disk space and once again be able to upgrade, etc. thank you in advance



Server Access:
Putty, Webmin, Direct Virtual Server Connection, Bash via Powershell



Tried Solutions:
I tried the autoremove - f command and the output below is want I get



Command output:




kg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-130- sudo apt autoremove -f
[sudo] password for (sudo admin account name, which I entered pw)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-4.4.0-130-generic
Suggested packages:
dutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools

The following NEW packages will be installed:
linux-image-4.4.0-130-generic
0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded.
10 not fully installed or removed.
Need to get 0 B/22.1 MB of archives.
After this operation, 68.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 202908 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-130-generic_4.4.0-130.156_amd64.deb ...
Examining /etc/kernel/preinst.d/

run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
Done.
Unpacking linux-image-4.4.0-130-generic (4.4.0-130.156) ...
dpgeneric_4.4.0-130.156_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.4.0-130-generic' to '/boot/vmlinuz-4.4.0-130-generic.dpkg-new': failed to write (No space left on device)

**No apport report written because the error message indicates a disk full error**
dpkg-deb: error: subprocess paste was killed by signal Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic

run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.4.0-130-generic_4.4.0-130.156_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Tried apt-get this time (the first was apt only)



(admin account name @server name):~$ sudo apt-get autoremove -f

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-4.4.0-130-generic
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following NEW packages will be installed:
linux-image-4.4.0-130-generic

0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded.
10 not fully installed or removed.
Need to get 0 B/22.1 MB of archives.
After this operation, 68.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 202908 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-130-generic_4.4.0-130.156_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
Done.

Unpacking linux-image-4.4.0-130-generic (4.4.0-130.156) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-130-generic_4.4.0-130.156_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.4.0-130-generic' to '/boot/vmlinuz-4.4.0-130-generic.dpkg-new': failed to write (No space left on device)
**No apport report written because the error message indicates a disk full error**
d**pkg-deb: error: subprocess paste was killed by signal (Brokn pipe)**

Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic

Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.4.0-130-generic_4.4.0-130.156_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


The above is the output from running the autoremove command, any suggestion on further things to try



output from ls -l /boot



ls -l /bs report




Many thanks



Moved up from comment, so it could be formatted:



uname -r
4.4.0-127-generic


total 465226

-rw-r--r-- 1 root root 1249685 Jan 19 2018 abi-4.4.0-112-generic
-rw-r--r-- 1 root root 1250569 Feb 13 2018 abi-4.4.0-116-generic
-rw-r--r-- 1 root root 1251075 Apr 2 19:05 abi-4.4.0-119-generic
-rw-r--r-- 1 root root 1251054 Apr 13 17:21 abi-4.4.0-121-generic
# small sample – CorpCaleCeo 8 hours ago


UPDATE: after trying to remove using several commands his is the output which explain it the best and as you can see I cannot remove any of them



Cannot remove kernel due to following reason

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...