Re: retain mounted initrd after booting?

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

 



On Tue, 29 Sep 2009, Luciano Rocha wrote:

> The initrd option in grub, and the similar one in other boot
> loaders, passes a binary image to the kernel.
>
> Then the kernel identifies it as an initramfs or as an initrd. When
> the kernel boots, you can see this message:
>   Trying to unpack rootfs image as initramfs...
>
> Or similar, I think it was different in older kernels. I got this in
> an older one:
>   checking if image is initramfs... it is
>
> The initrams contents are decompressed over the ones included in the
> kernel. Then the kernel checks if /init exists (or another one,
> passed with the option rdinit=path) and if it exists and is
> runnable, passes control to it even before trying to mount the root
> partition.
>
> Then the system is booted, and the /init binary is responsible for
> booting the rest of the system. The original image is no longer
> available, unless /init decides to do keep it somewhere else.
>
> If there's no executable /init, then the kernel continues as in the
> old case.

  i only have a few minutes to reply to this, but i think you're
oversimplifying.  there are two possible early root filesystems:

  1) the *internal* initramfs
  2) the *external* initrd image

if you check the source in the init/ kernel source directory, you can
see that there are independent tests for those two things.  maybe i'm
misunderstanding what you're saying, but what i'm after is whatever it
takes to retain, say, *either* of those two objects once the system
boots fully.

the kernel clearly defines the "retain_initrd" kernel parameter, so
i'm just curious as to its purpose.

rday
--

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

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
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