1 |
On Sat, 2005-01-29 at 10:16 +0100, h2o wrote: |
2 |
> Hi |
3 |
> |
4 |
> i am currently trying out catalyst but have run into several questions |
5 |
> and problems. |
6 |
> |
7 |
> 1. what gets carried over from a stage1 to stage2 while bootstraping? |
8 |
> the faq point out that when seeding a stage3 to create a stage1 the |
9 |
> linux-headers of the seed will be used. but nowhere is described what |
10 |
> happens when progressing from 1 to 2, and from 2 to 3. |
11 |
|
12 |
Well, it isn't documented only because it is identical to what happens |
13 |
when building a Gentoo system. If you want to know more about the |
14 |
building of Gentoo, the Gentoo Handbook is the authoritative source. |
15 |
|
16 |
> 2. if nothing from the stage1 gets carried to the stage2 why should i |
17 |
> even use anything but the stage1 from a gentoo-mirror? |
18 |
|
19 |
Everything from the stage1 gets carried into the stage2 and that is used |
20 |
to bootstrap. If you have 2.4 headers, then you'll bootstrap with 2.4 |
21 |
headers. |
22 |
|
23 |
> at this point i should possibly point out why i want to use catalyst: |
24 |
|
25 |
> i plan to build a stage3 which already includes all packages which i |
26 |
> always need. this could be things like gentoo-sources, grub, metalog, |
27 |
> fcron. this would mean that the choices that i have already made will be |
28 |
> reflected in the stages i use to setup new machines with. i would like |
29 |
> to have several different stages for desktop, server and other |
30 |
> specialised boxes. the desktop version eg would already contain X, my |
31 |
> prefered wm, firefox ... , but this would already be more like a stage4. |
32 |
|
33 |
You honestly shouldn't modify the stages, as you'll find yourself having |
34 |
way more trouble than it is worth, and you definitely won't get support |
35 |
from development on it. The files included in stage1 and stage2 are set |
36 |
in catalyst. The contents of a stage 3 is set by the profile used. You |
37 |
would need to keep your own profile to build your custom stages, but |
38 |
even then none of it would be configured. |
39 |
|
40 |
> i also need some way to replace configuration files inside the stages |
41 |
> with already modified versions of my current machine. (->6) |
42 |
|
43 |
Yeah. |
44 |
|
45 |
Catalyst cannot do this and I can tell you that it probably won't be |
46 |
extended to do this. Catalyst is designed to build custom installation |
47 |
media, not custom stages. |
48 |
|
49 |
> 3. is catalyst intended to create such a stage3/4 or should this rather |
50 |
> be done with some seperate scripts? |
51 |
|
52 |
You would do better to use separate scripts. My suggestion would be to |
53 |
build through a livecd-stage1, then take the packages that you created |
54 |
as your pkgcache and use those for installation. Even then, they |
55 |
wouldn't be customized. One of the main strengths of catalyst is that |
56 |
it produces the same results given the same input, so making |
57 |
modifications is quite a bit harder than you might realize at first. |
58 |
|
59 |
> i am uncertain of how i can customise my stages. i think these ways are |
60 |
> possible: |
61 |
> - modify the profile that is used to build the stage (->4) |
62 |
|
63 |
You could add packages to the "system" part of your profile, but then |
64 |
you would never be able to remove them without making modifications to |
65 |
the profile. This is probably a very bad idea, but would conceivably |
66 |
work. |
67 |
|
68 |
You still would have no configuration on any of your packages. |
69 |
|
70 |
> - when building a livecd options like "livecd/packages" can be used in |
71 |
> the spec file. (->5) |
72 |
|
73 |
This installs them on the LiveCD, but does nothing for creating a stage. |
74 |
You could conceivably modify the temporary catalyst cache of this once |
75 |
you had all of your packages merged, to include your customizations, |
76 |
then tar up the entire thing as a "stage4" tarball. This is probably |
77 |
the closest you would get to what you want, and it would require no |
78 |
catalyst work, only manual work from you. |
79 |
|
80 |
I can also suggest using livecd-stage2 as a way to modify your stage. |
81 |
Since livecd-stage2 is built from livecd-stage1, you would simply feed |
82 |
it a fsscript to make your modifications, along with not cleaning any |
83 |
packages. You could even feed it your kernel config. At this point you |
84 |
would have a binary kernel, created by genkernel, plus your modules. |
85 |
You would need to extract your kernel into the livecd-stage2 temporary |
86 |
catalyst cache's /boot directory and modify your bootloader. You would |
87 |
then tar the livecd-stage2 cache up as your stage4. The only |
88 |
requirement you would have after unpacking the tarball on a new machine |
89 |
would be to re-install the bootloader into the MBR/partition. |
90 |
|
91 |
> instead of using /usr/portage/profiles/default-linux/x68/2004.3/ i made |
92 |
> a copy of it. i made the copy as a subdir and also as a directory on the |
93 |
> same level but both times i got this error: |
94 |
|
95 |
Like I said, profile modification is probably the wrong way to go about |
96 |
it. |
97 |
|
98 |
> !!! ARCH is not set... Are you missing the /etc/make.profile symlink? |
99 |
> !!! Is the symlink correct? Is your portage tree complete? |
100 |
|
101 |
Did you set the profile in your spec file to be this one? |
102 |
|
103 |
> i checked the suggested causes for this but didnt find anything unusal. |
104 |
> /etc/make.profile does not point to the new profile though. when i use |
105 |
> another already profided profile which also isnt symlinked from |
106 |
> /etc/make.profile catalyst procedes past this point without any problems. |
107 |
|
108 |
Catalyst makes the symlink itself based on the profile listed in the |
109 |
spec files. The symlink doesn't matter, as it is relinked by catalyst. |
110 |
|
111 |
> 4. how do i create and use my own profile? is this the correct way to |
112 |
> costumise a stage? |
113 |
|
114 |
Profiles are pretty simple. So long as you have a valid one with valid |
115 |
inheritance and call it properly from your spec file, you should have no |
116 |
problems. However, this is not the way to go around modifying stages. |
117 |
|
118 |
> 5. why are there no options like "livecd/use" for normal stages? or are |
119 |
> they just not listed? |
120 |
|
121 |
They are not there because the stages are not supposed to be changed |
122 |
from what is in the profile. It would break the stage drastically. |
123 |
|
124 |
> 6. how are files that are not related to a package, or that replace |
125 |
> files profides by a package moved into a stage? is there a spec option |
126 |
> for this? |
127 |
|
128 |
They cannot be. |
129 |
|
130 |
> 7. how is the profile used when building a stage1/2? the following |
131 |
> suggests that profile only has an effect on `emerge system`: |
132 |
|
133 |
The profile is pretty much only used to calculate minimal versions of |
134 |
the toolchain and default virtuals during stage1 and stage2. |
135 |
|
136 |
> from /usr/portage/profile/base/packages: |
137 |
> OK, you're staring at this file and you have no idea what these stars |
138 |
> are for. Here's the scoop. An initial "*" marks a package that is part |
139 |
> of the official BASE system profile. If there is a "*" then `emerge |
140 |
> system` will use the line in its calculations of what should be |
141 |
> installed for the base profile. Lines without a "*" prefix will be |
142 |
> ignored for profile system calculations. |
143 |
|
144 |
Correct. The profile only affects the stage3 in this manner. |
145 |
|
146 |
> E2. i sucessfully build a stage1 but when i tried to use it as a seed |
147 |
> for a stage2 it turned out it did not contain gcc. i have used the |
148 |
> unmodified /usr/portage/default-linux/x86/2004.3/. |
149 |
|
150 |
Newer versions of catalyst (> 1.1.1) require a modified bootstrap.sh |
151 |
script that will become the default once 2005.0 is released. You can |
152 |
find the script in /usr/portage/scripts as bootstrap-new.sh and it can |
153 |
simply be renamed to bootstrap.sh to get a working system. The |
154 |
internals of stage building have changed a good bit in catalyst. I |
155 |
would suggest checking out the ChangeLog for the package |
156 |
in /usr/share/doc to try to keep up with each set of changes. |
157 |
|
158 |
> i added "*>=sys-devel/gcc-3.3.4-r1" to |
159 |
> /usr/portage/profiles/default-linux/x86/packages in the hope in getting |
160 |
> a stage1 with gcc only to run into another problem. |
161 |
|
162 |
You have to change it in the profile you're actually calling, otherwise |
163 |
inheritance will most likely overwrite it. Profiles to the right, or |
164 |
further down the tree, have a higher weight than the profiles to the |
165 |
left, or higher up the tree. The 2004.3 profile settings will always be |
166 |
taken over the x86 settings, just as the x86 setting will always be |
167 |
taken over the default-linux settings, etc. |
168 |
|
169 |
> E3. after much copyling finally: |
170 |
> |
171 |
> Running command "/bin/bash /usr/lib/catalyst/targets/stage1/stage1.sh |
172 |
> preclean" |
173 |
> i386-pc-linux-gnu-3.3.5 i386-pc-linux-gnu-3.3.5-hardened |
174 |
> i386-pc-linux-gnu-3.3.5-hardenednopie i386-pc-linux-gnu-3.3.5-hardenednossp |
175 |
> * /usr/bin/gcc-config: Too many arguments! Run /usr/bin/gcc-config |
176 |
> without parameters for help. |
177 |
|
178 |
You're going to have to run one of the newer versions of catalyst and |
179 |
use the modified bootstrap.sh, as I mentioned earlier. |
180 |
|
181 |
> thx ALOT |
182 |
> to anyone willing to enlighten me on any of these questions/problems. |
183 |
> there is quite a few of them i know... but there is also little |
184 |
> documentation :-) |
185 |
|
186 |
Most of what you want isn't documented because it isn't possible or |
187 |
isn't supported. ;] |
188 |
|
189 |
-- |
190 |
Chris Gianelloni |
191 |
Release Engineering - Strategic Lead/QA Manager |
192 |
Games - Developer |
193 |
Gentoo Linux |