Ubuntu – How to modify GRUB boot menu

grub2

The system am looking after has two hard drives of 80GB each, with about 8 partitions between them; primary and extended. It has Intel Pentium 4 and 2GB rams
The following software were installed in them as listed in the GRUB boot menu.

  • GRUB4DOS 0.4.4 2009-06-20, Memory: 640K / 1014M, MemEnd: 0x48D2A
  • Lnux Mint 11 Kalya (sdb6)
  • Windows XP Professional SP3 (sda1)
  • Linux Puppy 5.4.2 Precise (sda3/puppy5.4.2)
  • Ubuntu 11.04 Natty Narwhal (sdb8)
  • Linux-Puppy 5.2.5 Lucid (sda3/puppy525)
  • Linux-Puppy 5.3.3 Slacko (sda3/puppyslacko5.3.3)
  • Advanced Menu

Lacking knowledge of Linux decided to remove all partitions and keep only two primary partitions on each Drive. In result, the situation now is two drives with 80GB each.

  • On one drive, all the 80GB are unallocated space and would like to keep it like that until I read through the vast contributions and have the hang of Linux distributions.
  • On the other drive the 80GB are used for the MBR and two primary partitions, both NTFS filesystem, 70Gb for the root bootable with Windows XP preinstalled and the rest for the 2nd partition which is reserved for use as recovery.

The problem is, GRUB boot Menu did not reflect this change. It is still showing the same old list (the 7 items listed earlier at top) of bootable programs.

Reading an article by Dedoimedo I thought I might be able to find where GRUB was installed and manually remove the entries from the boot menu: But didn’t get to fully understand it.

I also thought I might find GRUB stage 2 files or directory in the root directory with Windows XP, so I made file search in Windows explorer but it returned zero result.

I appreciate any help toward answering the following;

  • Is it possible to substitute GRUB with Windows own Bootloader and how to do that?
  • How to find where GRUB’s stage 1 & 2 files are installed; what are files or directory names?
  • How to change the list on GRUB’s boot menu, if I have to retain GRUB?
  • I understand that GRUB’s stage 1 could be found in the first sector installed alongside the MBR but how to find it?

I have Linux Mint 16 Live, System rescue.iso and GParted live.iso (which I used to delete the partitions): all of them are on CD’s.

There were lots of useful command strings in Dedoimedo’s article including complete command listing on how to add OS to GRUB menu. I thought removing programs from the menu would just be the reverse of adding a program: The problem is I was not able to do the first step of changing the command cursor / line from Mint $ character to GRUB directory.

Your help much appreciated

Best Answer

You can use Boot-Repair or manually update MBR with Windows type boot loaders syslinux or lilo from Ubuntu live CD or flash drive, or many Linux repair ISO.

Grub stage 1 & stage 2 refer to grub legacy which few now remember. Almost all instructions are for grub2. Ubuntu standardized on grub2 with 9.10 or five years ago. Grub4dos is a version of grub legacy for use in NTFS partitions. But grub2 will also work in FAT32, NTFS or Linux formatted partitions.

Both grub legacy & grub2 use this to update grub menu. From Working install:

sudo update-grub

Boot-Repair will not work on grub legacy, but may offer to update to grub2 if your install is still currently supported.

https://help.ubuntu.com/community/Boot-Repair

Related Question