LWN.net Logo

Re: why is gurb-menu hidden as default?

Re: why is gurb-menu hidden as default?

Posted Feb 9, 2012 14:35 UTC (Thu) by pbonzini (subscriber, #60935)
In reply to: Re: why is gurb-menu hidden as default? by akumria
Parent article: Re: why is gurb-menu hidden as default?

Write a 1 in the boot record before boot starts, and write a 0 in the boot record after boot succeeds. It requires cooperation somewhere, of course.


(Log in to post comments)

Re: why is gurb-menu hidden as default?

Posted Feb 10, 2012 10:58 UTC (Fri) by dgm (subscriber, #49227) [Link]

This all could be done by grub, just need to add a tool to mark a boot as successful at the end of the boot process. The coperation needed is adding that tool invocation to the end of that process.

Re: why is gurb-menu hidden as default?

Posted Feb 10, 2012 12:49 UTC (Fri) by khim (subscriber, #9252) [Link]

In fact this is how I've done it on servers ten years ago: by default GRUB will boot "rescue kernel" (which is bumped manually) and each successful boot will mark "latest and greatest" kernel as the one to boot "just one more time".

P.S. Actually I lied: I've used not "rescue kernel" but the whole separate "rescue distribution" on a separate partition. This meant that even serious screwups in the upgrade process were only able to bring server down if they somehow managed to kill grub itself (the whole machinery lived on separate partition not related to /boot in both systems).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds