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