TODO file added with some ideas.
[febootstrap.git] / febootstrap-to-initramfs.pod
1 =head1 NAME
2
3 febootstrap-to-initramfs - Convert febootstrap root to initramfs (cpio) file.
4
5 =head1 SYNOPSIS
6
7  febootstrap-to-initramfs DIR > initrd.img
8
9 =head1 DESCRIPTION
10
11 I<febootstrap-to-initramfs> converts the filesystem created by
12 L<febootstrap(8)> into an initramfs image.  This allows the new system
13 to be booted on real hardware or inside a QEMU-based virtual machine.
14
15 An initramfs image is just a compressed cpio file, so you could
16 uncompress it with L<gunzip(1)> and use L<cpio(1)> to convert it into
17 other formats.
18
19 The permissions inside the initrd image are corrected automatically
20 (see the discussion of fakeroot logfile in the L<febootstrap(8)>
21 page).  You do I<not> need to run this command as root.
22
23 =head1 /init
24
25 Normal initramfs images start by executing the program or script
26 called C</init>.  febootstrap does not create this script, so you may
27 wish to, particularly for very minimal bootstraps that don't have the
28 normal SysVinit/upstart machinery.  It's also required if the kernel
29 cannot find a "real" root filesystem (the root filesystem that we
30 built and placed in an initramfs doesn't count).
31
32 Linux will try to run the following commands in turn, unless you
33 override it using the C<init=I<cmd>> kernel option:
34
35 =over 4
36
37 =item *
38
39 /init
40
41 =item *
42
43 /sbin/init
44
45 =item *
46
47 /etc/init
48
49 =item *
50
51 /bin/init
52
53 =item *
54
55 /bin/sh
56
57 =back
58
59 =head1 MEMORY REQUIREMENTS
60
61 Initramfs images are uncompressed by the kernel into memory.  When
62 booting the new system you will need at least enough free RAM to store
63 the B<uncompressed> filesystem plus extra to run any programs.  Bear
64 this in mind when creating very large filesystems.
65
66 =head1 SEE ALSO
67
68 L<febootstrap(8)>,
69 L<cpio(1)>.
70
71 =head1 AUTHORS
72
73 Richard W.M. Jones <rjones @ redhat . com>
74
75 =head1 COPYRIGHT
76
77 (C) Copyright 2009 Red Hat Inc.,
78 L<http://et.redhat.com/~rjones/febootstrap>.
79
80 This program is free software; you can redistribute it and/or modify
81 it under the terms of the GNU General Public License as published by
82 the Free Software Foundation; either version 2 of the License, or
83 (at your option) any later version.
84
85 This program is distributed in the hope that it will be useful,
86 but WITHOUT ANY WARRANTY; without even the implied warranty of
87 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
88 GNU General Public License for more details.
89
90 You should have received a copy of the GNU General Public License
91 along with this program; if not, write to the Free Software
92 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.