Add febootstrap-to-initramfs --files option, version 2.2
[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 [--files=filelist] 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 OPTIONS
24
25 =over 4
26
27 =item --files=filelist
28
29 C<filelist> should be a file containing a list of the files to be
30 added to the initramfs (one per line).  Only those files are added and
31 any others are ignored.
32
33 When the C<--files> option is not given, all files in C<DIR> are added
34 to the initramfs image.
35
36 =back
37
38 =head1 /init
39
40 Normal initramfs images start by executing the program or script
41 called C</init>.  febootstrap does not create this script, so you may
42 wish to, particularly for very minimal bootstraps that don't have the
43 normal SysVinit/upstart machinery.  It's also required if the kernel
44 cannot find a "real" root filesystem (the root filesystem that we
45 built and placed in an initramfs doesn't count).
46
47 Linux will try to run the following commands in turn, unless you
48 override it using the C<init=I<cmd>> kernel option:
49
50 =over 4
51
52 =item *
53
54 /init
55
56 =item *
57
58 /sbin/init
59
60 =item *
61
62 /etc/init
63
64 =item *
65
66 /bin/init
67
68 =item *
69
70 /bin/sh
71
72 =back
73
74 =head1 MEMORY REQUIREMENTS
75
76 Initramfs images are uncompressed by the kernel into memory.  When
77 booting the new system you will need at least enough free RAM to store
78 the B<uncompressed> filesystem plus extra to run any programs.  Bear
79 this in mind when creating very large filesystems.
80
81 =head1 SEE ALSO
82
83 L<febootstrap(8)>,
84 L<cpio(1)>.
85
86 =head1 AUTHORS
87
88 Richard W.M. Jones <rjones @ redhat . com>
89
90 =head1 COPYRIGHT
91
92 (C) Copyright 2009 Red Hat Inc.,
93 L<http://et.redhat.com/~rjones/febootstrap>.
94
95 This program is free software; you can redistribute it and/or modify
96 it under the terms of the GNU General Public License as published by
97 the Free Software Foundation; either version 2 of the License, or
98 (at your option) any later version.
99
100 This program is distributed in the hope that it will be useful,
101 but WITHOUT ANY WARRANTY; without even the implied warranty of
102 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
103 GNU General Public License for more details.
104
105 You should have received a copy of the GNU General Public License
106 along with this program; if not, write to the Free Software
107 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.