[BusyBox] Joy and Compatibility

Rob Landley rob at landley.net
Wed Jul 27 07:28:50 UTC 2005


On Tuesday 26 July 2005 22:47, busybox at rich-paul.net wrote:
> I use Gentoo Linux, and have been playing with the bootstrap process a
> bit ... several times, when I've been experimenting or tweaking, I've
> accidentally left proc mounted and exec'd init.  When Gentoo's boot
> scripts fail to mount proc, it results in an unceremonious reboot.  None
> of this, of course is your problem.

I have a complete rewrite of mount pending.  (I announced the intention to do 
this on this list january 23, posted the first draft Feb 8, dug it up and 
posted an updated version on May 8, mentioned it again on may 13, may 14, it 
came up again in a thread on july 9...)

I'm working on getting the sucker actually checked in now.  Stuff like loop.c 
and mtab() are kinda funky at present, to the point of breaking the build...

That said:

> But then today, I noticed that I had a tmpfs mounted on /dev, and a
> second tmpfs mounted on top of it.
>
> This made me wonder if there would be any value to adding a switch
> that would request an idempotent semantic from mount, e.g.
>  if (already_mounted())
>   exit(0);
>  else if (then_mount_the_silly_thing())
>   exit(0);
>  else
>   exit(1);
>
> It seems much cleaner to me than either adding logic to the init scripts
> to test before running mount or grepping mount's error message to try to
> determine why it failed.
>
> But there is one drawback to the scheme:  util-linux doesn't have it.

Sounds cool anyway.  I'm adding autodetection of loop mounts to mount and 
umount, so you never have to specify -o loop again (although it won't break 
if you do specify it).  That's something util-linux doesn't have.  (It was 
_really_ easy to do, and didn't add noticeably to the size...)

> In a similar vein, I've noticed that busy-mount doesn't grok --move or
> --bind, and util-mount doesn't grok -omove or -obind.  So I thought I
> might clean up my Kompatablity Karma by explaining --move and --bind to
> busy-mount.

My rewrite already got that one.

> Anyway, let me know what you think.

Could you wait until I get my rewrite checked in, and then look at how much 
trouble it would be to add your new feature on top of that?  (It's my fault 
for having this thing pending so long without checking it in...)

> Regards,
> Rich

Rob



More information about the busybox mailing list