Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] easy Gentoo tricks
Date: Mon, 26 Nov 2012 01:24:42
Message-Id: 20121126012307.GA19556@waltdnes.org
In Reply to: [gentoo-user] easy Gentoo tricks by Grant
1 On Sun, Nov 25, 2012 at 01:53:22PM -0800, Grant wrote
2 > What are your favorite easy Gentoo tricks? Stuff that makes your system a
3 > lot better in some way with only a minimal amount of effort. I just
4 > discovered one for xfce4:
5 >
6 > emerge tumbler
7 >
8 > No other config. Really cool result.
9
10 In general, emerging an add-on for an environment will pull in the
11 environment as a dependancy. Similar to your setup, back when I used
12 blackbox, emerging bbkeys would pull in blackbox as a dependancy.
13
14 My setup takes a little a little setting up, but saves a lot of work
15 when setting up a new kernel. I run with 2 kernels available...
16 1) Production
17 2) Experimental
18
19 Sometimes they're identical. Here's a simplified version of my
20 /etc/lilo.conf with the comment lines stripped out
21
22 ########################################################
23 lba32
24
25 boot = /dev/sda
26 map = /boot/.map
27
28 install = /boot/boot-menu.b
29
30 menu-scheme=Wb
31 prompt
32 timeout=150
33 delay = 50
34
35
36 image = /boot/kernel-3.0-production
37 root = /dev/sda5
38 label = Production
39 read-only # read-only for checking
40 append = "noexec32=on"
41
42 image = /boot/kernel-3.0-experimental
43 root = /dev/sda5
44 label = Experimental
45 read-only # read-only for checking
46 append = "noexec32=on"
47 ########################################################
48
49 This gives me a boot menu with "Production" and "Experimental" kernels
50 to boot from.
51
52 There are also 2 small scripts...
53 /usr/src/makeover
54 ***IMPORTANT*** The arch/x86 directory is specific to 32-bit i686
55 kernels. Adjust accordingly if you use a different architecture.
56 ########################################################
57 #!/bin/bash
58 make && \
59 make modules_install && \
60 cp arch/x86/boot/bzImage /boot/kernel-3.0-experimental && \
61 cp System.map /boot/System.map-3.0-experimental && \
62 cp .config /boot/config-3.0-experimental && \
63 lilo
64 ########################################################
65
66
67 /usr/src/promote
68 ########################################################
69 #!/bin/bash
70 cp /boot/System.map-3.0-experimental /boot/System.map-3.0-production
71 cp /boot/config-3.0-experimental /boot/config-3.0-production
72 cp /boot/kernel-3.0-experimental /boot/kernel-3.0-production
73 lilo
74 ########################################################
75
76 I build a new kernel by running "../makeover" from /usr/src/linux. It
77 does the make and overwrites the previous "Experimental" kernel, and
78 runs lilo. It does not touch "Production".
79
80 After the "Experimental" kernel has been running trouble-free for a
81 while, I promote it to "Production", by running "../promote" from
82 /usr/src/linux. This copies the experimental kernel over the production
83 kernel. At this point, they are identical. Having a previous working
84 kernel to fall back to has saved me on a few occasions.
85
86 Note; on a brand new install, lilo will come back with an error on the
87 very first run of ../makeover, because there is no Production kernel
88 found. The first time you run ../makeover, run ../promote immediately
89 afterwards. This copies the Experimental kernel to Production, and
90 satisfies lilo.
91
92 --
93 Walter Dnes <waltdnes@××××××××.org>
94 We are apparently better off trying to avoid udev like the plague.
95 Linus Torvalds; 2012/10/03 https://lkml.org/lkml/2012/10/3/349

Replies

Subject Author
Re: [gentoo-user] easy Gentoo tricks Bruce Hill <daddy@×××××××××××××××××××××.com>
Re: [gentoo-user] easy Gentoo tricks Volker Armin Hemmann <volkerarmin@××××××××××.com>