This is the
talk page for discussing improvements to the
Initial ramdisk article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
I think this article could be helped by the history behind Initrd. It has to do with resource *limitation* especially during the 16 bits to 32 bits CPU time. I have tried searching who proposed it as a solution and how that discussion evolved into initrd implementation on lkml without success, but I believe sprinkling this article with some of those initial discussions would make it more attention catching and educative, atleast for geeks. — Preceding unsigned comment added by Wk muriithi ( talk • contribs) 18:54, 15 February 2006
About creation of an initrd image - it's just "cpio | gzip" of a directory (or a FS image). That directory should contain an executable program called "init" (will get back to this later) and anything else that program depends on. It should usually NOT be a full-fledged OS - just enough stuff that can fit into RAM while still leaving space for the rest of the system.
Amos Shapira 04:16, 1 February 2007 (UTC)
I read this article in parallel to taking a look at Debian's initrd.img files and I'd like to point out two errors:
1. The "main" program, at least on Debian Etch, is called "init". It's a shell script whic parsses the kernel command line arguments and decides what kind of modules and which kind of root FS it should mount.
2. The initrd.img that comes from Debian is a compressed cpio file, not cramfs.
Amos Shapira 04:15, 1 February 2007 (UTC)
2 is true for recent kernels, initrd can be built with cpio. I just checked this on debian/ubuntu 2.6.15 and debian/knoppix 2.6.19 for instance. I think we should point to the current documentation which is in the kernel tree (/usr/src/linux-2.6.X/Documentation/initrd.txt) All of this is explained. - pweltz 2007-june-03
The article seems to be unsure of how a linux system actually boots, as I understand it (working from the source of the kernel!) The following happens. 1. The kernel itself is loaded into memory (optionally with a ramdisc image.) 2. The kernel concocts a very simple pre-boot file system, including a /dev 3. The kernel mounts the root file-system and performs a root_pivot (kernel version of chroot.) 4. The kernel then calls init, which controls the rest of the boot process.
The article at the moment indicates that the linux kernel _typically_ doesn't contain "all the code needed to load the system.". While some features ARE placed in modules, these tend not to be the ones you need for mounting the root file system. Using initrd it IS possible to place those features in modules. Unless someone can give me a good reason why not, I'll rewrite large chunks of this article in 24 hours time.
Scruffy brit 16:04, 12 October 2007 (UTC)
… since this article describes both, and initramfs redirects here. — Fleminra 21:29, 20 October 2007 (UTC)
Can I suggest that this article be greatly simplified, have terms described, and have examples added. As it stands it may be accurate but only usable by somebody who already understands all the terms used - i.e. by somebody who doesn't need it. A case in point is the description of root and pivot. An example of the code we need to use to specify the (temporary ? or real ?) root would be meaningful. It left me mystified, and I still don't know what goes in initrd or how to create it. Please not I'm not criticising or nitpicking here, it's good that you guys have contributed this, I'm just trying to provide constructive feedback. Rcbutcher ( talk) 05:52, 29 February 2008 (UTC)
Based on http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt, which was definately at least once true, although it might not still be true, the kernel always uses an initramfs. The CPIO archive is embedded in the kernel image. It may be empty. The kernel can optionally be passed an external cpio file, whose contents are merged with the internal one. If the built-in initramfs archive does not contain the necessary components, and no external initramfs is available to merge in, then legacy code for loading an initrd is used. If that fails, booting from a physical disc directly is attempted.
In theory then the kernel image can contain the complete OS, by using the built-in cpio archive. This is very different from an initrd, which always requires a separate file. 71.2.110.57 ( talk) 17:30, 20 June 2008 (UTC)
This article should compare the approach it describes with other operating systems' methods of solving the same problem. (Assuming that they have the same problem.) In FreeBSD this is generally the responsibility of /boot/loader; what does Solaris do? How about Microsoft Windows? QNX? Were there similar problems on other hardware architectures, or is this specific to PC-style systems? 18.26.0.5 ( talk) 19:52, 30 October 2009 (UTC)
The basic issue here has been sort of indicated by some, but clearly sidestepped by the writers. In any type of storage medium, the medium must be prepared to accept data. That process is the formatting process which installs a file system. This article addresses that part of the RAM used as a temporary disk drive during boot.
It would seem logical that the file system used is the initramfs, or initial RAM file system. After that is done, the initrd, or initial RAM drive, has been created and is available for use. If this is not the case, then what sets aside that section of RAM and what is the file system used on that memory area?
When we move from traditional ways of viewing the computer components and their software, we only create confusion. I suggest that this article's beginning sections go thru a rethink. The current content appears to be misleading. - KitchM ( talk) 08:12, 18 February 2010 (UTC)
The article Linux startup process is extremely relevant to this article, and helps to clarify what it being said here. I'd suggest throwing a link to " Linux startup process" somewhere. I'd do it myself, but I'm not sure exactly where I should place it (a "see also" section at bottom? A "see also" at top? A summary of the Linux startup process, with "for further reading, see..."?) so that it won't be edited away in a matter of days. — Preceding unsigned comment added by 205.250.247.113 ( talk) 08:34, 3 October 2011 (UTC)
Maybe someone could introduce mkinitcpio into the article. — Preceding unsigned comment added by 78.49.225.210 ( talk) 16:03, 10 April 2012 (UTC)
I suggest merging the article initramfs into this article initrd. While they are distinctly different pieces of software, I suspect a single article that covers both, including a few paragraphs that point out exactly what is the difference between them, will serve our readers better than two separate articles. -- DavidCary ( talk) 15:34, 17 December 2014 (UTC)
The current initrd article already attempts to cover both pieces of software in the two bullet points of the initrd#Implementation section. From what little I know about initrd and initramfs, the impression I get is that they are similar enough that most of the things one could say about either one -- including nearly all of the contents of the current initramfs article -- are just as true for the other one. -- DavidCary ( talk) 04:06, 20 December 2014 (UTC)
The article claims that /init is launched, can we get a reference for this? I only know https://github.com/torvalds/linux/blob/5125991c9a9360fbdb717e22783c970bbd140660/init/main.c#L959 and it doesn't mention that path. -- Ysangkok ( talk) 12:05, 9 March 2015 (UTC)
Hello fellow Wikipedians,
I have just modified 3 external links on Initrd. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{
Sourcecheck}}
).
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 06:12, 1 December 2016 (UTC)
I find two sentences unclear.
In the part "Similarities in other operating systems": "the Windows boot loader is capable of loading the .sys files for boot-time kernel modules itself, which is the task that requires initrd in Linux." - you mean the Windows kernel?
In "Mount preparations": "any maintenance tasks that cannot run on a mounted root file system are done, the root file system is mounted read-only" - the first 'mounted' is read-write? It's not clear from the article (and I thought that it's read only as well).
Yaroslav Nikitenko ( talk) 13:18, 16 November 2020 (UTC)
This is the
talk page for discussing improvements to the
Initial ramdisk article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
I think this article could be helped by the history behind Initrd. It has to do with resource *limitation* especially during the 16 bits to 32 bits CPU time. I have tried searching who proposed it as a solution and how that discussion evolved into initrd implementation on lkml without success, but I believe sprinkling this article with some of those initial discussions would make it more attention catching and educative, atleast for geeks. — Preceding unsigned comment added by Wk muriithi ( talk • contribs) 18:54, 15 February 2006
About creation of an initrd image - it's just "cpio | gzip" of a directory (or a FS image). That directory should contain an executable program called "init" (will get back to this later) and anything else that program depends on. It should usually NOT be a full-fledged OS - just enough stuff that can fit into RAM while still leaving space for the rest of the system.
Amos Shapira 04:16, 1 February 2007 (UTC)
I read this article in parallel to taking a look at Debian's initrd.img files and I'd like to point out two errors:
1. The "main" program, at least on Debian Etch, is called "init". It's a shell script whic parsses the kernel command line arguments and decides what kind of modules and which kind of root FS it should mount.
2. The initrd.img that comes from Debian is a compressed cpio file, not cramfs.
Amos Shapira 04:15, 1 February 2007 (UTC)
2 is true for recent kernels, initrd can be built with cpio. I just checked this on debian/ubuntu 2.6.15 and debian/knoppix 2.6.19 for instance. I think we should point to the current documentation which is in the kernel tree (/usr/src/linux-2.6.X/Documentation/initrd.txt) All of this is explained. - pweltz 2007-june-03
The article seems to be unsure of how a linux system actually boots, as I understand it (working from the source of the kernel!) The following happens. 1. The kernel itself is loaded into memory (optionally with a ramdisc image.) 2. The kernel concocts a very simple pre-boot file system, including a /dev 3. The kernel mounts the root file-system and performs a root_pivot (kernel version of chroot.) 4. The kernel then calls init, which controls the rest of the boot process.
The article at the moment indicates that the linux kernel _typically_ doesn't contain "all the code needed to load the system.". While some features ARE placed in modules, these tend not to be the ones you need for mounting the root file system. Using initrd it IS possible to place those features in modules. Unless someone can give me a good reason why not, I'll rewrite large chunks of this article in 24 hours time.
Scruffy brit 16:04, 12 October 2007 (UTC)
… since this article describes both, and initramfs redirects here. — Fleminra 21:29, 20 October 2007 (UTC)
Can I suggest that this article be greatly simplified, have terms described, and have examples added. As it stands it may be accurate but only usable by somebody who already understands all the terms used - i.e. by somebody who doesn't need it. A case in point is the description of root and pivot. An example of the code we need to use to specify the (temporary ? or real ?) root would be meaningful. It left me mystified, and I still don't know what goes in initrd or how to create it. Please not I'm not criticising or nitpicking here, it's good that you guys have contributed this, I'm just trying to provide constructive feedback. Rcbutcher ( talk) 05:52, 29 February 2008 (UTC)
Based on http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt, which was definately at least once true, although it might not still be true, the kernel always uses an initramfs. The CPIO archive is embedded in the kernel image. It may be empty. The kernel can optionally be passed an external cpio file, whose contents are merged with the internal one. If the built-in initramfs archive does not contain the necessary components, and no external initramfs is available to merge in, then legacy code for loading an initrd is used. If that fails, booting from a physical disc directly is attempted.
In theory then the kernel image can contain the complete OS, by using the built-in cpio archive. This is very different from an initrd, which always requires a separate file. 71.2.110.57 ( talk) 17:30, 20 June 2008 (UTC)
This article should compare the approach it describes with other operating systems' methods of solving the same problem. (Assuming that they have the same problem.) In FreeBSD this is generally the responsibility of /boot/loader; what does Solaris do? How about Microsoft Windows? QNX? Were there similar problems on other hardware architectures, or is this specific to PC-style systems? 18.26.0.5 ( talk) 19:52, 30 October 2009 (UTC)
The basic issue here has been sort of indicated by some, but clearly sidestepped by the writers. In any type of storage medium, the medium must be prepared to accept data. That process is the formatting process which installs a file system. This article addresses that part of the RAM used as a temporary disk drive during boot.
It would seem logical that the file system used is the initramfs, or initial RAM file system. After that is done, the initrd, or initial RAM drive, has been created and is available for use. If this is not the case, then what sets aside that section of RAM and what is the file system used on that memory area?
When we move from traditional ways of viewing the computer components and their software, we only create confusion. I suggest that this article's beginning sections go thru a rethink. The current content appears to be misleading. - KitchM ( talk) 08:12, 18 February 2010 (UTC)
The article Linux startup process is extremely relevant to this article, and helps to clarify what it being said here. I'd suggest throwing a link to " Linux startup process" somewhere. I'd do it myself, but I'm not sure exactly where I should place it (a "see also" section at bottom? A "see also" at top? A summary of the Linux startup process, with "for further reading, see..."?) so that it won't be edited away in a matter of days. — Preceding unsigned comment added by 205.250.247.113 ( talk) 08:34, 3 October 2011 (UTC)
Maybe someone could introduce mkinitcpio into the article. — Preceding unsigned comment added by 78.49.225.210 ( talk) 16:03, 10 April 2012 (UTC)
I suggest merging the article initramfs into this article initrd. While they are distinctly different pieces of software, I suspect a single article that covers both, including a few paragraphs that point out exactly what is the difference between them, will serve our readers better than two separate articles. -- DavidCary ( talk) 15:34, 17 December 2014 (UTC)
The current initrd article already attempts to cover both pieces of software in the two bullet points of the initrd#Implementation section. From what little I know about initrd and initramfs, the impression I get is that they are similar enough that most of the things one could say about either one -- including nearly all of the contents of the current initramfs article -- are just as true for the other one. -- DavidCary ( talk) 04:06, 20 December 2014 (UTC)
The article claims that /init is launched, can we get a reference for this? I only know https://github.com/torvalds/linux/blob/5125991c9a9360fbdb717e22783c970bbd140660/init/main.c#L959 and it doesn't mention that path. -- Ysangkok ( talk) 12:05, 9 March 2015 (UTC)
Hello fellow Wikipedians,
I have just modified 3 external links on Initrd. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{
Sourcecheck}}
).
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 06:12, 1 December 2016 (UTC)
I find two sentences unclear.
In the part "Similarities in other operating systems": "the Windows boot loader is capable of loading the .sys files for boot-time kernel modules itself, which is the task that requires initrd in Linux." - you mean the Windows kernel?
In "Mount preparations": "any maintenance tasks that cannot run on a mounted root file system are done, the root file system is mounted read-only" - the first 'mounted' is read-write? It's not clear from the article (and I thought that it's read only as well).
Yaroslav Nikitenko ( talk) 13:18, 16 November 2020 (UTC)