Linux supported memory root file system

Source: Internet
Author: User

Linux supports two kinds of internal stub file systems: RAMDisk and Initramfs.

----------------------------------------------------------------------------------------------------

Document/early-userspace/readme

The kernel have currently 3 ways to mount the root filesystem:
129
(a) All required device and filesystem drivers compiled into the kernel, no
131 INITRD. Init/main.c:init () would call Prepare_namespace () to mount the
FileSystem final Root, based on the root= option and optional init= to run
133 some other init binary than listed at the end of Init/main.c:init ().
134
135 b) Some device and filesystem drivers built as modules and stored in an
136 INITRD. The INITRD must contain a binary '/LINUXRC ' which are supposed to
137 load These driver modules. It is also possible to mount the final root
138 filesystem via LINUXRC and use the Pivot_root syscall. The INITRD is
139 mounted and executed via Prepare_namespace ().
140
141 c) using INITRAMFS. The call to Prepare_namespace () must is skipped.
142 This means, a binary must do all of the work. Said binary can be stored
143 into Initramfs either via modifying USR/GEN_INIT_CPIO.C or via the new
144 INITRD format, an cpio archive.  It must be called "/init". This binary
145 is responsible to does all the things prepare_namespace () would do.
146
147 to maintain backwards compatibility, The/init binary would only run if it
148 comes via an Initramfs cpio archive. If This isn't the case,
149 Init/main.c:init () would run Prepare_namespace () to mount the final root
and exec one of the predefined init binaries.
------------------------------------------------------------------------------------------------

Initramfs

Initramfs can be embedded directly into the Linux kernel and compiled with the kernel. It can be a compressed file or an ordinary non-compressed file system.

Its position is specified by Config_initramfs_source.

Note: If Config_initramfs_source is specified, the system will no longer respond to root file systems such as RAMDISK,JFFS2.

does not respond to config_cmdline, even if the directory specified by Initramfs_source is empty or is not the correct file system.

When the Initramfs file system is started, the first INIT program is executed in the root file system, which is passed in the Uboot

INIT=/LINUXRC ignored.

Note: No matter linuxrc, or init, are symbolic links, pointing to/bin/busybox.

Linux supported memory root file system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.