-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 05/29/2014 11:02 AM, Horatio Leragon wrote:

> I am using Debian 7.5 with linux-image-3.2.0.4-amd64 (let us call it
> the original stable linux-image)
> 
> 
> Suppose the following scenario takes place:
> 
> 1. I upgrade the linux-image to 3.14-0.bpo.1-amd64 2. I remove the
> original stable linux-image using the following command which I found
> after googling:
> 
> dpkg --list 'linux-image-*' \
>     | perl -ane 'BEGIN { $r = `uname -r` or die; chomp $r } print $F[1], "\n" 
> if $F[0] eq "ii" && $F[1] !~ /\Q$r\E\b/' \ 
>     | xargs -r aptitude purge -y

Although this should work, it's unnecessarily complicated if all you
want to do is remove a single linux-image package. This looks like it's
designed to remove all kernel packages except the one for the kernel
that's currently running.

> 3. A month later I decide to have the original stable linux-image
> back.
> 
> Short of reinstalling the OS, is there an alternative?

First, check to see whether the old version is still available through
your configured repositories:

$ apt-get update
$ apt-cache policy linux-image-3.2.0-4-amd64



If you're in luck, you'll see something like the following:

========
linux-image-3.2.0-4-amd64:
  Installed: 3.2.57-3
  Candidate: 3.2.57-3
  Version table:
     3.2.57-3 0
        500 http://ftp.us.debian.org/debian/ stable/main amd64 Packages
========

If that is the case, then you should be able to reinstall the old kernel
easily, like any other package:

$ apt-get install linux-image-3.2.0-4-amd64

It's not guaranteed that you will get *exactly* the same version as
before; for example, if kernel security updates have been released and
packaged for Debian stable, you may get a kernel that includes those as
well. However, at worst, you will get the same kernel that someone doing
a new install today would get.



If you instead see something like

========
N: Unable to locate package linux-image-3.2.0-4-amd64
N: Couldn't find any package by regex 'linux-image-3.2.0-4-amd64'
========

then you will have more difficulty. It's still possible, but which
approaches will work depend on the configuration of the rest of your
system, as well as a few outside factors.

- --
   The Wanderer

Secrecy is the beginning of tyranny.

A government exists to serve its citizens, not to control them.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJTh0/2AAoJEASpNY00KDJrtMYP/jt7kOp/EjGlAlfbqzX3/OR5
FP4hXRykBckRDvmZIZsBhLaXtPM2gJFPyQ5ZYZ/5IaubHrW44LRq4j91nGcF2P6k
XZsMlXH9gJLFS1Wp2ctsTHEAH3+a5gll2QxwgANOoVuTjkKI8x4fb2Kw3PeqlVyE
eaOr+L3JWtGRXYZuzJkhbtBIxE5nZ6pQa95Dur2QGIt6qMAcIWAJDWh83YKPkyrY
vCbs3oayDnne1pU/GOkVNb+vWdT4h8v5Z+DE3igajd/aCh9M5q0SppcBWQasxank
HGrXYR7tVFWRCTqig6GNsxWlHVvYxol+FUI8ogHWtfD7mcp119Cmkfg4eLz0C8B4
QWayvyWnxaPZj8MOqUPYVI/XaM3MZTThgZfz+DR6hDtBIPQdZhVDplRYp5UrX0xT
E5vMItgaAzO87XJhgkg/QQGpnBkJoKkfK88frxpoUA+MA4KmNmwa+qU6WwuDG+PJ
qKxeoqeMQDG3qMrnSaHx4wMPtaizhqRMFIHIrqcAivJoWFyqB6GEknUDvMRsIKXf
nhT5mx9v7B9Pu2Q5Pd/IlXEkpPuL+g8fRkX5fVRlbLGB1s1NSJq6DdgZRq3Nunnb
zG8MBV7MFzBZNkPNVM4zXp7mAeAq9ueNwR1e4ImMvPZyLSehoT0w6cmLJjhnd5Ca
EwY14YS9D/5qp1iwJ6R3
=syXC
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/53874ff6.1090...@fastmail.fm

Reply via email to