Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [~and64] Headsup for googled the previous one to vmlinu-chrome users
Date: Sat, 23 May 2015 04:22:05
Message-Id: 20150523042140.GA31856@waltdnes.org
In Reply to: Re: [gentoo-user] [~and64] Headsup for googled the previous one to vmlinu-chrome users by Mick
1 On Fri, May 22, 2015 at 11:29:40PM +0100, Mick wrote
2 > On Friday 22 May 2015 23:13:06 Neil Bothwick wrote:
3 > >
4 > > make install does it exactly the way you are doing it, but faster and
5 > > less prone to error.
6 >
7 > Hmm ... I may have used it the wrong way quite a few years ago, but
8 > it would only keep two kernels at a time or something like that.
9 > That made me carry on copying kernel files into boot manually.
10 > In this way at least I know where I put them and what options I pass
11 > on to them.
12
13 I've automated that process. I have 2 kernels, "experimental" and
14 "production". I use 2 scripts "makeover" and "promote". When I first
15 build a new kernel, I run the the "makeover" script, which does make and
16 overwrites the previous experimental kernel. Note that this script
17 *MUST* be executed from the /usr/src/linux/ directory.
18
19 #!/bin/bash
20 make && \
21 make modules_install && \
22 cp arch/x86_64/boot/bzImage /boot/kernel.experimental && \
23 cp System.map /boot/System.map.experimental && \
24 cp .config /boot/config.experimental && \
25 lilo
26
27 When the "experimental" kernel has been running OK for a couple of
28 weeks, I promote it to "production" with the "promote" script...
29
30 #!/bin/bash
31 cp /boot/System.map.experimental /boot/System.map.production
32 cp /boot/config.experimental /boot/config.production
33 cp /boot/kernel.experimental /boot/kernel.production
34 lilo
35
36 This hooks into my /etc/lilo.conf menu, shown here with comment lines
37 removed...
38
39 ###########################################
40 lba32
41
42 boot = /dev/sda
43 map = /boot/.map
44
45 install = /boot/boot-menu.b
46
47 menu-scheme=Wb
48 prompt
49 timeout=150
50 delay = 50
51
52 image = /boot/kernel.production
53 root = /dev/sda5
54 label = Production
55 read-only # read-only for checking
56 append = "noexec=on net.ifnames=0"
57
58 image = /boot/kernel.experimental
59 root = /dev/sda5
60 label = Experimental
61 read-only # read-only for checking
62 append = "noexec=on net.ifnames=0"
63 ###########################################
64
65 This has saved me on occasion, allowing me to fall back to a working
66 "production" kernel when things go badly with "experimental". I then
67 run my "demote" script.
68
69 #!/bin/bash
70 cp /boot/System.map.production /boot/System.map.experimental
71 cp /boot/config.production /boot/config.experimental
72 cp /boot/kernel.production /boot/kernel.experimental
73 lilo
74
75 I also have my kernels set up so that I can...
76
77 zcat /proc/config.gz > /usr/src/linux/.config
78
79 ...to retrieve a known working .config file from the currently running
80 kernel. This puts me back to square 1 with the experimental kernel.
81
82 --
83 Walter Dnes <waltdnes@××××××××.org>
84 I don't run "desktop environments"; I run useful applications