On Fri, May 22, 2015 at 11:29:40PM +0100, Mick wrote
> On Friday 22 May 2015 23:13:06 Neil Bothwick wrote:
> > 
> > make install does it exactly the way you are doing it, but faster and
> > less prone to error.
> 
> Hmm ... I may have used it the wrong way quite a few years ago, but
> it would only keep two kernels at a time or something like that.
> That made me carry on copying kernel files into boot manually.
> In this way at least I know where I put them and what options I pass
> on to them.

  I've automated that process.  I have 2 kernels, "experimental" and
"production".  I use 2 scripts "makeover" and "promote".  When I first
build a new kernel, I run the the "makeover" script, which does make and
overwrites the previous experimental kernel.  Note that this script
*MUST* be executed from the /usr/src/linux/ directory.

#!/bin/bash
make && \
make modules_install && \
cp  arch/x86_64/boot/bzImage /boot/kernel.experimental && \
cp System.map /boot/System.map.experimental && \
cp .config /boot/config.experimental && \
lilo

  When the "experimental" kernel has been running OK for a couple of
weeks, I promote it to "production" with the "promote" script...

#!/bin/bash
cp /boot/System.map.experimental /boot/System.map.production
cp /boot/config.experimental /boot/config.production
cp /boot/kernel.experimental /boot/kernel.production
lilo

  This hooks into my /etc/lilo.conf menu, shown here with comment lines
removed...

###########################################
lba32

boot = /dev/sda
map = /boot/.map

install = /boot/boot-menu.b

menu-scheme=Wb
prompt
timeout=150
delay = 50

image = /boot/kernel.production
        root = /dev/sda5
        label = Production
        read-only # read-only for checking
        append = "noexec=on net.ifnames=0"

image = /boot/kernel.experimental
        root = /dev/sda5
        label = Experimental
        read-only # read-only for checking
        append = "noexec=on net.ifnames=0"
###########################################

  This has saved me on occasion, allowing me to fall back to a working
"production" kernel when things go badly with "experimental".  I then
run my "demote" script.

#!/bin/bash
cp /boot/System.map.production /boot/System.map.experimental
cp /boot/config.production /boot/config.experimental
cp /boot/kernel.production /boot/kernel.experimental
lilo

  I also have my kernels set up so that I can...

zcat /proc/config.gz > /usr/src/linux/.config

...to retrieve a known working .config file from the currently running
kernel.  This puts me back to square 1 with the experimental kernel.

-- 
Walter Dnes <waltd...@waltdnes.org>
I don't run "desktop environments"; I run useful applications

Reply via email to