PDA

View Full Version : [ubuntu] messed up windows 7 boot loader



poldie
July 19th, 2010, 09:58 PM
At least, I think that's what I've done. Certainly it doesn't boot and I get a grub recovery prompt.

I'm trying to install ubuntu 10.04 to a usb key, and the install completes normally, but I think the default option must be to edit the local hard drive's boot system to boot from the usb key - a spectacularly stupid thing to do, given that the whole point of installing an OS to a usb key is that you'll be using it on other PCs. Perhaps this isn't what happened, but I'm now on the same laptop (dell lattitude e6400) using a live ubuntu 10.04 so the laptop is working fine; I can see files on the hard drive.

I've done fdisk -l and I get:

ubuntu@ubuntu:~$ 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: 0x117d3f32

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 9730 78046208 7 HPFS/NTFS


I don't seem to be able to boot from my windows 7 disk.

A lot of the help on the net seems to refer to earlier versions of grub than is supplied with ubuntu 10.04, so the help doesn't work.

Is there anything I can do to get windows 7 to boot? I don't mind using grub to boot windows.

Sticky_Bit
July 19th, 2010, 10:08 PM
I ran into a similar issue. You are going to want to use your Win 7 disk to do a repair and fix the boot loader using fixboot and fixmbr.

The following article may help. http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector

poldie
July 19th, 2010, 10:17 PM
I ran into a similar issue. You are going to want to use your Win 7 disk to do a repair and fix the boot loader using fixboot and fixmbr.

The following article may help. http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector

I don't seem to be able to boot from my win 7 disk though.

oldfred
July 20th, 2010, 12:12 AM
Lilo boot loader works the same way as windows and will boot windows from the MBR. You installed grub to sda when you wanted it installed to the USB drive. You should use the advance button on the last partition screen where it says ready to install.

http://members.iinet.net/~herman546/p28/032_install-now.png

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Computer_does_not_bo ot_without_external_drive

Restore basic windows boot loader - universe enabled
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr
May show error messages about the rest of lilo missing, ignore, we just want MBR

per kansasnoob Note: If I use Lilo to restore a Windows MBR using my "installed" Ubuntu I always like to remove the package "lilo" when done just to prevent some later "conflict" with grub updates, this of course is as easy as "sudo apt-get remove lilo".

Sticky_Bit
July 20th, 2010, 12:44 AM
I don't seem to be able to boot from my win 7 disk though.

I mean you need to boot from the Win 7 installation media, not the hard drive. If you can't boot the installation media. You need to enable booting from cd/dvd in your bios.

poldie
July 21st, 2010, 08:23 PM
Lilo boot loader works the same way as windows and will boot windows from the MBR. You installed grub to sda when you wanted it installed to the USB drive. You should use the advance button on the last partition screen where it says ready to install.

http://members.iinet.net/~herman546/p28/032_install-now.png

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Computer_does_not_bo ot_without_external_drive

Restore basic windows boot loader - universe enabled
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr
May show error messages about the rest of lilo missing, ignore, we just want MBR

per kansasnoob Note: If I use Lilo to restore a Windows MBR using my "installed" Ubuntu I always like to remove the package "lilo" when done just to prevent some later "conflict" with grub updates, this of course is as easy as "sudo apt-get remove lilo".

Thanks, that did the trick.