summaryrefslogtreecommitdiffstats
path: root/febootstrap-to-initramfs.pod
blob: be5985cd0b9ce428e2e3311556bcfdbd20f0a765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
=head1 NAME

febootstrap-to-initramfs - Convert febootstrap root to initramfs (cpio) file.

=head1 SYNOPSIS

 febootstrap-to-initramfs DIR > initrd.img

=head1 DESCRIPTION

I<febootstrap-to-initramfs> converts the filesystem created by
L<febootstrap(8)> into an initramfs image.  This allows the new system
to be booted on real hardware or inside a QEMU-based virtual machine.

An initramfs image is just a compressed cpio file, so you could
uncompress it with L<gunzip(1)> and use L<cpio(1)> to convert it into
other formats.

The permissions inside the initrd image are corrected automatically
(see the discussion of fakeroot logfile in the L<febootstrap(8)>
page).  You do I<not> need to run this command as root.

=head1 /init

Normal initramfs images start by executing the program or script
called C</init>.  febootstrap does not create this script, so you may
wish to, particularly for very minimal bootstraps that don't have the
normal SysVinit/upstart machinery.  It's also required if the kernel
cannot find a "real" root filesystem (the root filesystem that we
built and placed in an initramfs doesn't count).

Linux will try to run the following commands in turn, unless you
override it using the C<init=I<cmd>> kernel option:

=over 4

=item *

/init

=item *

/sbin/init

=item *

/etc/init

=item *

/bin/init

=item *

/bin/sh

=back

=head1 MEMORY REQUIREMENTS

Initramfs images are uncompressed by the kernel into memory.  When
booting the new system you will need at least enough free RAM to store
the B<uncompressed> filesystem plus extra to run any programs.  Bear
this in mind when creating very large filesystems.

=head1 SEE ALSO

L<febootstrap(8)>,
L<cpio(1)>.

=head1 AUTHORS

Richard W.M. Jones <rjones @ redhat . com>

=head1 COPYRIGHT

(C) Copyright 2009 Red Hat Inc.,
L<http://et.redhat.com/~rjones/febootstrap>.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.