Grub rescue xp/ubuntu dual boot fix
Hi. I'm new to Ubuntu and I installed Ubuntu 10.4 (later updated to 10.10) on a system which already contained XP Pro. All worked fine untill I had trouble booting in. I used LiveCD to restore my Grub2 after which I still couldn't boot in to any of the operating systems. Previously I could boot into Ubuntu or XP but now I can't. I thought it might have been the presence of a harddrive which I attached later to the system so I disconnected the drive after all else failed but still the problem persisted. Instead it gave me a "grub rescue" prompt. From a previous analysis, I also know that my partitions are not in disk order. I found a script that analyses the problem. Here's the results of the script. Please help. Boot Info Script 0.55 dated February 15th, 2010
=======
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #6 for (,msdos6)
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
partition #6 for (,msdos6)
sda1: _______
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /boot/grub/core.img
sdb1: _______
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM
sdb2: _______
File system: Extended Partition
Boot sector type: -
Boot sector info:
sdb5: _______
File system: swap
Boot sector type: -
Boot sector info:
sdb6: _______
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files/dirs: /grub/grub.cfg /boot/grub/grub.cfg /etc/fstab
=======
Drive: sda ___________________ _______
Disk /dev/sda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders, total 39102336 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start End Size Id System
/dev/sda1 * 63 39,086,144 39,086,082 7 HPFS/NTFS
Drive: sdb ___________________ _______
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start End Size Id System
/dev/sdb1 * 63 78,300,809 78,300,747 7 HPFS/NTFS
/dev/sdb2 78,301,182 156,296,384 77,995,203 5 Extended
/dev/sdb5 153,003,123 156,296,384 3,293,262 82 Linux swap / Solaris
/dev/sdb6 78,301,184 153,001,983 74,700,800 83 Linux
blkid -c /dev/null: _______
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 42205458205454CF ntfs
/dev/sda: PTTYPE="dos"
/dev/sdb1 10C08E2DC08E195C ntfs HOMECOMPUTER
/dev/sdb2: PTTYPE="dos"
/dev/sdb5 0f18590d-
/dev/sdb6 b51db19b-
/dev/sdb: PTTYPE="dos"
=======
Device Mount_Point Type Options
aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdb6 /mnt ext4 (rw)
/dev/sda1 /media/
/dev/sdb1 /media/HOMECOMPUTER fuseblk (rw,nosuid,
=================== sda1: Location of files loaded by Grub: ===================
??GB: boot/grub/core.img
=======
[boot loader]
timeout=30
default=
[operating systems]
multi(0)
=======
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_
set saved_entry=
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
if loadfont /usr/share/
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
set locale_
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set 10c08e2dc08e195c
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows XP Professional (on /dev/sdc1)" {
insmod part_msdos
insmod ntfs
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set fe60955d60951e09
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.
### BEGIN /etc/grub.
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.
### BEGIN /etc/grub.
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.
=======
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_
set saved_entry=
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
}
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
menuentry 'Ubuntu, with Linux 2.6.35-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.35-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
echo 'Loading Linux 2.6.35-24-generic ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.35-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.35-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
echo 'Loading Linux 2.6.35-23-generic ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
linux16 /boot/memtest86
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set b51db19b-
linux16 /boot/memtest86
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set 10c08e2dc08e195c
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows XP Professional (on /dev/sdc1)" {
insmod part_msdos
insmod ntfs
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set fe60955d60951e09
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.
### BEGIN /etc/grub.
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.
### BEGIN /etc/grub.
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.
=======
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sdb6 during installation
UUID=b51db19b-
# swap was on /dev/sdb5 during installation
UUID=0f18590d-
/dev/fd0 /media/floppy0 auto rw,user,
=================== sdb6: Location of files loaded by Grub: ===================
59.5GB: boot/grub/core.img
59.5GB: boot/grub/grub.cfg
45.9GB: boot/initrd.
71.2GB: boot/initrd.
67.9GB: boot/initrd.
59.6GB: boot/vmlinuz-
60.5GB: boot/vmlinuz-
60.6GB: boot/vmlinuz-
40.2GB: grub/core.img
44.6GB: grub/grub.cfg
67.9GB: initrd.img
71.2GB: initrd.img.old
60.6GB: vmlinuz
60.5GB: vmlinuz.old
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu grub Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- delance
- Solved:
- Last query:
- Last reply: