Skip to contentSkip to conversation

rootfs and /dev/root

DISCUSSION Mark Dascher 2 participants 2 messages May 21, 2003

lore
Share & tools
lore
#0 lore raw

I'm curious about the two entries in /proc/mounts:
rootfs and /dev/root. Although I don't have much experience with this, I've looked through some of the kernel source code (e.g. fs/namespace.c or init/do_mounts.c). All I can come up with (actually, this is pretty much what I thought before I looked at any code) is that rootfs is purely a kernel-generated filesystem. The kernel creates the /dev/root device there, and then mounts /dev/root at / (replacing rootfs).

There were some mentions of 'initrd' too, so I'm not sure if I'm confusing rootfs with an initrd. Could anyone clear this up for me?

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

#1 lore raw
Quoted 10 lines · Mark Dascher

I'm curious about the two entries in /proc/mounts:
rootfs and /dev/root. Although I don't have much experience with this, I've looked through some of the kernel source code (e.g. fs/namespace.c or init/do_mounts.c). All I can come up with (actually, this is pretty much what I thought before I looked at any code) is that rootfs is purely a kernel-generated filesystem. The kernel creates the /dev/root device there, and then mounts /dev/root at / (replacing rootfs).

Yes that's what happens. Guys are planning to be able to *really* umount real (disk-based) root fs someday and continue halt/reboot sequence using files (scripts etc) on this virtual rootfs.

So there will be both 'early userspace' and 'late userspace' ;)

IMHO.
--
vda