aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/early-userspace/README6
-rw-r--r--Documentation/filesystems/ramfs-rootfs-initramfs.txt14
-rw-r--r--Documentation/initrd.txt12
-rw-r--r--Documentation/ramdisk.txt17
4 files changed, 27 insertions, 22 deletions
diff --git a/Documentation/early-userspace/README b/Documentation/early-userspace/README
index cddbac456c29..766d320c8eb6 100644
--- a/Documentation/early-userspace/README
+++ b/Documentation/early-userspace/README
@@ -19,7 +19,7 @@ It consists of several major infrastructure components:
19- klibc, a userspace C library, currently packaged separately, that is 19- klibc, a userspace C library, currently packaged separately, that is
20 optimized for correctness and small size. 20 optimized for correctness and small size.
21 21
22The cpio file format used by initramfs is the "newc" (aka "cpio -c") 22The cpio file format used by initramfs is the "newc" (aka "cpio -H newc")
23format, and is documented in the file "buffer-format.txt". There are 23format, and is documented in the file "buffer-format.txt". There are
24two ways to add an early userspace image: specify an existing cpio 24two ways to add an early userspace image: specify an existing cpio
25archive to be used as the image or have the kernel build process build 25archive to be used as the image or have the kernel build process build
@@ -44,7 +44,7 @@ The image is specified as one or more sources in
44CONFIG_INITRAMFS_SOURCE. Sources can be either directories or files - 44CONFIG_INITRAMFS_SOURCE. Sources can be either directories or files -
45cpio archives are *not* allowed when building from sources. 45cpio archives are *not* allowed when building from sources.
46 46
47A source directory will have it and all of it's contents packaged. The 47A source directory will have it and all of its contents packaged. The
48specified directory name will be mapped to '/'. When packaging a 48specified directory name will be mapped to '/'. When packaging a
49directory, limited user and group ID translation can be performed. 49directory, limited user and group ID translation can be performed.
50INITRAMFS_ROOT_UID can be set to a user ID that needs to be mapped to 50INITRAMFS_ROOT_UID can be set to a user ID that needs to be mapped to
@@ -144,7 +144,7 @@ c) using initramfs. The call to prepare_namespace() must be skipped.
144 initrd format, an cpio archive. It must be called "/init". This binary 144 initrd format, an cpio archive. It must be called "/init". This binary
145 is responsible to do all the things prepare_namespace() would do. 145 is responsible to do all the things prepare_namespace() would do.
146 146
147 To remain backwards compatibility, the /init binary will only run if it 147 To maintain backwards compatibility, the /init binary will only run if it
148 comes via an initramfs cpio archive. If this is not the case, 148 comes via an initramfs cpio archive. If this is not the case,
149 init/main.c:init() will run prepare_namespace() to mount the final root 149 init/main.c:init() will run prepare_namespace() to mount the final root
150 and exec one of the predefined init binaries. 150 and exec one of the predefined init binaries.
diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.txt b/Documentation/filesystems/ramfs-rootfs-initramfs.txt
index 25981e2e51be..339c6a4f220e 100644
--- a/Documentation/filesystems/ramfs-rootfs-initramfs.txt
+++ b/Documentation/filesystems/ramfs-rootfs-initramfs.txt
@@ -8,7 +8,7 @@ What is ramfs?
8 8
9Ramfs is a very simple filesystem that exports Linux's disk caching 9Ramfs is a very simple filesystem that exports Linux's disk caching
10mechanisms (the page cache and dentry cache) as a dynamically resizable 10mechanisms (the page cache and dentry cache) as a dynamically resizable
11ram-based filesystem. 11RAM-based filesystem.
12 12
13Normally all files are cached in memory by Linux. Pages of data read from 13Normally all files are cached in memory by Linux. Pages of data read from
14backing store (usually the block device the filesystem is mounted on) are kept 14backing store (usually the block device the filesystem is mounted on) are kept
@@ -34,7 +34,7 @@ ramfs and ramdisk:
34------------------ 34------------------
35 35
36The older "ram disk" mechanism created a synthetic block device out of 36The older "ram disk" mechanism created a synthetic block device out of
37an area of ram and used it as backing store for a filesystem. This block 37an area of RAM and used it as backing store for a filesystem. This block
38device was of fixed size, so the filesystem mounted on it was of fixed 38device was of fixed size, so the filesystem mounted on it was of fixed
39size. Using a ram disk also required unnecessarily copying memory from the 39size. Using a ram disk also required unnecessarily copying memory from the
40fake block device into the page cache (and copying changes back out), as well 40fake block device into the page cache (and copying changes back out), as well
@@ -46,8 +46,8 @@ unnecessary work for the CPU, and pollutes the CPU caches. (There are tricks
46to avoid this copying by playing with the page tables, but they're unpleasantly 46to avoid this copying by playing with the page tables, but they're unpleasantly
47complicated and turn out to be about as expensive as the copying anyway.) 47complicated and turn out to be about as expensive as the copying anyway.)
48More to the point, all the work ramfs is doing has to happen _anyway_, 48More to the point, all the work ramfs is doing has to happen _anyway_,
49since all file access goes through the page and dentry caches. The ram 49since all file access goes through the page and dentry caches. The RAM
50disk is simply unnecessary, ramfs is internally much simpler. 50disk is simply unnecessary; ramfs is internally much simpler.
51 51
52Another reason ramdisks are semi-obsolete is that the introduction of 52Another reason ramdisks are semi-obsolete is that the introduction of
53loopback devices offered a more flexible and convenient way to create 53loopback devices offered a more flexible and convenient way to create
@@ -103,7 +103,7 @@ All this differs from the old initrd in several ways:
103 initramfs archive is a gzipped cpio archive (like tar only simpler, 103 initramfs archive is a gzipped cpio archive (like tar only simpler,
104 see cpio(1) and Documentation/early-userspace/buffer-format.txt). The 104 see cpio(1) and Documentation/early-userspace/buffer-format.txt). The
105 kernel's cpio extraction code is not only extremely small, it's also 105 kernel's cpio extraction code is not only extremely small, it's also
106 __init data that can be discarded during the boot process. 106 __init text and data that can be discarded during the boot process.
107 107
108 - The program run by the old initrd (which was called /initrd, not /init) did 108 - The program run by the old initrd (which was called /initrd, not /init) did
109 some setup and then returned to the kernel, while the init program from 109 some setup and then returned to the kernel, while the init program from
@@ -220,7 +220,7 @@ device) but the separate packaging of initrd (which is nice if you have
220non-GPL code you'd like to run from initramfs, without conflating it with 220non-GPL code you'd like to run from initramfs, without conflating it with
221the GPL licensed Linux kernel binary). 221the GPL licensed Linux kernel binary).
222 222
223It can also be used to supplement the kernel's built-in initamfs image. The 223It can also be used to supplement the kernel's built-in initramfs image. The
224files in the external archive will overwrite any conflicting files in 224files in the external archive will overwrite any conflicting files in
225the built-in initramfs archive. Some distributors also prefer to customize 225the built-in initramfs archive. Some distributors also prefer to customize
226a single kernel image with task-specific initramfs images, without recompiling. 226a single kernel image with task-specific initramfs images, without recompiling.
@@ -339,7 +339,7 @@ smooth transition and allowing early boot functionality to gradually move to
339The move to early userspace is necessary because finding and mounting the real 339The move to early userspace is necessary because finding and mounting the real
340root device is complex. Root partitions can span multiple devices (raid or 340root device is complex. Root partitions can span multiple devices (raid or
341separate journal). They can be out on the network (requiring dhcp, setting a 341separate journal). They can be out on the network (requiring dhcp, setting a
342specific mac address, logging into a server, etc). They can live on removable 342specific MAC address, logging into a server, etc). They can live on removable
343media, with dynamically allocated major/minor numbers and persistent naming 343media, with dynamically allocated major/minor numbers and persistent naming
344issues requiring a full udev implementation to sort out. They can be 344issues requiring a full udev implementation to sort out. They can be
345compressed, encrypted, copy-on-write, loopback mounted, strangely partitioned, 345compressed, encrypted, copy-on-write, loopback mounted, strangely partitioned,
diff --git a/Documentation/initrd.txt b/Documentation/initrd.txt
index d3dc505104da..74f68b35f7c1 100644
--- a/Documentation/initrd.txt
+++ b/Documentation/initrd.txt
@@ -80,8 +80,8 @@ Compressed cpio images
80---------------------- 80----------------------
81 81
82Recent kernels have support for populating a ramdisk from a compressed cpio 82Recent kernels have support for populating a ramdisk from a compressed cpio
83archive, on such systems, the creation of a ramdisk image doesn't need to 83archive. On such systems, the creation of a ramdisk image doesn't need to
84involve special block devices or loopbacks, you merely create a directory on 84involve special block devices or loopbacks; you merely create a directory on
85disk with the desired initrd content, cd to that directory, and run (as an 85disk with the desired initrd content, cd to that directory, and run (as an
86example): 86example):
87 87
@@ -293,7 +293,7 @@ information as small as possible. In this case, a common initrd could be
293generated with all the necessary modules. Then, only /sbin/init or a file 293generated with all the necessary modules. Then, only /sbin/init or a file
294read by it would have to be different. 294read by it would have to be different.
295 295
296A third scenario are more convenient recovery disks, because information 296A third scenario is more convenient recovery disks, because information
297like the location of the root FS partition doesn't have to be provided at 297like the location of the root FS partition doesn't have to be provided at
298boot time, but the system loaded from initrd can invoke a user-friendly 298boot time, but the system loaded from initrd can invoke a user-friendly
299dialog and it can also perform some sanity checks (or even some form of 299dialog and it can also perform some sanity checks (or even some form of
@@ -339,8 +339,8 @@ the new, supported mechanism is called "pivot_root".
339Mixed change_root and pivot_root mechanism 339Mixed change_root and pivot_root mechanism
340------------------------------------------ 340------------------------------------------
341 341
342In case you did not want to use root=/dev/ram0 to trig the pivot_root mechanism, 342In case you did not want to use root=/dev/ram0 to trigger the pivot_root
343you may create both /linuxrc and /sbin/init in your initrd image. 343mechanism, you may create both /linuxrc and /sbin/init in your initrd image.
344 344
345/linuxrc would contain only the following: 345/linuxrc would contain only the following:
346 346
@@ -350,7 +350,7 @@ echo 0x0100 >/proc/sys/kernel/real-root-dev
350umount -n /proc 350umount -n /proc
351 351
352Once linuxrc exited, the kernel would mount again your initrd as root, 352Once linuxrc exited, the kernel would mount again your initrd as root,
353this time executing /sbin/init. Again, it would be duty of this init 353this time executing /sbin/init. Again, it would be the duty of this init
354to build the right environment (maybe using the root= device passed on 354to build the right environment (maybe using the root= device passed on
355the cmdline) before the final execution of the real /sbin/init. 355the cmdline) before the final execution of the real /sbin/init.
356 356
diff --git a/Documentation/ramdisk.txt b/Documentation/ramdisk.txt
index 52f75b7d51c2..33e987df071e 100644
--- a/Documentation/ramdisk.txt
+++ b/Documentation/ramdisk.txt
@@ -22,16 +22,21 @@ The RAM disk dynamically grows as more space is required. It does this by using
22RAM from the buffer cache. The driver marks the buffers it is using as dirty 22RAM from the buffer cache. The driver marks the buffers it is using as dirty
23so that the VM subsystem does not try to reclaim them later. 23so that the VM subsystem does not try to reclaim them later.
24 24
25Also, the RAM disk supports up to 16 RAM disks out of the box, and can 25The RAM disk supports up to 16 RAM disks by default, and can be reconfigured
26be reconfigured to support up to 255 RAM disks - change "#define NUM_RAMDISKS" 26to support an unlimited number of RAM disks (at your own risk). Just change
27in drivers/block/rd.c. To use RAM disk support with your system, run 27the configuration symbol BLK_DEV_RAM_COUNT in the Block drivers config menu
28'./MAKEDEV ram' from the /dev directory. RAM disks are all major number 1, and 28and (re)build the kernel.
29start with minor number 0 for /dev/ram0, etc. If used, modern kernels use 29
30/dev/ram0 for an initrd. 30To use RAM disk support with your system, run './MAKEDEV ram' from the /dev
31directory. RAM disks are all major number 1, and start with minor number 0
32for /dev/ram0, etc. If used, modern kernels use /dev/ram0 for an initrd.
31 33
32The old "ramdisk=<ram_size>" has been changed to "ramdisk_size=<ram_size>" to 34The old "ramdisk=<ram_size>" has been changed to "ramdisk_size=<ram_size>" to
33make it clearer. The original "ramdisk=<ram_size>" has been kept around for 35make it clearer. The original "ramdisk=<ram_size>" has been kept around for
34compatibility reasons, but it may be removed in the future. 36compatibility reasons, but it may be removed in the future.
37There are also config symbols (in the Block drivers config menu) for these
38variables: BLK_DEV_RAM_SIZE defaults to 4096 and BLK_DEV_RAM_BLOCKSIZE
39defaults to 1024.
35 40
36The new RAM disk also has the ability to load compressed RAM disk images, 41The new RAM disk also has the ability to load compressed RAM disk images,
37allowing one to squeeze more programs onto an average installation or 42allowing one to squeeze more programs onto an average installation or