lkml.org 
[lkml]   [1998]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [IDEA] Developers: your opinion badly needed ! (Was: [PATCH] /proc/config.gz)
In lists.linux.kernel you write:


>I want to voice my 2 cents...

>Having a /proc/config is a good idea.

>Having to match static files with a running kernel is a bad
>idea...no matter how careful you are, you may make mistakes (assuming
>you can find the file).

>The solution for /boot/*-${VERSION} is not sufficient when
>multiple kernels exists for the same version...

There is the .version file in /usr/src/linux...

I use the following script for maintaining my kernels. Keeps
automatically a history of the last five kernels, keeps .config and
System.map in /boot. Updates lilo.conf and reruns lilo. Installs
the modules. Works great for me, I don't need a /proc/config.

Gerd

---------------------------------------------------------------------
#!/bin/sh
# look for kernel
for d in . /usr/src/linux; do
eval "`head -3 $d/Makefile 2>/dev/null |\
grep -v ^# | grep = | tr -d ' '`"
test "$VERSION" = "" && continue
dir="$d"
break;
done
test "$dir" = "" && exit
# copy kernel
RELEASE="$VERSION.$PATCHLEVEL.$SUBLEVEL-`cat $dir/.version`"
echo
echo "*** [$dir] $RELEASE ***"
echo

kernel=zImage
test -f $dir/arch/i386/boot/bzImage && kernel=bzImage

cp -v $dir/arch/i386/boot/$kernel /boot/vmlinux-$RELEASE
cp -v $dir/System.map /boot/System.map-$RELEASE
cp -v $dir/.config /boot/Config-$RELEASE

# copy modules
cd $dir
make modules_install

# lilo reinstall
cd /boot
count=0
echo
cat /boot/lilo.conf-top > /etc/lilo.conf
cat /boot/message-top > /boot/message
for kernel in `ls -t vmlinux-*`; do
count=$[ $count + 1 ];
release=`echo $kernel | sed 's/vmlinux-//'`
if test "$count" -lt "6"; then
echo "image = /boot/$kernel" >> /etc/lilo.conf
echo " label = $release" >> /etc/lilo.conf
echo " alias = $count" >> /etc/lilo.conf
echo >> /etc/lilo.conf
echo " $count => $release" >> /boot/message
echo "installed linux kernel $kernel ($count)"
else
echo removed: *-$release
rm -f *-$release
fi
done
echo >> /boot/message
# rerun lilo
echo
lilo
--
Gerd Knorr <kraxel@cs.tu-berlin.de>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [from the cache]
©2003-2011 Jasper Spaans