Ubuntu 10.10 and Grub 2 Fun

I am a few distros behind the current Ubuntu. I have been using 9.04 and 8.10 since I have found them very stable and familiar. For kicks, I installed 10.10 Server on a new project and thought I would find the same things I found in previous distros. For the most part I did. However, I stumbled across a stupid change that crippled my server. First off, the server is a headless and keyboardless setup. I know, I should run an IP KVM for complete control, but my other servers haven’t warranted it yet.

The issue is that when the server looses power, and then during boot it looses power again, it throws a “Recordfail” flag that can be used to change the way Grub2 boots. In the default configuration of Ubuntu 10.10, they have chosen to display the boot menu without a timer when there is a record fail. It is much reminiscent of Windows when it fails to boot properly and gives you the boot menu for different modes.

In a desktop environment, this would be fine because I could choose to run recovery, run normally or whatever. However, in my configuration, I want this thing to boot even it if is on fire. If it doesn’t boot, it should be cause some hardware needs to be replaced. After some digging, I found the solution. Edit /etc/grub.d/10_linux and commment the following lines like so:

# recordfail=1
# save_env recordfail

Save the file and then run sudo update-grub to generate a new grub.cfg file. Viola, no more stalled boots.

Cheers,

-Mike

  1. There is a problem with the version. If GRUB2 finds any problems, it will set a variable called recordfail to 1 and that will cause GRUB to hang at boot time. The only way to change that behavior is to edit a file on /etc/grub/10_linux and comment out a line. However, all my searches on Google have turned up solutions for the previous version of 10_linux. So now, I commented out a function and boom…can’t boot anymore.

  2. What all did you change? I was able to comment out recordfail on my Ubuntu 10.10 system and it has work ever since.

    • Also Mike
    • February 13th, 2012

    I really need to accomplish the same thing, however I don’t see either of those lines in my 10_linux file. Do you know if it only exists when that error occurs?

  1. No trackbacks yet.