Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

How To Install GRUB 2 On Ubuntu 9.04


This tutorial shows how you can upgrade your GRUB bootloader to GRUB 2 on Ubuntu 9.04. GRUB 2 has been rewritten from scratch to clean up everything for modularity and portability.

GRUB 2 targets at the following goals:

  • Scripting support, such as conditionals, loops, variables and functions.
  • Graphical interface.
  • Dynamic loading of modules in order to extend itself at the run time rather than at the build time.
  • Portability for various architectures.
  • Internationalization. This includes support for non-ASCII character code, message catalogs like gettext, fonts, graphics console, and so on.
  • Real memory management, to make GNU GRUB more extensible.
  • Modular, hierarchical, object-oriented framework for file systems, files, devices, drives, terminals, commands, partition tables and OS loaders.
  • Cross-platform installation which allows for installing GRUB from a different architecture.
  • Rescue mode saves unbootable cases. Stage 1.5 was eliminated.
  • Fix design mistakes in GRUB Legacy, which could not be solved for backward-compatibility, such as the way of numbering partitions.

I do not issue any guarantee that this will work for you!

 

Upgrading To GRUB 2

Open a terminal (Applications > Accessories > Terminal)…

1

… and start the upgrade as follows:

sudo aptitude install grub-pc

You will see the following questions:

Chainload from menu.lst? <– Yes
Linux command line: <– ENTER

Afterwards reboot the system:

sudo reboot

At the beginning of the boot process, you will most likely see this error – press a key to continue:

3

Select Chainload into GRUB 2 and press e:

4

Select the root entry and press e:

5

Now replace the string root

6

… with the string uuid and press ENTER:

7

Select the uuid entry and press b to boot:

8

This is how your GRUB 2 boot menu should look now, and your Ubuntu system should now boot without problems:

9

Back on your Ubuntu desktop, open a terminal again and finish the GRUB upgrade as follows:

sudo upgrade-from-grub-legacy

Output should be as follows:

falko@falko-desktop:~$ sudo upgrade-from-grub-legacy
[sudo] password for falko:

Installing GRUB to Master Boot Record of your first hard drive …

Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install’.

(hd0)        /dev/sda

GRUB Legacy has been removed, but its configuration files have been preserved,
since this script cannot determine if they contain valuable information.  If
you would like to remove the configuration files as well, use the following
command:

rm -f /boot/grub/menu.lst*

falko@falko-desktop:~$

You can now reboot…

sudo reboot

… and the system should restart without problems. If you still have problems booting, take a look at the troubleshooting section here: https://wiki.ubuntu.com/Grub2#Errors

 

  • GRUB 2: http://www.gnu.org/software/grub/grub-2.en.html
  • Ubuntu: http://www.ubuntu.com/

 

Comments

comments