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? |
Go to terminal and post the output from these commands
Code:
sudo fdisk -l |
These are the results from the two commands:
~$ sudo fdisk -l Disk /dev/sda: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 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: 0x000379de 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 Bill |
Sorry - typo. Try these both (the second should show us the Windows entry)
Code:
grub-install -v |
~$ grub-install -v
grub-install (GNU GRUB 1.98-1ubuntu6) ~$ 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 ### |
That seems to be getting some useful information.
I can confirm the uuid, provided it is not case sensitive: sudo blkid /dev/sda1 /dev/sda1: UUID="4C8477B284781D60" TYPE="ntfs" |
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. |
No, I don't believe so - feel free to review it, it's just a txt file.
It expands config files (boot areas), not data files. |
You could try making your windows partition (sda1) active as your fdisk output shows the Ubuntu (sda2) marked active. That is not necessary.
|
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. sda1: _________________________________________________________________________ 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 sda2: _________________________________________________________________________ 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 sda3: _________________________________________________________________________ File system: swap Boot sector type: - Boot sector info: sda4: _________________________________________________________________________ File system: Extended Partition Boot sector type: - Boot sector info: sda5: _________________________________________________________________________ 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: sda6: _________________________________________________________________________ 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: sda7: _________________________________________________________________________ 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: sda8: _________________________________________________________________________ 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: sda9: _________________________________________________________________________ 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: sdb1: _________________________________________________________________________ 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: sdb2: _________________________________________________________________________ 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: =========================== Drive/Partition Info: ============================= Drive: sda ___________________ _____________________________________________________ Disk /dev/sda: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 51,391,934 51,391,872 7 HPFS/NTFS /dev/sda2 * 51,391,935 100,117,079 48,725,145 83 Linux /dev/sda3 100,117,080 121,692,374 21,575,295 82 Linux swap / Solaris /dev/sda4 121,692,499 488,392,064 366,699,566 5 Extended /dev/sda5 121,692,501 203,993,369 82,300,869 83 Linux /dev/sda6 436,566,438 488,392,064 51,825,627 7 HPFS/NTFS /dev/sda7 246,388,968 390,540,149 144,151,182 b W95 FAT32 /dev/sda8 390,540,213 436,566,374 46,026,162 83 Linux /dev/sda9 203,993,433 246,388,904 42,395,472 83 Linux Drive: sdb ___________________ _____________________________________________________ Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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 156,280,320 312,576,704 156,296,385 83 Linux /dev/sdb2 63 156,280,319 156,280,257 7 HPFS/NTFS blkid -c /dev/null: ____________________________________________________________ Device UUID TYPE LABEL /dev/sda1 4c8477b284781D60 ntfs /dev/sda2 de43a309-c853-4c6c-8a61-0bf393a60898 ext3 Linux_D0 /dev/sda3 5a05d343-f156-496c-83f2-561109061fc1 swap /dev/sda4: PTTYPE="dos" /dev/sda5 bd6ccef6-a9f1-448d-8787-7058ec640559 ext4 Linux_D1 /dev/sda6 5A18B30B18B2F4D3 ntfs Drive_E /dev/sda7 648C-921E vfat DRIVE_D /dev/sda8 905a2d08-a66a-486a-be89-74bbac520033 ext4 Linux_db /dev/sda9 c76ff422-9803-4ed8-b1f5-a8ba491d697f ext4 Linux_D2 /dev/sda: PTTYPE="dos" /dev/sdb1 40240cb9-8836-4bb9-a4f2-864462c78d99 ext3 D160_Lin1 /dev/sdb2 9A3847063846F12D ntfs 160_0 /dev/sdb: PTTYPE="dos" ============================ "mount | grep ^/dev output: =========================== Device Mount_Point Type Options /dev/sda2 / ext3 (rw,errors=remount-ro) ================================ sda1/boot.ini: ================================ [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /usepmtimer =========================== sda2/boot/grub/grub.cfg: =========================== # # 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 ### =============================== sda2/etc/fstab: =============================== # /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: =================== 40.7GB: boot/grub/core.img 40.7GB: boot/grub/grub.cfg 41.0GB: boot/initrd.img-2.6.31-21-generic 40.7GB: boot/initrd.img-2.6.32-22-generic 40.6GB: boot/initrd.img-2.6.32-23-generic-pae 40.7GB: boot/vmlinuz-2.6.31-21-generic 40.7GB: boot/vmlinuz-2.6.32-22-generic 40.6GB: boot/vmlinuz-2.6.32-23-generic-pae 40.6GB: initrd.img 40.6GB: vmlinuz |
Quote:
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? Good night for now. |
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:
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! |
All times are GMT -5. The time now is 02:04 PM. |