booting

Oct 282012
 
It’s a scary thing when your machine doesn’t boot, when you don’t even get an error message, just a single quietly ominous prompt:
grub>

Not what I want to see

Of course, it’s probably worse when you get nothing at all, or a “No Operating System Found”. But the unsettling thing for many sysadmins about the grub> prompt is that it’s a prompt that doesn’t respond to the usual Linux commands. The inline help isn’t hugely helpful either. I’m going to demonstrate a few useful GRUB commands for recovering from a failed boot, and explain a few things about GRUB and bootloaders along the way.

A broken GRUB config typically arises when creating an extra OS partition, or when migrating disks. Depending on the operating system, or its setup options, the old GRUB configuration could be rendered invalid. The usual wisdom is to simply boot from a Live installation CD/DVD into recovery mode and fix everything from there. That’s one way, but I’ve always felt a little more self-sufficient to be able to fix the problem without the extra tool or a USB pen or CD. You don’t need to have written down a lot of long kernel version strings either, as I’ll show you. The commands are easier to remember if you understand the process of what is actually happening.
Continue reading »


Matt Parsons is a freelance Linux specialist who has designed, built and supported Unix and Linux systems in the finance, telecommunications and media industries.

He lives and works in London.

Sep 162011
 

I’ve got a nice GRUB dual-boot going on my laptop with multiple partitions and Ubuntu and Windows 7. Like it or not, I tend to use Windows 7 more, being an iPhone and vSphere user which gives me know option.

Trouble struck when I had to reinstall Windows 7 and it ruined my boot partition. I Googled around and found several manual solutions, until I discovered that this problem seems so common that someone has a tool to fix it immediately – Boot-Repair. Totally automatic, it scans all partitions and rebuilds GRUB automatically. It worked first time, so I didn’t even bother to work out how it did it.

Here’s the quick-and-dirty:

  • Boot into Ubuntu, using a Live CD.
  • Enable the network connection
  • Install and run Boot-Repair:
  •    # sudo add-apt-repository ppa:yannubuntu/boot-repair
       # sudo apt-get update && sudo apt-get install -y boot-repair && boot-repair
    

    After Boot-Repair finishes, reboot. The GRUB menu should magically reappear, just as it was.


    Matt Parsons is a freelance Linux specialist who has designed, built and supported Unix and Linux systems in the finance, telecommunications and media industries.

    He lives and works in London.