Re: making a linux kernel with no root filesystem

From: Mathieu Segaud
Date: Thu Oct 21 2004 - 15:02:38 EST


"Richard B. Johnson" <root@xxxxxxxxxxxxxxxxxx> disait dernièrement que :

> On Thu, 21 Oct 2004, Paulo Marques wrote:
>
> Let me add the basics that the kernel expects to execute
> /sbin/init. This means that there must be a root file-system
> to contain it. However, it can be a RAM-disk. That's how
> initrd works. /sbin/init can be a program that you write
> that does everything you need yout system to do. It can
> fork off multiple tasks, etc. Just don't accidentally call
> exit() or return from main()!

but initrd needs a FS code linked in :)
the only way to have no fs linked in the kernel, is to use initramfs,
i.e. rootfs as the real root.
The solution to the problem is to provide the basics of a system in
the newc cpio format (see in Documentation/early-userspace/) which
will require no FS code linked in (huh, I guess RAMFS is needed ;)),
tweak usr/Makefile to get it use the in-place initramfs_data.cpio.gz and
put the cpio archive in usr. (I do this way because the initramfs_list
"mechanics" never succeeded in getting me a working kernel :))

--
"I know how hard it is for you to put food on your family."

George W. Bush
January 27, 2000
During a campaign speech in Nashua, New Hampshire.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/