what step in kernel "make install" creates the initrd.img file?
Robert P. J. Day
rpjday at crashcourse.ca
Tue Mar 13 16:30:40 UTC 2012
On Tue, 13 Mar 2012, Oliver Grawert wrote:
> On Tue, 13 Mar 2012 11:05:36 -0400 (EDT)
> "Robert P. J. Day" <rpjday at crashcourse.ca> wrote:
> > all i want to know is, who or what creates that initrd.img file?
> > historically, i was used to the "mkinitrd" command but that's not even
> > on my system. i can see "mkinitramfs" but i don't see where that's
> > being invoked anywhere in the kernel source tree.
> > i'm sure i'm missing something obvious. what creates that file, and
> > where does it get its default contents from? thanks.
> in ubuntu and debian the initramfs-tools package (and specifically the
> update-initramfs tool) are responsible for creating an initramfs, it is
> completely created from your filesystem using a few modules from the
> kernel you built and a bunch of apps/libs from teh filesystem...
> to roll an initrd, install that kernel, and run:
> sudo update-initramfs -c -k <kernel version as used in /lib/modules/>
> this will put an initrd file into /boot
actually, i've used that very command before to create the
appropriate initrd.img file for a new kernel, but these days, it seems
that to install a new kernel on ubuntu, all i need to do is:
$ sudo make modules_install
$ sudo make install
and i certainly seem to get an initrd.img file in /boot, so all i'm
trying to figure out is *where* that command is being called from when
i install my new kernel.
i've looked through the kernel source tree for the string
"initramfs" and haven't found the actual invocation. am i just being
oh, wait, i forgot about the invocation of /sbin/installkernel to
actually install the kernel. ah, and in that script, i see the
reference to /etc/postinst.d ... ok, now i get it.
Robert P. J. Day Ottawa, Ontario, CANADA
More information about the ubuntu-users