Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / Documentation / initrd.txt
index 15f1b35..7de1c80 100644 (file)
@@ -67,27 +67,12 @@ initrd adds the following new options:
     as the last process has closed it, all data is freed and /dev/initrd
     can't be opened anymore.
 
     as the last process has closed it, all data is freed and /dev/initrd
     can't be opened anymore.
 
-  root=/dev/ram0
+  root=/dev/ram0   (without devfs)
+  root=/dev/rd/0   (with devfs)
 
     initrd is mounted as root, and the normal boot procedure is followed,
     with the RAM disk still mounted as root.
 
 
     initrd is mounted as root, and the normal boot procedure is followed,
     with the RAM disk still mounted as root.
 
-Compressed cpio images
-----------------------
-
-Recent kernels have support for populating a ramdisk from a compressed cpio
-archive, on such systems, the creation of a ramdisk image doesn't need to
-involve special block devices or loopbacks, you merely create a directory on
-disk with the desired initrd content, cd to that directory, and run (as an
-example):
-
-find . | cpio --quiet -c -o | gzip -9 -n > /boot/imagefile.img
-
-Examining the contents of an existing image file is just as simple:
-
-mkdir /tmp/imagefile
-cd /tmp/imagefile
-gzip -cd /boot/imagefile.img | cpio -imd --quiet
 
 Installation
 ------------
 
 Installation
 ------------
@@ -105,7 +90,8 @@ you're building an install floppy), the root file system creation
 procedure should create the /initrd directory.
 
 If initrd will not be mounted in some cases, its content is still
 procedure should create the /initrd directory.
 
 If initrd will not be mounted in some cases, its content is still
-accessible if the following device has been created:
+accessible if the following device has been created (note that this
+does not work if using devfs):
 
 # mknod /dev/initrd b 1 250 
 # chmod 400 /dev/initrd
 
 # mknod /dev/initrd b 1 250 
 # chmod 400 /dev/initrd
@@ -133,7 +119,8 @@ We'll describe the loopback device method:
     (if space is critical, you may want to use the Minix FS instead of Ext2)
  3) mount the file system, e.g.
     # mount -t ext2 -o loop initrd /mnt
     (if space is critical, you may want to use the Minix FS instead of Ext2)
  3) mount the file system, e.g.
     # mount -t ext2 -o loop initrd /mnt
- 4) create the console device:
+ 4) create the console device (not necessary if using devfs, but it can't
+    hurt to do it anyway):
     # mkdir /mnt/dev
     # mknod /mnt/dev/console c 5 1
  5) copy all the files that are needed to properly use the initrd
     # mkdir /mnt/dev
     # mknod /mnt/dev/console c 5 1
  5) copy all the files that are needed to properly use the initrd
@@ -165,7 +152,12 @@ have to be given:
 
   root=/dev/ram0 init=/linuxrc rw
 
 
   root=/dev/ram0 init=/linuxrc rw
 
-(rw is only necessary if writing to the initrd file system.)
+if not using devfs, or
+
+  root=/dev/rd/0 init=/linuxrc rw
+
+if using devfs. (rw is only necessary if writing to the initrd file
+system.)
 
 With LOADLIN, you simply execute
 
 
 With LOADLIN, you simply execute
 
@@ -225,9 +217,9 @@ following command:
 # exec chroot . what-follows <dev/console >dev/console 2>&1
 
 Where what-follows is a program under the new root, e.g. /sbin/init
 # exec chroot . what-follows <dev/console >dev/console 2>&1
 
 Where what-follows is a program under the new root, e.g. /sbin/init
-If the new root file system will be used with udev and has no valid
-/dev directory, udev must be initialized before invoking chroot in order
-to provide /dev/console.
+If the new root file system will be used with devfs and has no valid
+/dev directory, devfs must be mounted before invoking chroot in order to
+provide /dev/console.
 
 Note: implementation details of pivot_root may change with time. In order
 to ensure compatibility, the following points should be observed:
 
 Note: implementation details of pivot_root may change with time. In order
 to ensure compatibility, the following points should be observed:
@@ -244,7 +236,7 @@ Now, the initrd can be unmounted and the memory allocated by the RAM
 disk can be freed:
 
 # umount /initrd
 disk can be freed:
 
 # umount /initrd
-# blockdev --flushbufs /dev/ram0
+# blockdev --flushbufs /dev/ram0    # /dev/rd/0 if using devfs
 
 It is also possible to use initrd with an NFS-mounted root, see the
 pivot_root(8) man page for details.
 
 It is also possible to use initrd with an NFS-mounted root, see the
 pivot_root(8) man page for details.