I broke APT - Removing old Kernel [solved-reinstalled clone]

Post your update and upgrade related errors here
Forum rules
Before you post please read this

I broke APT - Removing old Kernel [solved-reinstalled clone]

Postby GeneC on Sat Sep 03, 2011 4:22 pm

I was routinely deleting an old unsed kernel today, and ran into this problem.
Aan error occured, here are the details.

Error message when using Synaptic

Image

Now, I cant do anything with Synaptic, such as adding new stuff or upgrading.
All I get is this same error message about the error encountered when trying to remove the Liquorix kernel.


Looks like I broke apt ?

Code: Select all
gene@zordon ~ $ sudo apt-get update && sudo apt-get dist-upgrade
[sudo] password for gene:
....................................
........................................
 
Fetched 45.8 kB in 8s (5,709 B/s)                                             
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-3.0-3.dmz.1-liquorix-amd64
The following NEW packages will be installed:
  libavformat53 libswscale2
The following packages have been kept back:
  ..............................
0 upgraded, 2 newly installed, 1 to remove and 36 not upgraded.
1 not fully installed or removed.
Need to get 0 B/555 kB of archives.
After this operation, 136 MB disk space will be freed.
Do you want to continue [Y/n]? y

(Reading database ... 181461 files and directories currently installed.)
Removing linux-image-3.0-3.dmz.1-liquorix-amd64 ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.0-3.dmz.1-liquorix-amd64 /boot/vmlinuz-3.0-3.dmz.1-liquorix-amd64
update-initramfs: Deleting /boot/initrd.img-3.0-3.dmz.1-liquorix-amd64
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 3.0-3.dmz.1-liquorix-amd64 /boot/vmlinuz-3.0-3.dmz.1-liquorix-amd64
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.0-4.dmz.1-liquorix-amd64...
E: /usr/share/syslinux/debian/extlinux: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.0-3.dmz.1-liquorix-amd64.postrm line 235.
dpkg: error processing linux-image-3.0-3.dmz.1-liquorix-amd64 (--remove):
 subprocess installed post-removal script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 linux-image-3.0-3.dmz.1-liquorix-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
gene@zordon ~ $
Last edited by GeneC on Sat Sep 03, 2011 8:15 pm, edited 1 time in total.
GeneC

AMD Phenom2x4 3.2 ghz, 12GB DDR3, Nvidia GTX 460

Qiana (Cinnamon/XFCE)
Sparky XFCE (Debian Testing)
LMDE Cin 2.2 (SID)
User avatar
GeneC
Level 7
Level 7
 
Posts: 1537
Joined: Fri Sep 03, 2010 1:59 pm
Location: Maine, USA

Linux Mint is funded by ads and donations.
 

Re: I broke APT - Removing old Kernel

Postby Gerd50 on Sat Sep 03, 2011 4:58 pm

Hello Gene,

here

viewtopic.php?f=141&t=80555

another kernel problem with the same result as yours, synaptic not working. I didn't really believe booting the recovery mode
and run update/dist-upgrade would help, but it did. Maybe it could be a solution for you too?
I believe in everything, except humans.

LM9, Debian Testing Xfce, Debian Sid Xfce - CPU/Amd64 2,6Ghz, Graphics/Nvidia 9600 GT, Sound/SB Audigy4 emu10K1
User avatar
Gerd50
Level 5
Level 5
 
Posts: 738
Joined: Wed Jul 22, 2009 3:42 pm
Location: Fishtown, Germany

Re: I broke APT - Removing old Kernel

Postby GeneC on Sat Sep 03, 2011 5:29 pm

Hi Gerd50

Thanks for the help. Didn't work.


My problem is a bit different that the one mentioned.
He didn't get a proper upgrade to a kernel

I got mine fine. It was just when removing (or trying to) :shock:
The OLD kernel that something happened.
It appears it only partially did the job.

Running synaptic from CLI
gene@zordon ~ $ sudo synaptic
[sudo] password for gene:
/usr/bin/deborphan: The status file is in an improper state.
One or more packages are marked as half-installed, half-configured,
unpacked, triggers-awaited or triggers-pending. Exiting.


For lack of knowing what else to do.
I tried
Code: Select all
sudo dpkg --configure -a

and
Code: Select all
sudo update-initramfs -u && sudo update-grub


Still broke!
GeneC

AMD Phenom2x4 3.2 ghz, 12GB DDR3, Nvidia GTX 460

Qiana (Cinnamon/XFCE)
Sparky XFCE (Debian Testing)
LMDE Cin 2.2 (SID)
User avatar
GeneC
Level 7
Level 7
 
Posts: 1537
Joined: Fri Sep 03, 2010 1:59 pm
Location: Maine, USA

Re: I broke APT - Removing old Kernel

Postby GeneC on Sat Sep 03, 2011 5:59 pm

gene@zordon ~ $ sudo apt-get remove linux-image-3.0-3.dmz.1-liquorix-amd64
[sudo] password for gene:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-3.0-3.dmz.1-liquorix-amd64
0 upgraded, 0 newly installed, 1 to remove and 38 not upgraded.
1 not fully installed or removed.
After this operation, 138 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 181461 files and directories currently installed.)
Removing linux-image-3.0-3.dmz.1-liquorix-amd64 ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.0-3.dmz.1-liquorix-amd64 /boot/vmlinuz-3.0-3.dmz.1-liquorix-amd64
update-initramfs: Deleting /boot/initrd.img-3.0-3.dmz.1-liquorix-amd64
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 3.0-3.dmz.1-liquorix-amd64 /boot/vmlinuz-3.0-3.dmz.1-liquorix-amd64
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.0-4.dmz.1-liquorix-amd64...
E: /usr/share/syslinux/debian/extlinux: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.0-3.dmz.1-liquorix-amd64.postrm line 235.
dpkg: error processing linux-image-3.0-3.dmz.1-liquorix-amd64 (--remove):
subprocess installed post-removal script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
linux-image-3.0-3.dmz.1-liquorix-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

gene@zordon ~ $



Line 232-246 of
/var/lib/dpkg/info/linux-image-3.0-3.dmz.1-liquorix-amd64.postrm
}
if (-d "/etc/kernel/postrm.d") {
warn "Examining /etc/kernel/postrm.d .\n";
system ("run-parts --verbose --exit-on-error --arg=$version " .
"--arg=$realimageloc$kimage-$version " .
"/etc/kernel/postrm.d") &&
die "Failed to process /etc/kernel/postrm.d";
}
if (-d "/etc/kernel/postrm.d/$version") {
warn "Examining /etc/kernel/postrm.d/$version .\n";
system ("run-parts --verbose --exit-on-error --arg=$version " .
"--arg=$realimageloc$kimage-$version " .
"/etc/kernel/postrm.d/$version") &&
die "Failed to process /etc/kernel/postrm.d/$version";
}


This is GREEK to me..
Maybe I'll just try deleting that section and trying again.
OR reloading a 3 week old clone, and updating.... :roll:
GeneC

AMD Phenom2x4 3.2 ghz, 12GB DDR3, Nvidia GTX 460

Qiana (Cinnamon/XFCE)
Sparky XFCE (Debian Testing)
LMDE Cin 2.2 (SID)
User avatar
GeneC
Level 7
Level 7
 
Posts: 1537
Joined: Fri Sep 03, 2010 1:59 pm
Location: Maine, USA

Re: I broke APT - Removing old Kernel

Postby GeneC on Sat Sep 03, 2011 6:06 pm

PHOOEY!

Tired of trying to fix this.
Its been a long day. Several problems today.
Frustrated and taking the easy way out, and restoring old clone.

Time for a BEER OR TWO! :twisted:
GeneC

AMD Phenom2x4 3.2 ghz, 12GB DDR3, Nvidia GTX 460

Qiana (Cinnamon/XFCE)
Sparky XFCE (Debian Testing)
LMDE Cin 2.2 (SID)
User avatar
GeneC
Level 7
Level 7
 
Posts: 1537
Joined: Fri Sep 03, 2010 1:59 pm
Location: Maine, USA

Re: I broke APT - Removing old Kernel

Postby sumski on Sat Sep 03, 2011 6:08 pm

do this:
Code: Select all
sudo chmod -x /etc/kernel/postrm.d/zz-extlinux

then do
Code: Select all
sudo dpkg --configure -a

Code: Select all
sudo apt-get dist-upgrade
Acer Extensa 5630G - Core2Duo T5800 2GHz , 4 GB ram, Ati Mobility 3650.
OpenSUSE 12.1 KDE 4.7.3
Debian Sid KDE 4.7.1/2
User avatar
sumski
Level 3
Level 3
 
Posts: 109
Joined: Fri Nov 26, 2010 6:36 am
Location: Zagreb, Croatia

Re: I broke APT - Removing old Kernel

Postby Gerd50 on Sat Sep 03, 2011 7:03 pm

Hi Gene,

While a lot happened here i was thinking about the deborphan thing and found this

http://www.linuxjournal.com/content/tec ... an-systems

After a 'sudo deborphan' i installed gtkorphan and find it very interesting.
I believe in everything, except humans.

LM9, Debian Testing Xfce, Debian Sid Xfce - CPU/Amd64 2,6Ghz, Graphics/Nvidia 9600 GT, Sound/SB Audigy4 emu10K1
User avatar
Gerd50
Level 5
Level 5
 
Posts: 738
Joined: Wed Jul 22, 2009 3:42 pm
Location: Fishtown, Germany

Re: I broke APT - Removing old Kernel

Postby secipolla on Sat Sep 03, 2011 7:36 pm

secipolla
Level 4
Level 4
 
Posts: 356
Joined: Sun Sep 05, 2010 5:19 pm

Re: I broke APT - Removing old Kernel

Postby GeneC on Sat Sep 03, 2011 8:14 pm

sumski, Gerd50, and secipolla

Thanks much for the help.
Quite interesting stuff.

Unfortunately, I had signed off the forum, and re-installed a couple week old clone, so I cannot try your suggestions.
I should have waited a while longer, but got a bit "burnt-out".
I had edited several files, that I probably should not have in an attempt to fix things, and probably messed things up beyond repair.

I have bookmarked this thread, and it may be of use if (when?) I mess up again. :wink:

It will help others as well.

sumski,
I wish I had waited and tried those commands.

Gerd50.
Funny you should mention deborphan! I tried it , and it found nothing.

secipolla
I looked at the reference you gave. That is another bookmark. Good Stuff.

Thanks, all!
GeneC

AMD Phenom2x4 3.2 ghz, 12GB DDR3, Nvidia GTX 460

Qiana (Cinnamon/XFCE)
Sparky XFCE (Debian Testing)
LMDE Cin 2.2 (SID)
User avatar
GeneC
Level 7
Level 7
 
Posts: 1537
Joined: Fri Sep 03, 2010 1:59 pm
Location: Maine, USA

Linux Mint is funded by ads and donations.
 

Return to Update/Upgrade Issues

Who is online

Users browsing this forum: Matt267 and 5 guests