Re: [suse-sles-e] Upgrade to SLES9 SP4 results in non-bootable systems when using SATA

From: Eberhard Moenkeberg (emoenke_at_gwdg.de)
Date: Sat Dec 22 2007 - 01:44:10 CET


Date: Sat, 22 Dec 2007 01:44:10 +0100 (CET)
From: Eberhard Moenkeberg <emoenke@gwdg.de>
Message-ID: <Pine.LNX.4.64.0712220137230.19492@gwdu05.gwdg.de>
Subject: Re: [suse-sles-e] Upgrade to SLES9 SP4 results in non-bootable systems when using SATA

Hi,

On Sat, 22 Dec 2007, Robert Scheck wrote:
> On Sat, 22 Dec 2007, Eberhard Moenkeberg wrote:

> > The old kernel(s) have to get conserved somehow.
> > But you surely do not want to have your /boot partition exploded by old
> > kernels...
>
> It could be made a configuration option how many old Linux kernels should
> be kept in /boot as others already do. Most of the relevant code would have
> to be included into mkinitrd and whatever is maybe executed in %post of the
> kernel RPM package.

Just let's wait until their brainstorming gives a result.
The longer our SUSE guys are thinking, they know for themselves the better
the solution has to be. ;-))

> > I do this always with the first kernel from a release, and again from time
> > to time:
>
> I wrote a nice script a longer time ago which could be of interest for you
> as well. Unfortunately this script saved my ass already a couple of times -
> unfortunately, because I shouldn't run into a scenario where this would be
> needed.

My method is to take the old kernel(s) out of the package management.

> --- snipp ---
> #!/bin/bash
>
> echo "Found kernels saved: "
>
> # All found kernel packages
> for NAME in $(rpm -qa --qf "%{name}\n" | grep "^kernel" | grep -E -v "(devel|source)"); do
> # Get version and arch from installed rpm package
> VERSION="$(rpm -q $NAME -qa --qf '%{version}-%{release}')"
> ARCH="$(rpm -q $NAME -qa --qf '%{arch}')"
>
> # Tarball any bound kernel files from /lib and /usr
> tar cfzP $NAME-$VERSION.$ARCH.tar.gz \
> $(rpm -ql $NAME | grep -E "^/(lib|usr)") \
> /boot/*$VERSION*
>
> # Save a copy of grub configuration
> cp -f /boot/grub/menu.lst $NAME-$VERSION.$ARCH.grub.lst
>
> # Finally display the saved file archives
> ls -l $NAME-$VERSION.$ARCH.{tar.gz,grub.lst}
> done
>
> echo " "
> echo "For saving the stuff back:"
> echo " - Unpack the .tar.gz files containing kernel"
> echo " - Modify /boot/grub/menu.lst from .grub.lst"
> --- snapp ---
>
> # ./suse-kernel-backup.sh
> Found kernels saved:
> -rw------- 1 root root 924 Dec 22 01:20 kernel-xen-2.6.16.53-0.16.x86_64.grub.lst
> -rw-r--r-- 1 root root 96110797 Dec 22 01:20 kernel-xen-2.6.16.53-0.16.x86_64.tar.gz
> -rw------- 1 root root 924 Dec 22 01:21 kernel-smp-2.6.16.53-0.16.x86_64.grub.lst
> -rw-r--r-- 1 root root 98054536 Dec 22 01:21 kernel-smp-2.6.16.53-0.16.x86_64.tar.gz
>
> For saving the stuff back:
> - Unpack the .tar.gz files containing kernel
> - Modify /boot/grub/menu.lst from .grub.lst
> #
>
>
> Merry christmas

Viele Grüße
Eberhard Mönkeberg (emoenke@gwdg.de, em@kki.org)



---------------------------------------------------------------------
To unsubscribe, e-mail: suse-sles-e-unsubscribe@suse.com
For additional commands, e-mail: suse-sles-e-help@suse.com



This archive was generated by hypermail 2.1.7 : Fri Dec 21 2007 - 14:44:34 CET