[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I accidentally installed lenny's linux-image/linux-header packages and I'm running Squeeze. What to do?



Am Freitag, 23. März 2012 schrieb Alex Hutton:
> Hello,

Hi Alex,

> Basically what happened was I did sudo aptitude update && sudo
> aptitude upgrade and I hit 'Y' to accept the packages being installed.
> Only afterwards did I realise it would be installing packages from
> Lenny. I tried to hit ctrl-c and ctrl-d to abort aptitude but this
> didn't seem to work.
> 
> To give more information, I am running Squeeze amd64. I have not
> rebooted since these packages were installed.
> 
> In my /etc/apt/sources.list I had Lenny repositories on lines below
> the Squeeze lines. I had done this a while ago on the advice on some
> webpage. I believe the idea was that if a package wasn't found in
> Squeeze, aptitude would fall back to the Lenny repositories. So
> packages from Lenny would only be used if those packages were not
> found in Squeeze. There was a particular package I wanted from Lenny
> at the time and this seemed like a reasonable way to install it (I do
> not remember what that package was).
[…]
> I have tried to rectify the situation by commenting out the Lenny
> lines in sources.list , adding additional Squeeze lines to
> sources.list (to remedy the potential of the first mirror being down),
> then doing aptitude update and aptitude upgrade. I have also performed
> aptitude reinstall linux-image-amd64 . I do not think anything was
> installed because I did not see aptitude do anything after it had
> grabbed and unpacked the packages.

I bet thats because the Squeeze kernel is still installed. Several kernels 
can be installed beside each other. But read on.

> Here is the output of a few commands to show you the current state of
> my system:
> 
> $ cat /var/log/dpkg.log* | grep "linux\-" |grep "\ installed" |sort
[…]
> $ aptitude search linux-headers |grep '^i'
> i A linux-headers-2.6-amd64         - Header files for Linux amd64
[…]
> $ aptitude search linux-image |grep '^i'
> i   linux-image-2.6.26-2-amd64      - Linux 2.6.26 image on AMD64
> i A linux-image-2.6.32-5-amd64      - Linux 2.6.32 for 64-bit PCs
> i   linux-image-amd64               - Linux for 64-bit PCs
> (meta-package)
> 
> $ uname -mrs
> Linux 2.6.32-5-amd64 x86_64

These do not show the exact current state of the system. While dpkg.log 
shows what has been installed recently, it doesn´t tell at a short glance, 
whether the Squeeze kernel is still installed. And apitude search will 
also find packages which are not installed.

apt-get or aptitude install linux-image-2.6.32-5-amd64 should give to the 
Squeeze kernel back in case it is removed.

But please check first with

dpkg -l | grep linux-image

ls -l /boot

whether the 2.6.32 kernel is still installed. I bet it is and then you do 
not have a problem at all. Having both a Lenny and a Squeeze kernel 
installed is the usual situation after an upgrade from Lenny to Squeeze.

update-grub should be intelligent enough to put the most recent one on 
top. You can check this, by running it again or by viewing 
/boot/grub/grub.cfg oder menu.lst in case you still use GRUB 1.

When you have verified that the Squeeze kernel is still installed and you 
can boot from it, you can remove the Lenny kernel - or keep it as an 
alternate kernel, cause Squeeze may still be able to boot from it in case 
the Squeeze kernel is damaged by something. I like to have two kernel 
versions installed in case one of it ever gets broken by an update or so.

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7


Reply to: