On Tue, 4 Dec 2007, Vegard Nossum wrote: > Hi, > > On Dec 4, 2007 2:59 PM, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote: > > all right, let me make sure i understand what's happening here. if > > you look at the tail end of init/initramfs.c, you can see in the > > routine populate_rootfs() where that "checking if image is > > initramfs..." message is being printed. > > > > but *above* that, there has *already* been a call to > > unpack_to_rootfs() to unpack the in-kernel cpio initramfs (the very > > first thing in that routine, in fact). > > > > so the question remains -- what was *that* unpacked into? are you > > saying it was an initial /dev/ram? if so, when was that created > > during the boot process? is this question making any sense? > > I hope I am understanding the question correctly :) If you look at the > function unpack_to_rootfs(), it makes repeated calls to > write_buffer(). This is the "destination" of the unpack. > write_buffer() is a state machine that calls different functions > depend on the current state. These functions call vfs functions like > sys_open() with O_CREAT (in do_name()) and sys_write() with the > unpacked data (in do_copy()). I do not know the state of the vfs at > this moment, however. ah, yes, i believe that is the answer to my question. i was thinking that the "destination" was something as trivial as an already existing ramdisk of some kind, but i believe you've tracked it down. thanks. rday p.s. since i've always wanted to know how the whole initrd/initramfs thing worked in detail, i may write it up for a wiki page and load it full of questions regarding stuff i'm still not sure about. i'll let you know when it's done -- probably later today. ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://crashcourse.ca ======================================================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ