Gentoo Archives: gentoo-soc

From: Eric Thibodeau <kyron@××××××××.com>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Re: GSoc 2009 : Making the cluster LiveCD bootable from USB
Date: Mon, 30 Mar 2009 13:06:46
Message-Id: 49D0C3E3.6000802@neuralbs.com
In Reply to: Re: [gentoo-soc] Re: GSoc 2009 : Making the cluster LiveCD bootable from USB by Tom Stellard
1 Tom Stellard wrote:
2 > On Sun, Mar 29, 2009 at 7:45 PM, Eric Thibodeau <kyron@××××××××.com> wrote:
3 >
4 >> I'll top-post this one since there are some errors in the LiveCD-Howto (a
5 >> mix of two approaches I had). The HOWTO doesn't take clearly into
6 >> consideration the fact that there can actually be 2 resulting CDs (normal
7 >> and minimal). The process goes as follows:
8 >>
9 >> A) Build NFSroot Image:
10 >> 1,2,3: build stage images
11 >> 4: build nfstoot image
12 >> The real PITA here is generally kernel + AuFS related. The package and
13 >> kernel cache deletion steps are _required_ between rebuild, otherwise
14 >> catalyst uses cached packages and things just won't work. There might be new
15 >> features to fix that in newer catalysts.
16 >>
17 >>
18 >
19 > When you say the package and kernel cache deletion steps are you
20 > talking about this command:
21 > find /var/tmp/catalyst/packages/ -regextype posix-extended -regex
22 > '.*(beowulf|aufs|ldap-auth|torque|diradm).*' -exec rm -f {} \
23 >
24 > Should I delete the caches after every call to catalyst, or just after
25 > LiveCD steps 3 and 4?
26 >
27 Deleting the contents of /var/tmp/catalyst/kerncache/ was needed to
28 force rebuilding the kernel-dependent modules such as AuFS. This implies
29 NFSRoot stage4 or livecd's livecd-stage2. This was the only way I had
30 found to force catalyst to rebuild the modules correctly. IIRC, simply
31 deleting the binary package didn't work because catalyst wouldn't mount
32 the kerncache folder if kernel building wasn't required (or something to
33 that effect). The result was that the emerge call on kernel-dependent
34 packages would then fail.
35 >
36 >> B) Build LiveCD
37 >> 1,2,3: build stage images selecting the spec files that reflect the
38 >> desired end CD (minimal or with desktop). The main difference are some USE
39 >> flags, I'm not even sure the differentiation is still relevant.
40 >> 4: build livecd-stage1
41 >> 5: a) bind-mount the nfsroot image into the livecd's playgournd
42 >> b) build the livecd-stage2 using catalyst.
43 >>
44 >> The rational behind 5 a) is that the LiveCD is actually built in 5 b) and
45 >> pulls in everything that will reside in
46 >> /var/git/clustering-livecd/catalyst/livecd/2008.0/overlay/ . This is the way
47 >> to include "extra files" in the CD which aren't part of a regular Gentoo
48 >> system.
49 >>
50 >> I'm sorry for the confusion, hope this clarifies the process and answers
51 >> your questions.
52 >>
53 >> Eric
54 >>
55 >> Tom Stellard wrote:
56 >>
57 >>> I was finally able to build an x86 live CD image, but there are a few
58 >>> things about the build process I don't understand. Here are the
59 >>> directions for building the live CD as I understand them:
60 >>>
61 >>> 1. Build nfsroot using these spec files in this order: stage1.spec,
62 >>> stage2.spec, stage3.spec, nfsroot_stage4.spec
63 >>>
64 >>> 2. Bind mount nfsroot to
65 >>>
66 >>> /var/git/clustering-livecd/catalyst/livecd/2008.0/overlay/tftproot/nfsroot/x86
67 >>>
68 >>> 3. Start building the live CD using these spec files in this order:
69 >>> stage1.spec stage2-desktop.spec stage3-desktop.spec
70 >>>
71 >>> 4.Unmount nfsroot
72 >>>
73 >>> 5. Run catalyst with these spec files: nfsroot_stage4.spec
74 >>> livecd-stage1-minimal.spec
75 >>>
76 >>> 6. Bind mount nfsroot again
77 >>>
78 >>> 7. Run catalyst with this spec file: livecd-stage2-minimal.spec
79 >>>
80 >>> My questions are:
81 >>> Why is it necessary to bind mount nfsroot in step 2?
82 >>> Why do we run nfsroot_stage4.spec again in step 5?
83 >>>
84 >>> Thanks.
85 >>>
86 >>> -Tom Stellard
87 >>>
88 >>>
89 >>>
90 >>
91 >>
92 >
93 >