Running a service *just* before unmounting filesystems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 11-06-18 17:48, Jérémy Rosen wrote:
> We solve a problem which is kinda similar in the embedded world when we do A/B update
> 
> I'll describe how we do it so you see if this can help
> 
> * Have a single "last boot went wrong" flag
> When grub starts
> * if the flag is set, show the boot menu (or a timer)
> * if the flag is not set
>    * skip the menu, don't initialize USB, fastboot
>    * set the flag.
> * At some point during the boot (late enough that it is possible to get a console) reset the flag.
> 
> this way, your system is "unstable" : either you reach the point where a console is available or you will have a menu at the next reboot.
> 
> 
> The trick is to have grub first read the flag then set it to "bad" for the next boot. Linux set it to "good" if the boot was good enough

Yes that is what we are doing except that the flag has
a different name, we call it boot_success and grub
clears it on boot and at some point userspace sets
it to indicate the boot went ok.

Regards,

Hans



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux