[BusyBox] How to unmount filesytem that init was run from?

Goetz Bock bock at blacknet.de
Wed Mar 3 20:24:39 UTC 2004


On Wed, Mar 03 '04 at 15:05, Mago Barca wrote:
> I am using busybox and would to know how unmount the filesystem that init
> was run from?
You can't.

Init is still running, so it's opened on the filesystem and you can't
unmount open filesystems. (some BSD apparently can, but that's realy
unwise).

If you want to do the unmount before you run init, you can do that with
an initrd

<setup/copy system to new location>
cd $newlocation
mkdir initrd
pivotroot ./ initrd
chroot /
cd /
exec sbin/init < dev/console > dev/console

(types from memmory)
-- 
/"\ Goetz Bock at blacknet dot de  --  secure mobile Linux everNETting
\ /                     (c) 2003 as GNU FDL 1.1
 X   [ 1. Use descriptive subjects - 2. Edit a reply for brevity -  ]
/ \  [ 3. Reply to the list - 4. Read the archive *before* you post ]



More information about the busybox mailing list