From: Guilherme Destefani <guilhermedestefani@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Documentation/initrd.txt update
Date: Mon, 03 Jul 2006 13:50:37 -0300 [thread overview]
Message-ID: <1151945437.5699.13.camel@homemfera.perkons.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 257 bytes --]
The cpio initrd isn't documented in
linux-2.6.17/Documentation/initrd.txt.
(but it is in
linux-2.6.17/Documentation/filesystems/ramfs-rootfs-initramfs.txt)
initrd.txt shouldn't be updated?
Two possible updates follow, use patch -p1 inside the kernel tree.
[-- Attachment #2: Type: text/x-patch, Size: 854 bytes --]
--- linux-2.6.17.old/Documentation/initrd.txt 2006-06-17 22:49:35.000000000 -0300
+++ linux-2.6.17/Documentation/initrd.txt 2006-07-03 13:29:00.000000000 -0300
@@ -104,11 +104,13 @@
Third, you have to create the RAM disk image. This is done by creating a
file system on a block device, copying files to it as needed, and then
copying the content of the block device to the initrd file. With recent
-kernels, at least three types of devices are suitable for that:
+kernels, at least four types of devices are suitable for that:
- a floppy disk (works everywhere but it's painfully slow)
- a RAM disk (fast, but allocates physical memory)
- a loopback device (the most elegant solution)
+ - a cpio containing the initrd files, described in
+ Documentation/filesystems/ramfs-rootfs-initramfs.txt
We'll describe the loopback device method:
[-- Attachment #3: Type: text/x-patch, Size: 1146 bytes --]
--- linux-2.6.17.old/Documentation/initrd.txt 2006-07-03 13:25:35.000000000 -0300
+++ linux-2.6.17/Documentation/initrd.txt 2006-07-03 13:39:54.000000000 -0300
@@ -140,6 +140,25 @@
compressed
# gzip -9 initrd
+It is also possible to use a cpio archive (instead of a file system),
+and pack all the files inside it.
+The kernel will create a ramdisk, unpack the contents of the initrd
+ and execute /init.
+
+To create such a file:
+
+ 1) Enter the directory containig the unpacked initrd files:
+ # cd /path/to/initrd
+ 2) Create the cpio file (whithout any leading path).
+ 3) Create a cpio file.
+ 4) Compress it with gzip to save space.
+ steps 2,3 and 4 can be archieved with:
+ find -printf "%P\n" |cpio -oc | gzip -9 > /full_path_to/initrd.img
+ |-------step 2------|-step 3--|------------step 4-----------------|
+
+Or use usr/gen_init_cpio
+(see Documentation/filesystems/ramfs-rootfs-initramfs.txt)
+
For experimenting with initrd, you may want to take a rescue floppy and
only add a symbolic link from /linuxrc to /bin/sh. Alternatively, you
can try the experimental newlib environment [2] to create a small
next reply other threads:[~2006-07-03 16:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-03 16:50 Guilherme Destefani [this message]
2006-07-03 20:24 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1151945437.5699.13.camel@homemfera.perkons.net \
--to=guilhermedestefani@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®