Re: configuring initramfs/initrd support into the kernel?

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

 



On Wed, 8 Jul 2009, Srdjan Todorovic wrote:

> Hi,
>
> On 08/07/2009, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
> >   what noinitramfs.c does is explicitly create a trivial root
> > filesystem (with nothing but /root and /dev/console), at which
> > point the kernel will go directly to trying to mount the final
> > root filesystem, correct?
>
> Are you trying to say that this tiny initial root filesystem is then
> used as a mounting point for the real on-disk root filesystem? So if
> you construct an in-kernel root i-node you then use this as the root
> node to attach the real filesystem onto?

  i sort of got into this in an earlier post.  if you configure
initramfs into the kernel but you don't specify the contents of that
internal initramfs, you'll get the one built by
scripts/gen_initramfs_list.sh which consists of nothing but /root and
/dev/console.

  if you *don't* select initramfs/initrd support, then you can see
what happens in the source file init/noinitramfs.c in the routine
default_rootfs() -- explicit calls to create exactly the same content
by calling the appropriate system calls.

  and i don't think that initial initramfs rootfs is used *as* the
mount point -- i think a switchroot or something similar will be done
after that to switch to the real root filesystem.

  in any event, i'm just trying to nail down all these details.  i
used to think i understood the mechanics of initramfs fairly well.
now i'm not so sure; hence, my asking the questions.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Linked In:                             http://www.linkedin.com/in/rpjday
Twitter:                                       http://twitter.com/rpjday
========================================================================

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