LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-19-2006, 03:39 AM   #1
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Rep: Reputation: 30
error removing a package


Hi

I am getting the errors towards the end when trying to remove a kernel I installed. I need help to find out why and fix them.

thank you

debian:~# dpkg -l linux-image* | grep ^ii
ii linux-image-2.6.15-1-686 2.6.15-8 Linux kernel 2.6.15 image on PPro/Celeron/PI
ii linux-image-2.6.16.060919 2.6.16.060919-10.00.Custom Linux kernel binary image for version 2.6.16
debian:~# cd /boot/
debian:/boot# dpkg -P linux-image-2.6.16.060919
(Reading database ... 83816 files and directories currently installed.)
Removing linux-image-2.6.16.060919 ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.15-1-686
Updating /boot/grub/menu.lst ... done

The link /vmlinuz is a damaged link
Removing symbolic link vmlinuz
Unless you used the optional flag in lilo,
you may need to re-run your boot loader[lilo]
Purging configuration files for linux-image-2.6.16.060919 ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.15-1-686
Updating /boot/grub/menu.lst ... done

dpkg: error processing linux-image-2.6.16.060919 (--purge):
subprocess post-removal script returned error exit status 128
Errors were encountered while processing:
linux-image-2.6.16.060919


I use grup and not lilo.
 
Old 09-19-2006, 05:32 AM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
How did you build that kernel image? Did you build it as a .deb package or from source? In latter case, removing it with dpkg isn't going to work, as there is no package associated with it in it's database. Removing it is actually less complicated as you might think:
# remove the entries in /boot/grub/menu.lst pointing to that kernel
# remove sym-links in /boot to the image, System.map and initrd image
# replace these sym-links to sym-links to the remaining kernel stuff
# remove the kernel-image, System.map and initrd.img
# Done!

All steps require root-privileges.
 
Old 09-20-2006, 02:25 PM   #3
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
When some package does not want to get uninstalled, try

dpkg --purge --force-all package

That should do the trick. I get these problems on Debian Testing if I don't update often enough.
 
Old 09-20-2006, 08:20 PM   #4
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
I did what Dutch Master and basileus said but here is the results


debian:/boot# dpkg --purge --force-all linux-image-2.6.16
(Reading database ... 83467 files and directories currently installed.)
Removing linux-image-2.6.16 ...
Purging configuration files for linux-image-2.6.16 ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.15-1-686
Updating /boot/grub/menu.lst ... done

dpkg: error processing linux-image-2.6.16 (--purge):
subprocess post-removal script returned error exit status 128
Errors were encountered while processing:
linux-image-2.6.16
debian:/boot# cd
debian:~# dpkg -l linux-image-2.6.16
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=============================-=============================-==========================================================================
pc linux-image-2.6.16 Custom.060920 Linux kernel binary image for version 2.6.16
debian:~# ls -l /boot/
total 6493
-rw-r--r-- 1 root root 65416 2006-03-06 23:30 config-2.6.15-1-686
drwxr-xr-x 2 root root 1024 2006-09-21 11:17 grub
-rw-r--r-- 1 root root 4722380 2006-09-19 21:09 initrd.img-2.6.15-1-686
-rw-r--r-- 1 root root 680667 2006-03-07 02:31 System.map-2.6.15-1-686
-rw-r--r-- 1 root root 1147143 2006-03-07 02:30 vmlinuz-2.6.15-1-686
debian:~#

why pc is in the PACAKGE-STATE field?
how do I clean it all out?

thanks
 
Old 09-20-2006, 08:26 PM   #5
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
also it is worth saying that I just re-installed the package "custom kenrel" and here is the result of the output,
notice there is not initred files in /boot..

**********************************
debian:/usr/src# dpkg -i linux-image-2.6.16.1_2.6.16.1-10.00.Custom_i386.deb
Selecting previously deselected package linux-image-2.6.16.1.
(Reading database ... 83467 files and directories currently installed.)
Unpacking linux-image-2.6.16.1 (from linux-image-2.6.16.1_2.6.16.1-10.00.Custom_i386.deb) ...
Done.
Setting up linux-image-2.6.16.1 (2.6.16.1-10.00.Custom) ...
Running depmod.
Running postinst hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.16.1
Found kernel: /boot/vmlinuz-2.6.15-1-686
Updating /boot/grub/menu.lst ... done


debian:/usr/src# ls -l /boot/
total 8371
-rw-r--r-- 1 root root 65416 2006-03-06 23:30 config-2.6.15-1-686
-rw-r--r-- 1 root root 64090 2006-09-21 06:58 config-2.6.16.1
drwxr-xr-x 2 root root 1024 2006-09-21 11:23 grub
-rw-r--r-- 1 root root 4722380 2006-09-19 21:09 initrd.img-2.6.15-1-686
-rw-r--r-- 1 root root 680667 2006-03-07 02:31 System.map-2.6.15-1-686
-rw-r--r-- 1 root root 667323 2006-09-21 09:53 System.map-2.6.16.1
-rw-r--r-- 1 root root 1147143 2006-03-07 02:30 vmlinuz-2.6.15-1-686
-rw-r--r-- 1 root root 1179229 2006-09-21 09:53 vmlinuz-2.6.16.1
debian:/usr/src#
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Yum Error: Transaction Check Error package x(which is newer than package y)... godsk Linux - Newbie 0 06-05-2006 07:13 AM
Problem with removing a package Aramil Ubuntu 3 12-06-2005 06:58 AM
removing a package?? ayers Linux - Software 3 06-27-2005 04:39 AM
removing a package ?? ayers Linux - Newbie 3 06-27-2005 03:18 AM
removing package vichet Linux - Newbie 1 04-23-2002 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration