Ubuntu Technical

Ubuntu technical problems and solutions reference, a modern cookbook.

Grub 2/Burg bootloader customization tips

So, if you are like me, having multiple operating systems running, you may wish to customize the grub bootloader.

Note: All the information below are also valid for Burg customisation

Places of interest for Grub:
This is the main initialization file which is loaded. All the parameters you ever need can be set here.

This is automatically generated by grub-mkconfig.

Here are the files which load up the partitions when the command

sudo update-grub

is called.
This files need to be changed in order to achieve the desired loading priority and custom naming.

Form the file /boot/grub/grub.cfg you can copy all the menuentrys and paste them into the file: /etc/grub.d/40_custom.
A menuenty looks like this:

menuentry 'Ubuntu, 11.10' --class ubuntu --class gnu-linux --class gnu --class os {
	set gfxpayload=$linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos4)'
	search --no-floppy --fs-uuid --set=root #some code here
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=#some code here
	initrd	/boot/initrd.img-3.0.0-12-generic

The file 40_custom contains the custom entries which you want. In order for grub to take the changes into consideration during the update, the file needs to be made executable. An then grub updated.

sudo chmod +x /etc/grub.d/40_custom
sudo update-grub

Enjoy 😉

Flattr this


2 responses to “Grub 2/Burg bootloader customization tips

  1. Tushar Kumar November 25, 2011 at 9:55 am

    Very useful post arzki

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: