i'm developing and android universal bootloader.
this thread should NOT be moved to android forums!
our project it's to make users able to boot any OS ( linux, Mac, Windows, android and so on ) from any arm device. [ wiki: https://github.com/tux-mind/tf201-dev/wiki
our root_chooser works as /init replacement.
it chroot to an user defined device and substitute itself with another user specified init program ( usually /sbin/init ).
my problem is that the booted OS cannot unmount itself.
we are mounting the user-defined blockdevice over /newroot, chroot into /newroot ( or a subfolder ) and execv() the /sbin/init program.
for example gentoo say "cannot umount /newroot - we are using /newroot" in the shutdown phase.
i'm asking your help because every time i reboot the first mount() on the user-defined blockdevice takes so long due to unclean filesystem.
is there anyway to chroot into another linux root with giving him a way to unmount himself?
many init programs checks that they are the 1'st process....so a fork is not possible.
but i belive that there is a way since many initramfs do this.
thanks in advance for your help.
-- open source rocks!