Saturday, June 4, 2011

Customize The GRUB Boot Loader Using BURG




Are you setting up your computer to dual-boot between two operating systems (or more)? If so, you must be familiar with the boot loader. This tool enables users to choose which operating system he/she wants to log into. The boot loader that comes with the Ubuntu installation is called GRUB.

GNU GRUB is a Multiboot boot loader. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn.
Briefly, a boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software (such as the Hurd or Linux). The kernel, in turn, initializes the rest of the operating system (e.g. GNU,Ubuntu).

As useful as it is, the GRUB boot loader is not looking so pretty. The interface is only as beautiful as a text-based interface can be. Even though some people can live with it just fine, some others wish they could beautify the look a little bit. If you don’t mind meddling with command lines, you can apply some eye candy (and more functionalities) to GRUB with the help of BURG.

BURG

According to the explanation in the Community Ubuntu Documentation:
BURG stands for Brand-new Universal loadeR from GRUB. It’s based on GRUB and adds features like new object format and configurable menu system.

Get BURG

BURG is not included in Ubuntu’s standard repository. So you should add the server that hosts BURG files to the repository by executing this command line:

"sudo add-apt-repository ppa:bean123ch/burg"

Then you should download and install BURG (loader, themes and emulator). Use this command to do that:

"sudo apt-get update && sudo apt-get install burg"

Configuring BURG

Skip the First 3 steps and 4th step will ask you to choose which device is the “GRUB install device“. If your computer has only one hard drive, you will only see one device. The problem is, how to select it? To avoid accidentally skipping this configuration, press Space to select the device before pressing Enter. You have Multiple Hard Drives select one installed with GRUB.

New Look to Your GRUB

The configuration is now done. You can restart your system and the GRUB boot loader menu will be replaced by BURG.

Navigating within BURG is easy: use the arrow keys on the keyboard to choose the operating system and Enter to load it.

You can also switch between themes easily by pressing F2 to bring up the list of available themes, move between the items with arrow keys, and hit Enter to choose one. Here are some examples of available themes.



Installing BURG From Windows

BURG also comes with a Windows installer

Download Page

This method to be working only if you installed Ubuntu from within Windows. So for those who installed Ubuntu alongside Windows, you have to stick with the command lines...

How to install Burg boot loader in Ubuntu 11.04 Natty Narwhal

* To Install Burg in Ubuntu 11.04 Natty Narwhal, Open termianl and enter the following commands :

"sudo add-apt-repository ppa:n-muench/burg"

"sudo apt-get update"

"sudo apt-get install burg burg burg-common-pc-emu burg burg burg-themes-themes-common"

* Now to make BURG integrate the HardDisk enter the following command in terminal:
"burg sudo-install "(hd0)""
Remember to substitute ‘hd0′ with the drive on which your MBR is installed.

* Now update burg:

"sudo update-burg"

* Change Theme.

Burg comes with many nice temes by default, to change theme, reboot and press "T" on your keyboard at Burg screen. then select the theme you want to use.

If you want to use another easy way to configue burg, you need to install Burg- manager


Advance Method to Install BURG

Wubi install

If you install ubuntu using wubi, follow steps in this section. Otherwise, jump to the next section.

First, download the latest burg_wubi package from the download area, and extract to C:\ubuntu\ directory.

To enable graphic menu, download the latest burg-themes package from download area, and extract to C:\ubuntu\burg\ directory.

Then, copy C:\ubuntu\burg\wubildr to C:\ and overwrite the old file.

That's it, it will display BURG menu next time you start wubi from NT loader.

To restore the original loader, just copy C:\ubuntu\winboot\wubildr to C:\.

BTW, you may notice that all OS uses the unknown icon, this is because wubildr rely on /boot/grub/grub.cfg to add menu items, but grub.cfg don't have the --class option which is required to display OS icon properly. This is easy to fix. Login ubuntu, copy 10_lupin and 30_os-prober from /host/ubuntu/burg/ directory to /etc/grub.d/, then run update-grub to generate a new grub.cfg.

Normal install

Here are the steps to install BURG using PPA package from launchpad.

1. Insert these lines to /etc/apt/sources.list

deb http://ppa.launchpad.net/bean123ch/burg/ubuntu lucid main
deb-src http://ppa.launchpad.net/bean123ch/burg/ubuntu lucid main

You should replace lucid with the correct code name. Currently the following release are supported: jaunty (9.04), karmic (9.10), lucid (10.04), maverick (10.10).

And install burg and related themes using these commands:

sudo apt-get update
sudo apt-get install burg

If you want to avoid the warning about unknown signature, use these commands to import it:

gpg --keyserver keyserver.ubuntu.com --recv 55708F1EE06803C5
gpg --export --armor 55708F1EE06803C5 | sudo apt-key add -

Then, install burg to MBR with the following command:

sudo burg-install /dev/sda
sudo update-burg

Change hd0 if you want to install to other disk.

2. Edit configuration file /etc/default/burg

For the latest version, you don't need to modify /etc/default/burg at all. If you upgrade from previous version, it's recommended to change the setting of GRUB_THEME and GRUB_FOLD to:

GRUB_THEME=saved
GRUB_FOLD=saved

This allows you to change theme and folding options dynamically.

Here are the hot-keys defined in the boot menu:

* t - Open theme selection menu
* f - Toggle between folding mode
* n - Jump to the next item with the same class
* w - Jump to the next Windows item
* u - Jump to the next Ubuntu item
* e - Edit the command of current boot item
* c - Open a terminal window
* 2 - Open two terminal windows
* h - Display help dialog (only available in sora theme)
* i - Display about dialog (only available in sora theme)
* q - Return to old grub menu
* F5/ctrl-x - Finish edit
* F6 - Switch window in dual terminal mode
* F7 - List the folded boot items
* F8 - Toggle between graphic and text mode
* F9 - shutdown
* F10 - reboot
* ESC - quit from the current popup menu or dialog.

Since 20100309 version, burg also supports grub2 theme. To try it, set GRUB_THEME to the name of the theme file, and run update-burg. Currently only one grub2 theme is available in burg-themes package:

GRUB_THEME=/boot/burg/themes/debian-theme/theme.txt


3. Live preview themes in host OS

To preview the current configuration, use this command:

sudo burg-emu

grub2 theme needs to access disk directly, to preview it, you need to add -D option:

sudo burg-emu -D

4. Troubleshooting

If you encounter issue with BURG, try the tipsBURG fails to start after I boot into Windows??

This happens mostly to Dell machines. The root cause of this issue is that some program writes information at the beginning of disk, which overwrites part of the multi-sector BURG MBR. The solution is to use alternative install mode that uses only one sector MBR which is guaranteed to be safe.

You can boot into rescue CD, open a rescue shell on the original root device, and use something like this to install BURG to MBR:

burg-install --alt /dev/sda

The option --alt indicates alternative install mode.

BURG works, but it hangs when I try to boot Linux??

This could be caused by the protected mode Linux loader, you can try the old real mode loader linux16/initrd16. Boot into rescue shell, add this settings to /etc/default/burg:

GRUB_LINUX16=true

Then use update-burg to generate a new burg.cfg.

2 comments:

Earth Maniebo said...

There are some errors

W: Failed to fetch http://ppa.launchpad.net/bean123ch/burg/ubuntu/dists/natty/main/binary-i386/Packages 404 Not Found

Arunlal Mathew || ലുട്ടുമോന്‍ said...

Download it manually from: http://linux.softpedia.com/get/System/System-Administration/BURG-58322.shtml

All the Best...

Post a Comment