-
grub help
Hello. I have been having a few annoying grub issues that I assume is an easy fix, I just don't know how.
I am running Gutsy and occasionally when I install things via automatic updates, my grub menu is automatically reconfigured incorrectly so that ubuntu can't boot. It is an easy matter to change it back, but a bit annoying.
Below I give my current (and desired) grub menu, the grub menu that it keeps getting changed to, my /etc/fstab file, and the fdisk -l command. Any help would be greatly appreciated.
Current GRUB menu:
title 1. Ubuntu 7.10 Gutsy Gibbon
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda6 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
savedefault
title 2. Ubuntu 7.10 (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda6 ro single
initrd /boot/initrd.img-2.6.22-14-generic
title 3. Ubuntu, memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST ###
title 4. Windows Vista
root (hd0,2)
savedefault
makeactive
chainloader +1
title 5. Dell Diagnostic System Utility
root (hd0,0)
savedefault
makeactive
chainloader +1
GRUB menu it keeps getting changed to:
title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda8 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda8 ro single
initrd /boot/initrd.img-2.6.22-14-generic
title Ubuntu 7.10, kernel 2.6.20-16-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.20-16-generic root=/dev/sda8 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
title Ubuntu 7.10, kernel 2.6.20-16-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.20-16-generic root=/dev/sda8 ro single
initrd /boot/initrd.img-2.6.20-16-generic
title Ubuntu 7.10, kernel 2.6.17-11-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sda8 ro quiet splash
initrd /boot/initrd.img-2.6.17-11-generic
quiet
title Ubuntu 7.10, kernel 2.6.17-11-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sda8 ro single
initrd /boot/initrd.img-2.6.17-11-generic
title Ubuntu 7.10, kernel 2.6.17-10-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda8 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
quiet
title Ubuntu 7.10, kernel 2.6.17-10-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda8 ro single
initrd /boot/initrd.img-2.6.17-10-generic
title Ubuntu 7.10, memtest86+
root (hd0,7)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
title 4. Windows Vista
root (hd0,2)
savedefault
makeactive
chainloader +1
title 5. Dell Diagnostic System Utility
root (hd0,0)
savedefault
makeactive
chainloader +1
/etc/fstab file:
# /etc/fstab: static file system information.
#
# <device> <mount point> <file system> <options> <dump> <pass>
# proc
proc /proc proc defaults 0 0
# /dev/sda3 (Vista Partition)
# /dev/sda3 /media/vista ntfs-3g defaults,noauto,user,uid=1000,gid=1000,umask=0 0 0
# /dev/sda5 (NTFS Data Partition)
/dev/sda5 /media/ntfs ntfs-3g defaults,exec,user,uid=1000,gid=1000,umask=0 0 0
# /dev/sda6 (Linux Root Partition)
/dev/sda6 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda7 (Swap)
/dev/sda7 none swap sw 0 0
# /dev/scd0 (DVD +/- RW)
/dev/cdrom /media/cdrom0 udf,iso9660 user,noauto 0 0
# /dev/sdb1 (Thumbdrive)
/dev/sdb1 /media/thumbdrive vfat defaults,user,quiet,shortname=mixed,uid=1000,gid=1 000,umask=077,iocharset=utf8 0 0
lwpack@lwpack-pc:~$ sudo fdisk -l
[sudo] password for lwpack:
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x20000000
Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 7 1312 10485760 7 HPFS/NTFS
/dev/sda3 * 1312 4499 25603305+ 7 HPFS/NTFS
/dev/sda4 4500 38913 276430455 5 Extended
/dev/sda5 4500 29995 204796588+ 7 HPFS/NTFS
/dev/sda6 * 29996 38548 68701941 83 Linux
/dev/sda7 38549 38913 2931831 82 Linux swap / Solaris
lwpack@lwpack-pc:~$
-
You need to start by making all entries correct, the entry for recovery mode should also point to (hd0,5).
Then if you actually have that many kernels installed in your system you should do some housecleaning, keeping 2 is a good idea, more than that is pointless unless you have a need.
Not that Ubuntu updates their kernel very frequently anyways but if after doing that you still have the problem then you should place an entry outside the "automagic" section so it becomes less of a hassle.
-