On Sun, Nov 25, 2012 at 01:53:22PM -0800, Grant wrote
> What are your favorite easy Gentoo tricks?  Stuff that makes your system a
> lot better in some way with only a minimal amount of effort.  I just
> discovered one for xfce4:
> 
> emerge tumbler
> 
> No other config.  Really cool result.

  In general, emerging an add-on for an environment will pull in the
environment as a dependancy.  Similar to your setup, back when I used
blackbox, emerging bbkeys would pull in blackbox as a dependancy.

  My setup takes a little a little setting up, but saves a lot of work
when setting up a new kernel.  I run with 2 kernels available...
1) Production
2) Experimental

  Sometimes they're identical.  Here's a simplified version of my
/etc/lilo.conf with the comment lines stripped out

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

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

install = /boot/boot-menu.b

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


image = /boot/kernel-3.0-production
        root = /dev/sda5
        label = Production
        read-only # read-only for checking
        append = "noexec32=on"

image = /boot/kernel-3.0-experimental
        root = /dev/sda5
        label = Experimental
        read-only # read-only for checking
        append = "noexec32=on"
########################################################

  This gives me a boot menu with "Production" and "Experimental" kernels
to boot from.

  There are also 2 small scripts...
/usr/src/makeover
***IMPORTANT*** The arch/x86 directory is specific to 32-bit i686
kernels.  Adjust accordingly if you use a different architecture.
########################################################
#!/bin/bash
make && \
make modules_install && \
cp arch/x86/boot/bzImage /boot/kernel-3.0-experimental && \
cp System.map /boot/System.map-3.0-experimental && \
cp .config /boot/config-3.0-experimental && \
lilo
########################################################


/usr/src/promote
########################################################
#!/bin/bash
cp /boot/System.map-3.0-experimental /boot/System.map-3.0-production
cp /boot/config-3.0-experimental /boot/config-3.0-production
cp /boot/kernel-3.0-experimental /boot/kernel-3.0-production
lilo
########################################################

  I build a new kernel by running "../makeover" from /usr/src/linux.  It
does the make and overwrites the previous "Experimental" kernel, and
runs lilo.  It does not touch "Production".

  After the "Experimental" kernel has been running trouble-free for a
while, I promote it to "Production", by running "../promote" from
/usr/src/linux.  This copies the experimental kernel over the production
kernel.  At this point, they are identical.  Having a previous working
kernel to fall back to has saved me on a few occasions.

  Note; on a brand new install, lilo will come back with an error on the
very first run of ../makeover, because there is no Production kernel
found.  The first time you run ../makeover, run ../promote immediately
afterwards.  This copies the Experimental kernel to Production, and
satisfies lilo.

-- 
Walter Dnes <waltd...@waltdnes.org>
We are apparently better off trying to avoid udev like the plague.
Linus Torvalds; 2012/10/03 https://lkml.org/lkml/2012/10/3/349

Reply via email to