PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > dpkg purge problem
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

dpkg purge problem

Réponse
 
LinkBack Outils de la discussion
Vieux 31/07/2007, 00h20   #1
Sasho Angelov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut dpkg purge problem

When I try to purge old linux image:

sudo dpkg --purge --force-all linux-image-2.6.14-2-k7
(Reading database ... 259033 files and directories currently installed.)
Removing linux-image-2.6.14-2-k7 ...
Purging configuration files for linux-image-2.6.14-2-k7 ...
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
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.22-1-k7
Updating /boot/grub/menu.lst ... done

And stop here. Only I can do is to press Ctrl+C
then result is:
dpkg: error processing linux-image-2.6.14-2-k7 (--purge):
subprocess post-removal script killed by signal (Interrupt)
Errors were encountered while processing:
linux-image-2.6.14-2-k7


/var/lib/dpkg/info/linux-image-2.6.14-2-k7.list is empty file

What to do???

--
Alexandar Angelov

  Réponse avec citation
Vieux 31/07/2007, 02h00   #2
Douglas Allan Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On Tue, Jul 31, 2007 at 01:15:19AM +0300, Sasho Angelov wrote:
> When I try to purge old linux image:
>
> sudo dpkg --purge --force-all linux-image-2.6.14-2-k7


Why do you need to force things? This may be a clue.

What package manager do you use and why don't you use it to remove this?

[snip]
> Updating /boot/grub/menu.lst ... done
>
> And stop here. Only I can do is to press Ctrl+C
> then result is:
> dpkg: error processing linux-image-2.6.14-2-k7 (--purge):
> subprocess post-removal script killed by signal (Interrupt)
> Errors were encountered while processing:
> linux-image-2.6.14-2-k7
>
>
> /var/lib/dpkg/info/linux-image-2.6.14-2-k7.list is empty file



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 31/07/2007, 02h00   #3
Douglas Allan Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On Tue, Jul 31, 2007 at 01:15:19AM +0300, Sasho Angelov wrote:
> When I try to purge old linux image:
>
> sudo dpkg --purge --force-all linux-image-2.6.14-2-k7


Why do you need to force things? This may be a clue.

What package manager do you use and why don't you use it to remove this?

[snip]
> Updating /boot/grub/menu.lst ... done
>
> And stop here. Only I can do is to press Ctrl+C
> then result is:
> dpkg: error processing linux-image-2.6.14-2-k7 (--purge):
> subprocess post-removal script killed by signal (Interrupt)
> Errors were encountered while processing:
> linux-image-2.6.14-2-k7
>
>
> /var/lib/dpkg/info/linux-image-2.6.14-2-k7.list is empty file



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 31/07/2007, 14h40   #4
Karl E. Jorgensen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On Tue, Jul 31, 2007 at 01:15:19AM +0300, Sasho Angelov wrote:
> When I try to purge old linux image:
>
> sudo dpkg --purge --force-all linux-image-2.6.14-2-k7


Why --force-all ?

> (Reading database ... 259033 files and directories currently installed.)
> Removing linux-image-2.6.14-2-k7 ...
> Purging configuration files for linux-image-2.6.14-2-k7 ...
> Searching for GRUB installation directory ... found: /boot/grub
> Searching for default file ... found: /boot/grub/default
> 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.22-1-k7
> Updating /boot/grub/menu.lst ... done
>
> And stop here. Only I can do is to press Ctrl+C
> then result is:
> dpkg: error processing linux-image-2.6.14-2-k7 (--purge):
> subprocess post-removal script killed by signal (Interrupt)
> Errors were encountered while processing:
> linux-image-2.6.14-2-k7
>
>
> /var/lib/dpkg/info/linux- image-2.6.14-2-k7.list is empty file
>
> What to do???


Which debconf frontend do you use? I've had that happen to me when I
"accidentally" used the GNOME front-end. Not a problem, unless you're on
a virtual console and DISPLAY is set - then it shows the GUI on the X
display that I'm not looking at.... Took me a while to figure out...

--
Karl E. Jorgensen
karl@jorgensen.org.uk http://www.jorgensen.org.uk/
karl@jorgensen.com http://karl.jorgensen.com
==== Today's fortune:
old inkjet cartridges emanate barium-based fumes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGry1gi+PVvwZpXJgRAhIOAKCXyihIgGaY44twyWELiJ BuEjSU3QCgo699
o1hLoOI9oZ9oRB3W9HUXE18=
=P4wL
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 31/07/2007, 22h20   #5
Alexandar Angelov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On Tuesday 31 July 2007, Karl E. Jorgensen wrote:
> On Tue, Jul 31, 2007 at 01:15:19AM +0300, Sasho Angelov wrote:
> > When I try to purge old linux image:
> >
> > sudo dpkg --purge --force-all linux-image-2.6.14-2-k7

>
> Why --force-all ?
>

Without --force-all the result is the same.
>
> Which debconf frontend do you use? I've had that happen to me when I
> "accidentally" used the GNOME front-end. Not a problem, unless you're on
> a virtual console and DISPLAY is set - then it shows the GUI on the X
> display that I'm not looking at.... Took me a while to figure out...



I install this package with dpkg in virtual console. When i try to purge this
package with stopped X server the result is not different .


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/08/2007, 08h30   #6
Bob Proulx
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

Sasho Angelov wrote:
> Updating /boot/grub/menu.lst ... done
> And stop here. Only I can do is to press Ctrl+C


That is running update-grub. You should be able to run that command
manually.

sudo update-grub

If that hangs (hopefully it will) then you can debug from that point.
It is a shell script and so the following command would useful.

sudo bash -x /usr/sbin/update-grub

> /var/lib/dpkg/info/linux-image-2.6.14-2-k7.list is empty file


That .list file should not be related.

> What to do???


Did your /boot/grub/menu.lst file become corrupted? If so then move
it out of the way (so that you have a saved copy) and then run
update-grub manually. Seeing no file there it will offer to create
one for you automatically.

sudo mv /boot/grub/menu.lst /boot/grub/menu.lst.corrupted
sudo update-grub

Then carefully compare and configure the 'kopt' and 'groot' sections.
Those would have been set up automatically by the installer. Because
my suggestion creates a new file without the installer those options
need to be set correctly.

diff /boot/grub/menu.lst /boot/grub/menu.lst.corrupted
sudo editor /boot/grub/menu.lst
sudo update-grub

After fixing and running update-grub inspect the file. If update-grub
runs without hanging then you should be able to purge the package.

If all else fails and a package simply will not pass the prerm or
postrm scripts then a reach-into-the-guts of the system approach is to
edit the /var/lib/dpkg/info/linux-image-2.6.14-2-k7.prerm and/or
/var/lib/dpkg/info/linux-image-2.6.14-2-k7.postrm files and hack them
to exit(0); so as to avoid the error. At that point dpkg will succeed
without running the script. But it won't have run the script either
and so that problem would need to be dealt with but some broken
packages have required this.

Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/08/2007, 17h50   #7
Alexandar Angelov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On Wednesday 01 August 2007, Bob Proulx wrote:

/boot/grub/menu.lst is not corrupted

> After fixing and running update-grub inspect the file. If update-grub
> runs without hanging then you should be able to purge the package.
>
> If all else fails and a package simply will not pass the prerm or
> postrm scripts then a reach-into-the-guts of the system approach is to
> edit the /var/lib/dpkg/info/linux-image-2.6.14-2-k7.prerm and/or
> /var/lib/dpkg/info/linux-image-2.6.14-2-k7.postrm files and hack them
> to exit(0); so as to avoid the error. At that point dpkg will succeed
> without running the script. But it won't have run the script either
> and so that problem would need to be dealt with but some broken
> packages have required this.


Can I get postrm script form other linux-image and change only
my $version to be = "2.6.14-2-k7";


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/08/2007, 19h00   #8
Bob Proulx
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

Alexandar Angelov wrote:
> Bob Proulx wrote:
> > After fixing and running update-grub inspect the file. If update-grub
> > runs without hanging then you should be able to purge the package.


Does running update-grub by itself complete? Or hang?

> > If all else fails and a package simply will not pass the prerm or
> > postrm scripts then a reach-into-the-guts of the system approach is to
> > edit the /var/lib/dpkg/info/linux-image-2.6.14-2-k7.prerm and/or
> > /var/lib/dpkg/info/linux-image-2.6.14-2-k7.postrm files and hack them
> > to exit(0); so as to avoid the error. At that point dpkg will succeed
> > without running the script. But it won't have run the script either
> > and so that problem would need to be dealt with but some broken
> > packages have required this.

>
> Can I get postrm script form other linux-image and change only
> my $version to be = "2.6.14-2-k7";


I don't think that will since it is very unlikely that the kernel
prerm and postrm scripts are the problem.

Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/08/2007, 21h30   #9
Sasho Angelov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On 8/1/07, Bob Proulx <bob@proulx.com> wrote:
>
>
> Does running update-grub by itself complete? Or hang?
>
>
> update-grub complete successfully

When I purge other linux-images everything is fine.


--
Alexandar Angelov

  Réponse avec citation
Vieux 01/08/2007, 21h30   #10
Sasho Angelov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On 8/1/07, Bob Proulx <bob@proulx.com> wrote:
>
>
> Does running update-grub by itself complete? Or hang?
>
>
> update-grub complete successfully

When I purge other linux-images everything is fine.


--
Alexandar Angelov

  Réponse avec citation
Vieux 02/08/2007, 00h50   #11
Bob Proulx
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

Sasho Angelov wrote:
> When I purge other linux-images everything is fine.


Hmm... It is hard to debug remotely.

If you are at the end of the possibilities then I would simply disable
the prerm and postrm scripts entirely. This is a serious "force"
action but if you have exhausted your other options then this is
probably the best that is left to you.

Edit this file:

sudo editor /var/lib/dpkg/info/linux-image-2.6.14-2-k7.postrm

Change the script so that it is simply the following:

#!/bin/sh
exit 0

That can't fail and therefore the dpkg --purge should succeed. I
believe the postinst script is the oen that calls update-grub and
would match your output and so should be the script that was hanging.
If any remnants of that linux kernel are left after being --purged
then you will need to manually find them and remove them since this
bypasses the normal package scripts that do the final cleanup.

Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 02/08/2007, 09h20   #12
Salvatore Bonaccorso
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

Hello

On Tue, Jul 31, 2007 at 11:15:50PM +0300, Alexandar Angelov wrote:
> On Tuesday 31 July 2007, Karl E. Jorgensen wrote:
> > On Tue, Jul 31, 2007 at 01:15:19AM +0300, Sasho Angelov wrote:
> > > When I try to purge old linux image:
> > >
> > > sudo dpkg --purge --force-all linux-image-2.6.14-2-k7

> >
> > Why --force-all ?
> >

> Without --force-all the result is the same.
> >
> > Which debconf frontend do you use? I've had that happen to me when I
> > "accidentally" used the GNOME front-end. Not a problem, unless you're on
> > a virtual console and DISPLAY is set - then it shows the GUI on the X
> > display that I'm not looking at.... Took me a while to figure out...

>
>
> I install this package with dpkg in virtual console. When i try to purge this
> package with stopped X server the result is not different .


I can't you to solve the problem, to say it first. But I had the
exactly the same Problem with a self-compiled 2.6.14 kernel (from the
kernel-source-2.6.14 package) and packaged with make-kpkg.

Trying to "remove" the package worked everytime fine, put when I tried
to purge the 2.6.14-kernel then I got the same error as You. I
unfurtunatly don't remember with which "version" of make-kpkg (i.e.
kernel-package) i compiled it, but comparing then the remove-script of
my kernel-image-2.6.14 deb there was a difference with later
remove-scripts. Maybee so a "idea" could be to analize the
remove-script under /var/lib/dpkg/info in the (probably) apropriate
postrm-Script?

Sorry for my bad english,
Regards
Salvatore

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGsYWbvUVnU1GNo5QRAr+8AKCxopCXppENOVyTDF4KLQ 6lZuD1vQCeI8Ke
VrLl1UB2Zs9TI1fejznyJrg=
=c4hy
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 02/08/2007, 09h20   #13
Salvatore Bonaccorso
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

Hello

On Tue, Jul 31, 2007 at 11:15:50PM +0300, Alexandar Angelov wrote:
> On Tuesday 31 July 2007, Karl E. Jorgensen wrote:
> > On Tue, Jul 31, 2007 at 01:15:19AM +0300, Sasho Angelov wrote:
> > > When I try to purge old linux image:
> > >
> > > sudo dpkg --purge --force-all linux-image-2.6.14-2-k7

> >
> > Why --force-all ?
> >

> Without --force-all the result is the same.
> >
> > Which debconf frontend do you use? I've had that happen to me when I
> > "accidentally" used the GNOME front-end. Not a problem, unless you're on
> > a virtual console and DISPLAY is set - then it shows the GUI on the X
> > display that I'm not looking at.... Took me a while to figure out...

>
>
> I install this package with dpkg in virtual console. When i try to purge this
> package with stopped X server the result is not different .


I can't you to solve the problem, to say it first. But I had the
exactly the same Problem with a self-compiled 2.6.14 kernel (from the
kernel-source-2.6.14 package) and packaged with make-kpkg.

Trying to "remove" the package worked everytime fine, put when I tried
to purge the 2.6.14-kernel then I got the same error as You. I
unfurtunatly don't remember with which "version" of make-kpkg (i.e.
kernel-package) i compiled it, but comparing then the remove-script of
my kernel-image-2.6.14 deb there was a difference with later
remove-scripts. Maybee so a "idea" could be to analize the
remove-script under /var/lib/dpkg/info in the (probably) apropriate
postrm-Script?

Sorry for my bad english,
Regards
Salvatore

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGsYWbvUVnU1GNo5QRAr+8AKCxopCXppENOVyTDF4KLQ 6lZuD1vQCeI8Ke
VrLl1UB2Zs9TI1fejznyJrg=
=c4hy
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 03/08/2007, 00h00   #14
Alexandar Angelov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: dpkg purge problem

On Thursday 02 August 2007, Salvatore Bonaccorso wrote:
> I can't you to solve the problem, to say it first. But I had the
> exactly the same Problem with a self-compiled 2.6.14 kernel (from the
> kernel-source-2.6.14 package) and packaged with make-kpkg.

Yes I compile with make-kpkg.
> Trying to "remove" the package worked everytime fine, put when I tried
> to purge the 2.6.14-kernel then I got the same error as You. I
> unfurtunatly don't remember with which "version" of make-kpkg (i.e.
> kernel-package) i compiled it, but comparing then the remove-script of
> my kernel-image-2.6.14 deb there was a difference with later
> remove-scripts. Maybee so a "idea" could be to analize the
> remove-script under /var/lib/dpkg/info in the (probably) apropriate
> postrm-Script?
>


I compare /var/lib/dpkg/info/linux-image-2.6.14-2-k7.postrm
with /var/lib/dpkg/info/linux-image-2.6.22-1-k7.postrm and scripts are not so
different.
I copy /var/lib/dpkg/info/linux-image-2.6.22-1-k7.postrm
to /var/lib/dpkg/info/linux-image-2.6.14-2-k7.postrm and change only the my
$version variable.
dpkg purge complete successefully and I think that maybe solved the problem.


Alexandar Angelov.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h23.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,22517 seconds with 22 queries