Re: how does kernel mount root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 29, 2007 at 11:49:17AM -0600, bo y wrote:
> I am very confused about the way kernel mount a disk-based root like
> root=/dev/sda1. Does this special file "/dev/sda1" exist inside the
> very very first filesystem, rootfs? How does the kernel get the major,
> minor number out of this line "root=/dev/sda1"? Otherwise, there is no
> way to reference the actual device, right ? I have browsed the whole
> source tree and found no place where command_line (or cmdline) is
> parsed to convert "root=/dev/xxx" to something like kdev_t or dev_t.

 Please, read:

    http://www.ibm.com/developerworks/library/l-linuxboot/index.html

 Your kernel has care about initrd image only. This RAM disk image is
 the initial temporary root filesystem. The real root filesystem is
 mounted and pivoted (pivot_root syscall) by a script from the initrd
 image.

 For example Fedora/RHEL uses nash interpreter in initrd image. This
 interpreter parses the root= option and mounts the real root
 filesystem.


    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux