How to fix the grub boot menu

Asked by Sid Saxon

Boot menu list displyed by grub boot loader:

Grub 1.98=20100804-5ubuntu3
Boot version: /boot/vmlinuz-2.6.35-22 generic pae
                    initrd-img-2.6.35-22

 Menu
Ubuntu, with Linux 2.6.35-22-generic-pae(on /dev/sda5 - This is currntly the one that I boot off the primary(C:) drive
-This is also the drive where XP PRO exists.

Ubuntu, with Linux 2.6.35-22-generic-pae
" " ¨" "¨ " ¨ (recovery mode)
Memory Test (memtest 86+)
Memory test (memtest 86+, serial console 115200)
Microsoft Windows XP PRO (on /dev/sda1)
Ubuntu, with Linux 2.6.35-22-generic-pae(recovery mode)(on /dev/sda->
etc. and several others that reside on different drives (eg. /dev/sdd1; /dev/sdb1; /dev/sdc* and so on)

Iḿ assuming that the extra entries is because I did not choose one specifically during install
and it just installed to other drives because I had originally wanted it installed on a thumb drive
of 8gb in size. The problem is that I want all these entries cleaned up and off the grub boot menu.
On top of that, it seams as if I have to have the thumb drive in the USB port to boot anything.
How do I make sure that the boot menu is loaded from the /dev/sda device and not the thumb drive.
And there are many questions about grub and the menu.lst file, I have looked and I do not have that file in the
/boot/grub/ directory, WHY?
Also, How do I find out which installation is currently running. Is there a sudo command I can use for this?
Any help would be appreciated, I have been playing around with Ubuntu for a little while and Iḿ very
tech savy, mostly DOS and OS/2, but still have a problem with unix/linux conventions sometimes.
If you can leave me something to work with I feel comfortable to do it. As long as we keep my windows
partition bootable, I´ve been there before. I hope to migrate to Ubuntu or some flavor in the near future
and I will delete my windows partition forever.
I know this is a lot of questions but I really need the help.
Thanks Again for your help!
-Sid
<email address hidden>

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
delance
Solved:
Last query:
Last reply:
Revision history for this message
Best delance (olivier-delance) said :
#1

Have a look at:
   https://help.ubuntu.com/community/Grub2
There is two Grub: Grub Legacy the old one (already used by Red Hat, Fedora and the others) and Grub2 (version 1.98) only used today by Ubuntu (Open Solaris uses also a modified version of Grub2 if I remember).
Grub2 doesn't use file menu.lst but grub.cfg.

To reduce menu, look at
  https://answers.launchpad.net/ubuntu/+source/grub2/+questions?field.search_text=Reduce+Grub+menu&field.sort=RELEVANCY&field.sort-empty-marker=1&field.actions.search=Search&field.language=en&field.language-empty-marker=1&field.status=SOLVED&field.status-empty-marker=1

If you need help, run command:
    sudo parted -l
where "-l" is lowercase "L". This will display list of partition. Please post result.

If you need to have USB key plugged to boot, it means you installed MBR on it. In this case, you will have to reinstall. Look at:
   https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

Revision history for this message
Sid Saxon (ssups) said :
#2

Thanks, Iĺl get back to you.
Really appreciate the help.
-Sid

Revision history for this message
Sid Saxon (ssups) said :
#3

Delance , here is the results from the commands you left me. I did not know that the fdisk command was available in Linux also, should have known it was. Anyway, maybe the answer to my question may be more direct with this information. I´ll check back ......Thanks a ton man!

This is from the sudo parted -l command:
sid@sid-ubuntu:~$ sudo parted -l
Model: ATA WDC WD800JB-00JJ (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 69.9GB 69.9GB primary ntfs boot
 2 69.9GB 80.0GB 10.1GB extended
 5 69.9GB 79.5GB 9616MB logical ext4
 6 79.5GB 80.0GB 479MB logical linux-swap(v1)

Model: ATA WDC WD1600AAJS-0 (scsi)
Disk /dev/sdb: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 80.7GB 80.7GB primary ntfs boot
 2 80.7GB 160GB 79.4GB extended lba
 5 80.7GB 160GB 79.4GB logical ntfs

Model: WD My Book (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 312GB 312GB primary ntfs
 2 312GB 500GB 189GB extended
 5 312GB 492GB 181GB logical ext4
 6 492GB 500GB 7690MB logical linux-swap(v1)

Model: Generic STORAGE DEVICE (scsi)
Disk /dev/sdd: 8240MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 4015MB 4014MB primary ext4 boot
 2 4015MB 8239MB 4224MB extended
 5 4015MB 7995MB 3980MB logical ext4
 6 7996MB 8239MB 242MB logical linux-swap(v1)

Model: Unknown (unknown)
Disk /dev/fd0: 1475kB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
 1 0.00B 1475kB 1475kB ext2

Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label

Warning: Unable to open /dev/sr1 read-write (Read-only file system). /dev/sr1
has been opened read-only.
Error: /dev/sr1: unrecognised disk label

 RESULTS FROM sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x06b2dd2a

   Device Boot Start End Blocks Id System

/dev/sda1 * 1 8502 68289602+ 7 HPFS/NTFS

/dev/sda2 8502 9730 9860097 5 Extended

/dev/sda5 8502 9671 9391104 83 Linux

/dev/sda6 9672 9730 467968 82 Linux swap / Solaris

Disk /dev/sdb: 160.0 GB, 160041885696 bytes

255 heads, 63 sectors/track, 19457 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0xb78d19ae

   Device Boot Start End Blocks Id System

/dev/sdb1 * 1 9809 78790761 7 HPFS/NTFS

/dev/sdb2 9810 19457 77497560 f W95 Ext'd (LBA)

/dev/sdb5 9810 19457 77497528+ 7 HPFS/NTFS

Disk /dev/sdc: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x5c74ae42

   Device Boot Start End Blocks Id System

/dev/sdc1 1 37877 304242716+ 7 HPFS/NTFS

/dev/sdc2 37877 60802 184142849 5 Extended

/dev/sdc5 37877 59867 176631808 83 Linux

/dev/sdc6 59867 60802 7510016 82 Linux swap / Solaris

Disk /dev/sdd: 8239 MB, 8239710208 bytes

254 heads, 62 sectors/track, 1021 cylinders

Units = cylinders of 15748 * 512 = 8062976 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0000a8b4

   Device Boot Start End Blocks Id System

/dev/sdd1 * 1 498 3919721+ 83 Linux

Partition 1 has different physical/logical beginnings (non-Linux?):

     phys=(0, 32, 33) logical=(0, 33, 3)

Partition 1 has different physical/logical endings:

     phys=(488, 28, 7) logical=(497, 237, 41)

Partition 1 does not end on cylinder boundary.

/dev/sdd2 498 1022 4124673 5 Extended

Partition 2 has different physical/logical beginnings (non-Linux?):

     phys=(488, 32, 55) logical=(497, 242, 31)

Partition 2 has different physical/logical endings:

     phys=(1001, 159, 54) logical=(1021, 200, 28)

Partition 2 does not end on cylinder boundary.

/dev/sdd5 498 992 3887104 83 Linux

/dev/sdd6 992 1022 236544 82 Linux swap / Solaris

-Sid
<email address hidden>
You guys are so very helpful Delance I cannot thank you enough.

Revision history for this message
Sid Saxon (ssups) said :
#4

I have recently solved most of the problem, I got it to boot without the thumb drive inserted by running grub-mkconfig and then grub-update without the thumb drive inserted. And then it took some of the false or at least unwanted entries out of the boot menu list generated by grub.cfg. I also researched the documentation extensively and read most of the web page info you posted. The information you gave me lead to the resolution of my problem and I certainly appreciate it.
I would wash your car for you or something but I´m not sure where you live. hahaha
Thanks again Delance,
Your partner in crime,
-Sid
<email address hidden>
West Atlanta.......but don´t hold that against me.

Revision history for this message
Sid Saxon (ssups) said :
#5

Thanks delance, that solved my question.

Revision history for this message
Sid Saxon (ssups) said :
#6

I would just like to say that Launchpad Forums are the greatest resource anyone could have at their disposal. Delance and this forum solved my complex problem in short order and I appreciate it greatly.
Rock on Launchpad!
-Sid