need some clarifications concerning rootf mounting

stl st.lambert02 at gmail.com
Wed Aug 8 05:01:20 EDT 2012


Hello all,
I need some explanations concerning the ways to mount rootf during boot.

I have read some documents (notably the very useful How to use initramfs by
Rob Landley)
and dug into the source code, but some doubts remain.

If I well understood, there is 2 differents procedures to mount the rootfs:
- using the old way: init ramdisk
- using the initramfs support (which appears to be really more efficient)

The fonction "populate_rootfs()" seems to be a crucial point of the
procedure:
it calls a first time "unpack_to_roofs()" with __initramfs_start and
__initramfs_size
as arguments, and if initrd_start is not NULL, calls one more time
"unpack_to_rootfs()"
with initrd_start and (initrd_end-initrd_start) as arguments.

What's really happening during the first unpack_to_rootfs() ?
Does the kernel unpack the iniramfs.cpio (created either by supplying a
valid cpio one
or a config file through CONFIG_INITRAMFS_SOURCE) from __initramfs_start
(defined in vmlinux.lds.S)?

If I aim to use initramfs support, should I do something with
initrd_start/end and CONFIG_BLK_DEV_RAM stuffs?

Thanks in advance for your help and clarifications.

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120808/8d918576/attachment.html 


More information about the Kernelnewbies mailing list