Mounting Filesystem over existing directory

Laurent Bercot ska-dietlibc at skarnet.org
Sat Jun 2 09:18:23 UTC 2012


> Interesting.  But where do you have the logic for choosing a boot 
> device?

 This is very platform-dependent. Usually, embedded devices will have
some EEPROM-equivalent switches, accessible via /dev/something or a
platform-dependent binary; you just need to store 2 bits of information,
the hardware should support that. Professional embedded devices will
even require a more complex boot process with a cryptographically
signed boot loader; on those, the hardware will give you a lot of room
to store boot-related flags.


> What if your new partition is fine, but core services fail to 
> load?  How do you recognize that you need to start over with a different 
> root partition?

 Only say "ok to switch partitions" at the end of the boot process, of
course, after verification that everything works properly. To ensure
that core services work, you can use a supervision system. I wrote s6
just for this: http://www.skarnet.org/software/s6/


> If anything goes wrong with the new version, I just pop in a USB drive 
> with the old version.  The initramfs is simple enough that it never 
> needs changed.

 As long as the user has a working version on a USB drive, that's a
viable solution. My approach was made for embedded systems where the
user has access to nothing at all - he wants it to just work once it's
plugged in and switched on.

-- 
 Laurent


More information about the busybox mailing list