Setting Grub Options The Right Way

Grub is the default boot loader for Ubuntu and it comes with a huge set of options that you might be inclined to tweek when ever you choose to debug a problem during bootup.  The simple quickfire way to make Grub do what you want is to edit it just before the boot process occurs (Hit ‘E’ key when the options are listed), this provides for easy access but the changes are non permanent. The next time you reboot the options will have switched to the default.

To make permanent changes to Grub you need to edit the “/etc/default/grub” file and rebuild your Grub. Open the /etc/default/grub file in any editor(in sudo mode), I prefer to use nano or vi, the file will look something like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Now you can edit the parts that you need and save the file. For Eg. I needed to remove Splash and Quiet as options from grub so that I could see where exactly my boot sequence failed. I edited the entry GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” and removed ‘quiet splash’ from within the quotes.

After editing the file you will need to update your grub with the settings. For this execute the command:
sudo update-grub

Grub will automatically get updated with the changes and the next time you reboot the settings will be set by default.