These days I find myself spending the majority of my time in a Windows based OS of one flavor or another. However, I still have most of my machines set to dual-boot to a Linux distro (lately that’s usually Ubuntu). That way I still have it very handy when I want or need it.
Grub 2 is the boot-loader I see the most and I find it quite serviceable. And maddening. Until recently it actually drove me nuts for two main reasons. Fortunately, I finally took the time to do 5 minutes of research last weekend and those reasons are no longer issues.
Item 1: Setting the Default boot OS
By default, the top item in the boot menu list is the default OS to boot. And, by default, that’s the most recent Linux kernel. Well, since I spend the majority of my time in Windows that was becoming distressing.
Initially I found a way to modify the config to tell grub which line number was the default OS. However, each time I updated and got a new kernel this line number was no longer correct — the new kernel would get added to the top of the list and push everything down (see item 2).
Fortunately, I found a blog post titled, “Fix Windows as default boot on Ubuntu with Grub2 loader” that offers a very simple solution. Just specify the default OS by name instead of number! So simple… yet I sure struggled to solve it. For details just follow that link.
Item 2: Cluttering up the Boot Menu list with Old Kernels
I alluded to this earlier. Every time you update and get a new kernel you get two more entries into the boot menu. After just a few updates that boot menu gets long and cumbersome.
Cleaning up the boot menu is pretty simple though — and rather automated. Once you’ve verified that the kernel is working there’s really no reason to keep the old one(s) around. Just fire up synaptic and completely remove those old kernels. When you do so, their associated menu entries are removed automagically as well. I picked up this tip from another blog post titled, “Clean up the New Ubuntu Grub2 Boot Menu.”
So there you go, with just those two posts I’ve removed a major “pain point” from my daily dual-booting experiences. Yay blogs!