More minimization (now 15.9 MB)
[febootstrap.git] / febootstrap.pod
1 =head1 NAME
2
3 febootstrap - Bootstrap a basic Fedora system (like Debian debootstrap)
4
5 =head1 SYNOPSIS
6
7  febootstrap [--options] REPO TARGET [MIRROR]
8
9 =head1 EXAMPLES
10
11  febootstrap fedora-10 /tmp/f10
12  febootstrap rawhide /tmp/rawhide
13  febootstrap rawhide /tmp/rawhide http://mymirror/rawhide/x86_64/os
14  febootstrap --groupinstall="Mail Server" fedora-10 /tmp/mailserver
15
16 =head1 DESCRIPTION
17
18 febootstrap creates a Fedora root filesystem, based on the Fedora
19 version specified by I<REPO> under the directory specified by
20 I<TARGET>.  Optionally I<MIRROR> can point to a local mirror
21 (otherwise the public Fedora mirrors are used).  I<REPO> names are
22 C<fedora-I<VERSION>> (eg. C<fedora-10>) or C<rawhide>.
23
24 febootstrap does I<not> need to be run as root.  If for some reason
25 you do run it as root, then it works slightly differently and may have
26 side effects such as stopping or starting system daemons.
27
28 For more advanced needs, take a look at L<mock(1)>, C<livecd-creator>
29 and I<thincrust.net>'s C<appliance-creator>.
30
31 The normal output is a root directory located at I<TARGET> and
32 a fakeroot logfile at C<I<TARGET>/fakeroot.log>.
33
34 =head1 OPTIONS
35
36 =over 4
37
38 =item B<-i package>
39
40 =item B<--install=package>
41
42 =item B<-g "group">
43
44 =item B<--groupinstall="group">
45
46 Specify the package or group to install.  To list multiple packages or
47 groups, you must give multiple C<-i> or C<-g> options.  Group names
48 can contain spaces, so use quotes where necessary.
49
50 These are passed directly to C<yum install> or C<yum groupinstall>
51 commands, and thus any dependencies are also resolved by yum.  You can
52 also use shell globs and filenames here, as with ordinary yum.
53
54 If no packages or groups are given, then we install the C<Core> group
55 which is the smallest working Fedora installation.  Use C<yum
56 groupinfo Core> to list the packages currently in the C<Core> group.
57
58 =item B<--no-clean>
59
60 Normally febootstrap will clean up the yum repository
61 (C</var/cache/yum> inside the image).  This contains the downloaded
62 RPMs and metadata.  However if you give the C<--no-clean> option, then
63 the yum repository is left.  This is useful if you want to run further
64 yum commands inside the filesystem by hand.
65
66 =back
67
68 =head1 REPOSITORIES
69
70 You can list available repositories by visiting this URL:
71
72 L<http://mirrors.fedoraproject.org/mirrorlist?repo=help&arch=i386>
73
74 (If necessary replace C<i386> with your architecture, but it seems
75 unlikely that this list will change based on architecture).
76
77 =head1 FAKEROOT LOGFILE
78
79 When febootstrap is run as non-root (the normal case) we use fakeroot
80 so that yum thinks it is running as root.  Fakeroot keeps track of
81 "real" file permissions in a log file which is saved into the target
82 directory as C<I<TARGET>/fakeroot.log>.
83
84 You can use the fakeroot logfile in a number of ways:
85
86 =over 4
87
88 =item *
89
90 Run C<fakeroot -i fakeroot.log I<command>> in order to run a
91 command with the faked file permissions.
92
93 =item *
94
95 Generate an initramfs (compressed cpio) file containing the correct
96 permissions using the tool C<febootstrap-to-initramfs>.
97
98 =item *
99
100 Apply the permissions to the target directory using the forthcoming
101 tool C<febootstrap-fix-root> (requires root).
102
103 =back
104
105 =head1 COMPARISON TO debootstrap
106
107 febootstrap cannot do cross-architecture installs (C<debootstrap
108 --foreign>).  The reason is that C<%pre> and C<%post> scripts cannot
109 run.  It may be possible to defer running of scriptlets (which is
110 basically how debootstrap works), and patches to do this are welcomed.
111
112 febootstrap cannot do 32-on-64 bit installs.  The reason is that
113 fakeroot and fakechroot do not load the correct preload library.  This
114 is really a bug in fakeroot/fakechroot, which we think would be easy
115 to fix.  (debootstrap deals with this case the same as for
116 C<--foreign> installs - see previous point).
117
118 =head1 OTHER RESTRICTIONS AND BUGS
119
120 Some C<%post> scripts do not run correctly.  The most common case is
121 C</sbin/ldconfig>.  Since this binary is statically linked, fakeroot
122 and fakechroot's LD_PRELOAD hack does not work, so effectively
123 ldconfig tries to update the system cache.  You will see the following
124 error:
125
126  /sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
127
128 This error is mostly harmless.  Just run C</sbin/ldconfig> the first
129 time you boot into the newly created Fedora system.
130
131 Another error you will see is with C</usr/sbin/glibc_post_upgrade>
132 which is caused for the same reason - this binary is statically
133 linked.  We have examined what this binary does, and it is not really
134 necessary for installs.  If it makes you happier, you can run it the
135 first time you boot the new system.
136
137 febootstrap recreates the repository anew each time, and this causes
138 yum to download all the RPMs every time.  This is very wasteful, and
139 we should provide a way to cache the repository.
140
141 =head1 HOME PAGE
142
143 L<http://et.redhat.com/~rjones/febootstrap>
144
145 =head1 SEE ALSO
146
147 L<febootstrap-to-initramfs(8)>,
148 L<febootstrap-minimize(8)>,
149 L<fakeroot(1)>,
150 L<fakechroot(1)>,
151 L<yum(8)>,
152 L<rpm(8)>.
153
154 =head1 ALTERNATIVES
155
156 L<mock(1)>,
157 L<http://fedoraproject.org/wiki/FedoraLiveCD/LiveCDHowTo>,
158 L<http://thincrust.net/>,
159 L<debootstrap(8)>,
160 C<ubuntu-vm-builder>.
161
162 =head1 AUTHORS
163
164 Richard W.M. Jones <rjones @ redhat . com>
165
166 =head1 COPYRIGHT
167
168 (C) Copyright 2009 Red Hat Inc.,
169 L<http://et.redhat.com/~rjones/febootstrap>.
170
171 This program is free software; you can redistribute it and/or modify
172 it under the terms of the GNU General Public License as published by
173 the Free Software Foundation; either version 2 of the License, or
174 (at your option) any later version.
175
176 This program is distributed in the hope that it will be useful,
177 but WITHOUT ANY WARRANTY; without even the implied warranty of
178 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
179 GNU General Public License for more details.
180
181 You should have received a copy of the GNU General Public License
182 along with this program; if not, write to the Free Software
183 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.