Re: how does kernel mount root

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

 



Hi!

On 12:05 Fri 30 Nov     , Karel Zak wrote:
> 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.
> 
>  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.
> 
>     Karel
> 
> -- 
>  Karel Zak  <kzak@xxxxxxxxxx>

This is right - except that an initrd is optional. The system perfectly
boots without it. You can use it to make the kernel smaller when you have
to support many disk controllers. It can also be used as a "mini rescue"
system and sometimes it is required (e.g. live cds).

Michi
-- 
programing a layer 3+4 network protocol
see http://michaelblizek.homelinux.net


--
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