Multi-booting is a widely-used practice that enables a user to select the OS best suited for their current task. For example, I dual-boot Windows and Linux on my laptop which allows me to get the best of both worlds on the same machine.
I’ve encountered a minor pain point in this setup however, largely due to the way I tend to use my machine: once I boot a particular OS I continue to use that same OS repeatedly and expect reboots/shutdown/startup to continue to use the last OS I booted. This is especially true of reboots, for example after installing system updates.
Traditionally I addressed this by setting the default boot to my most-frequently-used OS, but really that is just optimizing for the common case and not solving the issue. Additionally, I’ve recently started using Windows more and am annoyed having to remind my machine what OS I’m using.
So, today I sat down and put together a simple little utility to fix this properly once and for all.
While working on hacking the FreeBSD kernel for a research project, I of course have crashed things many times. Hooray for VM’s.
However, this latest time I’ve managed to really mess things up. Instead of some esoteric message in the logs, the result was the following being written to the console:
Hopefully those of you who’ve hacked on kernels previously will appreciate the “wut” moment you get when your screen looks like this instead of acting as expected :).