[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    rootfs remains in /proc/mounts after switch_root
From:       Campbell McLeay <campbell.mcleay () yahoo ! com>
Date:       2009-01-14 13:38:52
Message-ID: 638402.28934.qm () web46104 ! mail ! sp1 ! yahoo ! com
[Download RAW message or body]

Hi,

I am using BusyBox 1.13.2, which I am using in an initramfs, which then mounts a \
flash-based filesystem and does a switch_root to this as the new root filesystem. \
This all works well, except that /proc/mounts still shows '/' mounted as rootfs on \
rootfs, in addition to the flash files system (/dev/hda1):

rootfs on / type rootfs (rw)
/dev/hda1 on / type ext2 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
ramfs on /dev type ramfs (rw)
devpts on /dev/pts type devpts (rw)
shm on /dev/shm type tmpfs (rw)

My understanding is that rootfs is never unmounted, but gets 'mounted over' by the \
new root filesystem via switch_root: does this mean that this should then no longer \
appear in /proc/mounts? The script I am using in /init essentially does:

-mounts /proc
-mounts /sys
-creates device nodes in /dev using mdev -s (I have to at least have /dev/console \
                created there first though)
-parses /proc/cmdline
-mounts 'real' filesystem on selected device at /newroot
-unmounts /proc and /sys
-runs exec switch_root to /newroot

Any ideas?


Cheers,

Campbell


      

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic