Upgrade from Ubuntu 9.? to 10.4 messed up dual boot
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Upgrade from Ubuntu 9.? to 10.4 messed up dual boot
I upgraded 64 bit Ubuntu to 10.4 two weeks ago.
Prior to upgrade, I had dual boot to:
XP - on sda1 (NTFS) and
Ubuntu - on sda2 (ext3).
After the upgrade, I could not boot into XP. I tried blindly running one of the "this will repair your grub" commands, but that probably made things slightly worse. There were some other problems too, so I decided on a fresh install from cd of 32-bit ubuntu 10.4. That is working nicely! Thanks Ubuntu team!
But I still can't boot to XP. If I try, I just get a blinking cursor in the upper left corner of a black screen - until I give up and hard boot.
Two questions I see when trying to find a solution are: Where is my grub installed? and: Am I using Grub or Grub2?
I'm still a relative newbie, and I don't know how to get the answers to those questions, and I don't want to make things any worse by guessing.
Perhaps someone can point me to some more complete repair instructions?
Device Boot Start End Blocks Id System
/dev/sda1 1 3199 25695936 7 HPFS/NTFS
/dev/sda2 * 3200 6232 24362572+ 83 Linux
/dev/sda3 6233 7575 10787647+ 82 Linux swap / Solaris
/dev/sda4 7576 30401 183349783 5 Extended
/dev/sda5 7576 12698 41150434+ 83 Linux
/dev/sda6 27176 30401 25912813+ 7 HPFS/NTFS
/dev/sda7 15338 24310 72075591 b W95 FAT32
/dev/sda8 24311 27175 23013081 83 Linux
/dev/sda9 12699 15337 21197736 83 Linux
Partition table entries are not in disk order
~$ grub-instal -v
No command 'grub-instal' found, did you mean:
Command 'grub-install' from package 'grub-efi-amd64' (universe)
Command 'grub-install' from package 'lupin-support' (main)
Command 'grub-install' from package 'grub-efi-ia32' (universe)
Command 'grub-install' from package 'grub-coreboot' (universe)
Command 'grub-install' from package 'grub-ieee1275' (universe)
Command 'grub-install' from package 'grub' (main)
Command 'grub-install' from package 'grub-pc' (main)
grub-instal: command not found
~$ sed -n '/30_/,/30_/ p' /boot/grub/grub.cfg
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4c8477b284781d60
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
I don't run grub2 if I can avoid it, so I have nothing (with Win) to compare that to. Can you go to sf.net and get the bootinfoscript and run that. Post the RESULTS.txt it generates - will tell us where all the boot code points to.
grub2 - I never heard of it before running into problems after this update. I'll try to find time to read about switching back.
I have run the boot info script, and will post it when I get home from work. Are there security concerns with posting all of that information?
Thanks for your help!
By the way, I saw two other inquiries on the bootinfoscript page at sf.net from people who upgraded Ubuntu to 10.04 and lost their alternate Win boots in the process. Neither had received help yet, but I'll monitor them for ideas.
OK, here is the bootinfoscript result:
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #2 for /boot/grub.
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
partition #2 for /boot/grub.
File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda1 and
looks at sector 79539751 of the same hard drive for
core.img, but core.img can not be found at this
location. No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM
File system: ext3
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda2 and
looks at sector 79457727 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System: Ubuntu 10.04 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
File system: ext4
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda5 and
looks at sector 80131247 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System:
Boot files/dirs:
File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda6 and
looks at sector 79572599 of the same hard drive for
core.img, but core.img can not be found at this
location. According to the info in the boot sector,
sda6 starts at sector 63.
Operating System:
Boot files/dirs:
File system: vfat
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda7 and
looks at sector 79523263 of the same hard drive for
core.img, but core.img can not be found at this
location. According to the info in the boot sector,
sda7 starts at sector 0. But according to the info
from fdisk, sda7 starts at sector 246388968.
Operating System:
Boot files/dirs:
File system: ext4
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda8 and
looks at sector 79676711 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System:
Boot files/dirs:
File system: ext4
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda9 and
looks at sector 79588815 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System:
Boot files/dirs:
File system: ext3
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sdb1 and
looks at sector 79556151 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System:
Boot files/dirs:
File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sdb2 and
looks at sector 79490495 of the same hard drive for
core.img, but core.img can not be found at this
location. No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_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_entry=${chosen}
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
}
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-23-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
linux /boot/vmlinuz-2.6.32-23-generic-pae root=UUID=de43a309-c853-4c6c-8a61-0bf393a60898 ro quiet splash
initrd /boot/initrd.img-2.6.32-23-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-23-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
echo 'Loading Linux 2.6.32-23-generic-pae ...'
linux /boot/vmlinuz-2.6.32-23-generic-pae root=UUID=de43a309-c853-4c6c-8a61-0bf393a60898 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-23-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=de43a309-c853-4c6c-8a61-0bf393a60898 ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
echo 'Loading Linux 2.6.32-22-generic ...'
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=de43a309-c853-4c6c-8a61-0bf393a60898 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=de43a309-c853-4c6c-8a61-0bf393a60898 ro quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
echo 'Loading Linux 2.6.31-21-generic ...'
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=de43a309-c853-4c6c-8a61-0bf393a60898 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set de43a309-c853-4c6c-8a61-0bf393a60898
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4c8477b284779d71
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# 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.d/40_custom ###
# /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/sda2 during installation
UUID=de43a309-c853-4c6c-8a61-0bf393a60898 / ext3 errors=remount-ro 0 1
# swap was on /dev/sda3 during installation
UUID=5a05d343-f156-496c-83f2-561109061fc1 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
=================== sda2: Location of files loaded by Grub: ===================
File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda1
This is the reason XP won't boot. If you're lucky fixboot from recovery console may correct this - see this technet article (follow the commands link).
Else it a XP re-install.
If that display is correct it looks like you (re-)installed grub into every partition ...
Yes I saw that it looks like grub is installed into every partition, but I don't know how I managed that - I merely performed the simplest install of Ubuntu that I could - which was not the simplest choice offered. At this point I am still learning how things are supposed to be, so many of the details fly under my radar.
Anyway, thanks for looking through that listing! Looks like the end is in sight, but now I'm falling asleep.
I've tried to find grub on one of the partitions, and cannot. Is there a definitive way to confirm exactly where it is? And is it safe to delete the extra copies if found?
Terminology problem.
There appears to only be one copy of the grub executables (i.e. one "installation"). However it has been setup in each of those partitions
Quote:
I tried blindly running one of the "this will repair your grub" commands, but that probably made things slightly worse.
Hmmmm ....
Doesn't matter for Linux, but it does for Windows.
I also did an upgrade on a dual-boot system. I had 64-bit Windows 7 and Ubuntu 9.10 dual booting. I was using the Windows loader (via bcdedit) to select between Windows 7 (the original OS) and 32-bit Ubuntu 9.10.
I booted into Ubuntu (the windows loader loads a boot sector that I previously had retrieved from sda5 where my ubuntu resided), brought up the ugrade manager and selected the upgrade to 10.4. It appeared to work ok (though when I upgraded an Ubuntu only system at work, it said it would not upgrade grub, yet on this system there was no such warning).
When I rebooted and selected ubuntu, I got the grub rescue prompt only.
I tried snagging the boot sector from sda5 again and replaced the existing file with which the windows loader works, but then windows complained and grub was now gone.
I really don't want to clobber my linux paritions and start all over, but it's looking like I might have to do so.
Any suggestions? Thanks in advance!
Last edited by prj2; 08-23-2010 at 11:01 PM.
Reason: spelling
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.