Re: separating initrd from initramfs: part 1

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

 



On Tue, 5 Aug 2008, Matthias Kaehlcke wrote:

> Hi Robert,
>
> El Mon, Aug 04, 2008 at 07:30:00PM -0400 Robert P. J. Day ha dit:

... snip of preliminary material covering initrd and initramfs ...

> i think it's a good idea, besides probably saving some bytes it
> notably reduces boot-time. populate_rootfs() (init/initramfs.c) does
> the following:
>
>     printk(KERN_INFO "checking if image is initramfs...");
>     err = unpack_to_rootfs((char *)initrd_start,
>                            initrd_end - initrd_start, 1);
>     if (!err) {
>         printk(" it is\n");
>         unpack_to_rootfs((char *)initrd_start,
>                          initrd_end - initrd_start, 0);
>         free_initrd();
>         return 0;
>     }
>
> it first unpacks the image to see if it is an initramfs or an
> initrd. afterwards it unpacks the image again to populate the
> rootfs. this takes a sensible amount of time, depending on the size
> of the initramfs. by separating initramfs and initrd (what makes
> sense anyway) we can get rid of the checking part cause we know the
> image is (or should be) an initramfs (or initrd)

i was going to get to that, i was just making sure i understood the
details correctly thus far regarding the source of the initrd and
initramfs images.  so what i've posted looks correct so far?  that's
all i want to verify.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

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