Grub2 on a windows drive
Posted 22 August 2011 - 04:52 PM
Posted 23 August 2011 - 10:06 AM
I have a laptop with two physical hard drives.
One is Ubuntu, one is Windows 7.
I want to take out the ubuntu drive, but I've found that Ubuntu has helpfully set it up so GRUB2 is installed on the windows partition, and panics when the ubuntu one is absent.
I don't have the windows disk which can reinstall the windows bootloader (sigh, OEM HP windows 7).
When I try and configure the grub2 install, it configures it on the Ubuntu drive, not the Windows drive.
How do I change the configuration so that the only entry is windows?
I tried using one of those super-grub disks that allows you to recover your windows boot whatsit, but it didn't load even in failsafe mode :(
Don't normally have an issue booting liveCDs.
I can still boot the Ubuntu partition, but I don't know how to change the Grub settings on the windows disk (non primary disk).
Edited by TinBane, 23 August 2011 - 10:07 AM.
Posted 23 August 2011 - 07:43 PM
Posted 24 August 2011 - 12:00 PM
Grub isn't installed entirely into the boot record, there is a small program installed which intern loads the main grub program off of another partition.
Due to size constrains of the boot record grub supports only a few file systems. Likely NTFS isn't one of them and hence grub will be storing itself on your Ubuntu partition. To get grub onto the windows drive you are going to need a boot partition for grub to install itself into (this can be 20mb).
EDIT: Thanks for your help SledgY :)
You can't resize an NTFS partition can you?
If it was a mac, I'd resize my partition to make the 20MB free space needed.
Sigh, stupid windows. I guess I'll have to download a pirated copy of the windows CD, which actually has the utilities needed to fix the MBR.
Fuck you HP, fuck you microsoft.
Fixing a partition should be a core function of the OS, and any backup media it comes with.
The stupid HP/COMPAQ junk win7 disk I made from the laptop will only (and I mean ONLY) wipe everything back to factory settings.
It's like every other function the disk can have has been left off.
Edited by TinBane, 24 August 2011 - 12:00 PM.
Posted 24 August 2011 - 04:38 PM
You'll either need a windows disk or use something like EasyBCD to restore the windows boot loader.
Or you can create a small ext3 partition on the windows drive, copy the ubuntu /boot directory over, edit the grub configuration to point to the new directory and re-install grub.
Or re-install/restore windows
Any way you go it's a pain.
Edited by CptnChrysler, 24 August 2011 - 04:41 PM.
Posted 24 August 2011 - 04:40 PM
Posted 25 August 2011 - 05:54 PM
Posted 08 October 2011 - 12:46 PM
install lilo and use it to rewrite the mbr of the windows partition.
This will remove grub2 from there.
If you do not have access to the Windows CD, the following commands will rewrite the MBR, removing Grub and allowing the system to boot directly into Windows.
install lilo (for ubuntu)
sudo apt-get install lilo
sudo lilo -M /dev/sda mbrref. http://ubuntuforums....d.php?t=1195275 16.
edit, I've used this on my systems. to clean up after failed attempts to install and configure grub2
another way to rewrite the mbr from gnu/linux is dd.
of the 512 bites the partition table resides at 447, so this will leave the partition table alone and write the rest.
dd if=/dev/zero of=/dev/hda/ bs=446 count=1
to rewrite the entire mbr, use 512 instead of 446
Hope this helps, regards Glenn
Edited by GlennsPref, 08 October 2011 - 03:39 PM.
Posted 13 October 2011 - 09:13 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users