<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://mail.knoppix.net/wiki3/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://mail.knoppix.net/wiki3/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DoubleSlash</id>
		<title>Knoppix Documentation Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://mail.knoppix.net/wiki3/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DoubleSlash"/>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Special:Contributions/DoubleSlash"/>
		<updated>2026-09-18T06:21:22Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>https://mail.knoppix.net/wiki/Initrd</id>
		<title>Initrd</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Initrd"/>
				<updated>2011-01-27T12:20:04Z</updated>
		
		<summary type="html">&lt;p&gt;DoubleSlash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;relacelcnal&lt;br /&gt;
NAME&lt;br /&gt;
: initrd - boot loader initialized RAM disk&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
: The  special file /dev/initrd is a read-only block device.&lt;br /&gt;
: Device /dev/initrd is a RAM disk that is initialized (e.g.&lt;br /&gt;
: loaded)  by  the boot loader before the kernel is started.&lt;br /&gt;
: The kernel then can use the the block device /dev/initrd's&lt;br /&gt;
: contents for a two phased system boot-up.&lt;br /&gt;
&lt;br /&gt;
: In  the  first  boot-up  phase,  the  kernel starts up and&lt;br /&gt;
: mounts an initial root file-system from  the  contents  of&lt;br /&gt;
: /dev/initrd   (e.g.  RAM  disk  initialized  by  the  boot&lt;br /&gt;
: loader).  In the second phase, additional drivers or other&lt;br /&gt;
: modules  are  loaded  from  the initial root device's con-&lt;br /&gt;
: tents.  After loading the additional modules, a  new  root&lt;br /&gt;
: file  system (i.e. the normal root file system) is mounted&lt;br /&gt;
: from a different device.&lt;br /&gt;
&lt;br /&gt;
BOOT-UP OPERATION&lt;br /&gt;
;        When booting up with initrd, the system boots as follows : 1.  The  boot  loader  loads  the  kernel  program   and&lt;br /&gt;
: /dev/initrd's contents into memory.&lt;br /&gt;
&lt;br /&gt;
: 2. On kernel startup, the kernel uncompresses and copies&lt;br /&gt;
: the contents  of  the  device  /dev/initrd  onto  device&lt;br /&gt;
: /dev/ram0 and then frees the memory used by /dev/initrd.&lt;br /&gt;
&lt;br /&gt;
: 3. The kernel then read-write mounts device /dev/ram0 as&lt;br /&gt;
: the initial root file system.&lt;br /&gt;
&lt;br /&gt;
: 4.  If the indicated normal root file system is also the&lt;br /&gt;
: initial root file-system (e.g.   /dev/ram0  )  then  the&lt;br /&gt;
: kernel  skips  to  the  last  step  for  the  usual boot&lt;br /&gt;
: sequence.&lt;br /&gt;
&lt;br /&gt;
: 5. If the executable file /linuxrc  is  present  in  the&lt;br /&gt;
: initial  root file-system, /linuxrc is executed with uid&lt;br /&gt;
: 0.  (The file /linuxrc must have executable  permission.&lt;br /&gt;
: The file /linuxrc can be any valid executable, including&lt;br /&gt;
: a shell script.)&lt;br /&gt;
&lt;br /&gt;
: 6. If /linuxrc is not executed or when  /linuxrc  termi-&lt;br /&gt;
: nates,  the  normal  root  file  system is mounted.  (If&lt;br /&gt;
: /linuxrc exits with any file-systems mounted on the ini-&lt;br /&gt;
: tial  root  file-system, then the behavior of the kernel&lt;br /&gt;
: is UNSPECIFIED.  See the NOTES section for  the  current&lt;br /&gt;
: kernel behavior.)&lt;br /&gt;
&lt;br /&gt;
: 7. If the normal root file has directory /initrd, device&lt;br /&gt;
: /dev/ram0 is moved from  /  to  /initrd.   Otherwise  if&lt;br /&gt;
: directory  /initrd  does  not  exist device /dev/ram0 is&lt;br /&gt;
: unmounted.  (When moved from / to /initrd, /dev/ram0  is&lt;br /&gt;
: not unmounted and therefore processes can remain running&lt;br /&gt;
: from /dev/ram0.  If directory /initrd does not exist  on&lt;br /&gt;
: the  normal  root  file-system  and any processes remain&lt;br /&gt;
: running from /dev/ram0 when /linuxrc exits, the behavior&lt;br /&gt;
: of the kernel is UNSPECIFIED.  See the NOTES section for&lt;br /&gt;
: the current kernel behavior.)&lt;br /&gt;
&lt;br /&gt;
: 8.  The  usual  boot  sequence   (e.g.   invocation   of&lt;br /&gt;
: /sbin/init) is performed on the normal root file system.&lt;br /&gt;
&lt;br /&gt;
OPTIONS&lt;br /&gt;
: The following boot loader options when used  with  initrd,&lt;br /&gt;
;        affect the kernel's boot-up operation : initrd=filename&lt;br /&gt;
: Specifies  the  file  to  load  as  the contents of&lt;br /&gt;
: /dev/initrd.  For LOADLIN this is  a  command  line&lt;br /&gt;
: option.   For  LILO you have to use this command in&lt;br /&gt;
: the LILO configuration file /etc/lilo.config.   The&lt;br /&gt;
: filename  specified with this option will typically&lt;br /&gt;
: be a gzipped file-system image.&lt;br /&gt;
&lt;br /&gt;
: noinitrd&lt;br /&gt;
: This boot time option disables the two phase  boot-&lt;br /&gt;
: up  operation.   The kernel performs the usual boot&lt;br /&gt;
: sequence as if  /dev/initrd  was  not  initialized.&lt;br /&gt;
: With  this  option,  any  contents  of  /dev/initrd&lt;br /&gt;
: loaded into memory by the boot loader contents  are&lt;br /&gt;
: preserved.   This  option  permits  the contents of&lt;br /&gt;
: /dev/initrd to be any data and need not be  limited&lt;br /&gt;
: to  a file system image.  However, device /dev/ini-&lt;br /&gt;
: trd is read-only and can  be  read  only  one  time&lt;br /&gt;
: after system startup.&lt;br /&gt;
&lt;br /&gt;
: root=device-name&lt;br /&gt;
: Specifies  the device to be used as the normal root&lt;br /&gt;
: file system.  For LOADLIN this is  a  command  line&lt;br /&gt;
: option.  For LILO this is a boot time option or can&lt;br /&gt;
: be used as an option line in the LILO configuration&lt;br /&gt;
: file /etc/lilo.config.  The device specified by the&lt;br /&gt;
: this option must be a  mountable  device  having  a&lt;br /&gt;
: suitable root file-system.&lt;br /&gt;
&lt;br /&gt;
CHANGING THE NORMAL ROOT FILE SYSTEM&lt;br /&gt;
: By  default, the kernel's settings (e.g. set in the kernel&lt;br /&gt;
: file with rdev or compiled into the kernel file),  or  the&lt;br /&gt;
: boot  loader  option  setting  is used for the normal root&lt;br /&gt;
: file systems.  For a NFS-mounted normal root file  system,&lt;br /&gt;
: one  has  to use the nfs''root''name and nfs''root''addrs boot&lt;br /&gt;
: options to give the NFS settings.  For more information on&lt;br /&gt;
: NFS-mounted  root  see  the kernel documentation file nfs-&lt;br /&gt;
: root.txt.  For more information on setting the  root  file&lt;br /&gt;
: system also see the LILO and LOADLIN documentation.&lt;br /&gt;
&lt;br /&gt;
: It  is also possible for the /linuxrc executable to change&lt;br /&gt;
: the normal root device.  For /linuxrc to change the normal&lt;br /&gt;
: root device, /proc must be mounted.  After mounting /proc,&lt;br /&gt;
: /linuxrc changes the normal root device  by  writing  into&lt;br /&gt;
: the     proc     files     /proc/sys/kernel/real-root-dev,&lt;br /&gt;
: /proc/sys/kernel/nfs-root-name, and  /proc/sys/kernel/nfs-&lt;br /&gt;
: root-addrs.   For  a physical root device, the root device&lt;br /&gt;
: is changed by having /linuxrc write the new root file sys-&lt;br /&gt;
: tem  device  number  into  /proc/sys/kernel/real-root-dev.&lt;br /&gt;
: For a NFS root file system, the root device is changed  by&lt;br /&gt;
: having   /linuxrc   write   the  NFS  setting  into  files&lt;br /&gt;
: /proc/sys/kernel/nfs-root-name  and  /proc/sys/kernel/nfs-&lt;br /&gt;
: root-addrs  and  then  writing  0xff (e.g. the pseudo-NFS-&lt;br /&gt;
: device number) into  file  /proc/sys/kernel/real-root-dev.&lt;br /&gt;
: For example, the following shell command line would change&lt;br /&gt;
;        the normal root device to /dev/hdb1 : echo 0x365 &amp;gt;/proc/sys/kernel/real-root-dev&lt;br /&gt;
: For a NFS example, the following shell command lines would&lt;br /&gt;
: change  the  normal  root  device  to  the  NFS  directory&lt;br /&gt;
: /var/nfsroot on a local networked NFS server with IP  num-&lt;br /&gt;
: ber  193.8.232.7  for  a system with IP number 193.8.232.7&lt;br /&gt;
;        and named 'idefix' : echo /var/nfsroot &amp;gt;/proc/sys/kernel/nfs-root-name&lt;br /&gt;
: echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix \&lt;br /&gt;
: &amp;gt;/proc/sys/kernel/nfs-root-addrs&lt;br /&gt;
: echo 255 &amp;gt;/proc/sys/kernel/real-root-dev&lt;br /&gt;
&lt;br /&gt;
USAGE&lt;br /&gt;
: The main motivation for implementing initrd was  to  allow&lt;br /&gt;
: for modular kernel configuration at system installation.&lt;br /&gt;
&lt;br /&gt;
;        A possible system installation scenario is as follows : 1.  The  loader program boots from floppy or other media&lt;br /&gt;
: with  a  minimal  kernel  (e.g.  support  for  /dev/ram,&lt;br /&gt;
: /dev/initrd,   and   the  ext2  file-system)  and  loads&lt;br /&gt;
: /dev/initrd with a gzipped version of the initial  file-&lt;br /&gt;
: system.&lt;br /&gt;
&lt;br /&gt;
: 2.  The executable /linuxrc determines what is needed to&lt;br /&gt;
: (1) mount the normal root file-system (i.e. device type,&lt;br /&gt;
: device  drivers,  file  system) and (2) the distribution&lt;br /&gt;
: media (e.g. CD-ROM, network, tape,  ...).  This  can  be&lt;br /&gt;
: done  by asking the user, by auto-probing, or by using a&lt;br /&gt;
: hybrid approach.&lt;br /&gt;
&lt;br /&gt;
: 3. The executable /linuxrc loads the  necessary  modules&lt;br /&gt;
: from the initial root file-system.&lt;br /&gt;
&lt;br /&gt;
: 4.  The  executable  /linuxrc  creates and populates the&lt;br /&gt;
: root file system.  (At this stage the normal  root  file&lt;br /&gt;
: system does not have to be a completed system yet.)&lt;br /&gt;
&lt;br /&gt;
: 5.  The  executable /linuxrc sets /proc/sys/kernel/real-&lt;br /&gt;
: root-dev, unmount /proc, the normal root file system and&lt;br /&gt;
: any  other  file systems it has mounted, and then termi-&lt;br /&gt;
: nates.&lt;br /&gt;
&lt;br /&gt;
: 6. The kernel then mounts the normal root file system.&lt;br /&gt;
&lt;br /&gt;
: 7. Now that the file system is  accessible  and  intact,&lt;br /&gt;
: the boot loader can be installed.&lt;br /&gt;
&lt;br /&gt;
: 8.  The boot loader is configured to load into /dev/ini-&lt;br /&gt;
: trd a file system with the set of modules that was  used&lt;br /&gt;
: to  bring  up the system.  (e.g. Device /dev/ram0 can be&lt;br /&gt;
: modified, then unmounted,  and  finally,  the  image  is&lt;br /&gt;
: written from /dev/ram0 to a file.)&lt;br /&gt;
&lt;br /&gt;
: 9.  The  system is now bootable and additional installa-&lt;br /&gt;
: tion tasks can be performed.&lt;br /&gt;
&lt;br /&gt;
: The key role of /dev/initrd in the above is to re-use  the&lt;br /&gt;
: configuration  data during normal system operation without&lt;br /&gt;
: requiring initial kernel selection, a large generic kernel&lt;br /&gt;
: or, recompiling the kernel.&lt;br /&gt;
&lt;br /&gt;
: A second scenario is for installations where Linux runs on&lt;br /&gt;
: systems with different hardware configurations in a single&lt;br /&gt;
: administrative  network.   In such cases, it may be desir-&lt;br /&gt;
: able to use only a small set of kernels (ideally only one)&lt;br /&gt;
: and  to  keep  the  system-specific  part of configuration&lt;br /&gt;
: information as small as possible.  In this case, create  a&lt;br /&gt;
: common  file  with all needed modules.  Then, only the the&lt;br /&gt;
: /linuxrc file or a file executed by /linuxrc would be dif-&lt;br /&gt;
: ferent.&lt;br /&gt;
&lt;br /&gt;
: A  third  scenario  is  more  convenient  recovery  disks.&lt;br /&gt;
: Because information like the location of  the  root  file-&lt;br /&gt;
: system  partition  is  not needed at boot time, the system&lt;br /&gt;
: loaded from /dev/initrd can  use  a  dialog  and/or  auto-&lt;br /&gt;
: detection followed by a possible sanity check.&lt;br /&gt;
&lt;br /&gt;
: Last  but not least, Linux distributions on CD-ROM may use&lt;br /&gt;
: initrd for easy installation from the CD-ROM.  The distri-&lt;br /&gt;
: bution  can  use LOADLIN to directly load /dev/initrd from&lt;br /&gt;
: CD-ROM without the need of any floppies.  The distribution&lt;br /&gt;
: could  also  use  a  LILO boot floppy and then bootstrap a&lt;br /&gt;
: bigger ram disk via /dev/initrd from the CD-ROM.&lt;br /&gt;
&lt;br /&gt;
CONFIGURATION&lt;br /&gt;
: The /dev/initrd is a read-only block device assigned major&lt;br /&gt;
: number  1  and minor number 250.  Typically /dev/initrd is&lt;br /&gt;
: owned by root.disk with mode 0400  (read  access  by  root&lt;br /&gt;
: only).   If  the  Linux  system  does not have /dev/initrd&lt;br /&gt;
: already created, it can be created with the following com-&lt;br /&gt;
;        mands : mknod -m 400 /dev/initrd b 1 250&lt;br /&gt;
: chown root:disk /dev/initrd&lt;br /&gt;
&lt;br /&gt;
: Also,  support  for both &amp;quot;RAM disk&amp;quot; and &amp;quot;Initial RAM disk&amp;quot;&lt;br /&gt;
: (e.g.  CONFIG''BLK''DEV''RAM=y and CONFIG''BLK''DEV''INITRD=y  )&lt;br /&gt;
: support must be compiled directly into the Linux kernel to&lt;br /&gt;
: use /dev/initrd.  When using  /dev/initrd,  the  RAM  disk&lt;br /&gt;
: driver cannot be loaded as a module.&lt;br /&gt;
&lt;br /&gt;
FILES&lt;br /&gt;
: /dev/initrd&lt;br /&gt;
: /dev/ram0&lt;br /&gt;
: /linuxrc&lt;br /&gt;
: /initrd&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
: chown(1),  mknod(1), /dev/ram(4), freeramdisk(8), rdev(8),&lt;br /&gt;
: The documentation file initrd.txt  in  the  kernel  source&lt;br /&gt;
: package,  the  LILO  documentation, the LOADLIN documenta-&lt;br /&gt;
: tion, the SYSLINUX documentation.&lt;br /&gt;
&lt;br /&gt;
NOTES&lt;br /&gt;
: 1. With the current kernel, any file systems  that  remain&lt;br /&gt;
: mounted when /dev/ram0 is moved from / to /initrd continue&lt;br /&gt;
: to be accessible.  However, the /proc/mounts  entries  are&lt;br /&gt;
: not updated.&lt;br /&gt;
&lt;br /&gt;
: 2.  With the current kernel, if directory /initrd does not&lt;br /&gt;
: exist, then /dev/ram0  will  NOT  be  fully  unmounted  if&lt;br /&gt;
: /dev/ram0  is  used  by any process or has any file-system&lt;br /&gt;
: mounted on it.  If /dev/ram0 is NOT fully unmounted,  then&lt;br /&gt;
: /dev/ram0 will remain in memory.&lt;br /&gt;
&lt;br /&gt;
: 3.  Users of /dev/initrd should not depend on the behavior&lt;br /&gt;
: give in the above  notes.   The  behavior  may  change  in&lt;br /&gt;
: future versions of the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
AUTHOR&lt;br /&gt;
: The  kernel  code  for device initrd was written by Werner&lt;br /&gt;
: Almesberger &amp;lt;almesber@lrc.epfl.ch&amp;gt; and Hans  Lermen  &amp;lt;ler-&lt;br /&gt;
: men@elserv.ffm.fgan.de&amp;gt;.  The code for initrd was added to&lt;br /&gt;
: the baseline Linux kernel in development version 1.3.73.&lt;br /&gt;
: [http://www.pokerenfrancais.eu/fulltilt-poker-reveiw/	fulltilt games]&lt;br /&gt;
[[Category:Booting]]&lt;/div&gt;</summary>
		<author><name>DoubleSlash</name></author>	</entry>

	</feed>