Grub2 on a windows drive, Google Fu Fails me |
![]() ![]() |
Grub2 on a windows drive, Google Fu Fails me |
Aug 22 2011, 04:52 PM
Post
#1
|
|
|
Mod Super Hero ![]() |
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? -------------------- Romans 10:3
absit iniuria verbis |
|
|
|
Aug 23 2011, 10:06 AM
Post
#2
|
|
|
Mod Super Hero ![]() |
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). This post has been edited by TinBane: Aug 23 2011, 10:07 AM -------------------- Romans 10:3
absit iniuria verbis |
|
|
|
Aug 23 2011, 07:43 PM
Post
#3
|
|
|
Atomican Master |
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). -------------------- poweredbypenguins.org - SledgY lives in the cloud...
|
|
|
|
Aug 24 2011, 12:00 PM
Post
#4
|
|
|
Mod Super Hero ![]() |
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. This post has been edited by TinBane: Aug 24 2011, 12:00 PM -------------------- Romans 10:3
absit iniuria verbis |
|
|
|
Aug 24 2011, 04:38 PM
Post
#5
|
|
|
Atomican Primarch ![]() |
Yep - It's a PITA.
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. This post has been edited by CptnChrysler: Aug 24 2011, 04:41 PM -------------------- Everyone's entitled to my opinion! I've got the T-Shirt to prove it.
|
|
|
|
Aug 24 2011, 04:40 PM
Post
#6
|
|
|
Mod Super Hero ![]() |
Cheers for that.
I'll try using EasyBC, then move on to a pirate windows disk. If they don't work, I'm not sure what I'll do next. Probably erase the computer and sell it off. -------------------- Romans 10:3
absit iniuria verbis |
|
|
|
Aug 25 2011, 05:54 PM
Post
#7
|
|
|
Atomican Primarch |
Uh, you can resize NTFS.
Use something like parted/gparted under ubuntu to do this. Failing that, you can do it manually with the resize utility from ntfsprogs. Resize the filesystem, then shrink the partition down with fdisk. This isn't too hard, but it's riskier if you're not careful. Another option would be to use the FreeBSD boot manager. Grab a "bootonly" FreeBSD 8.x install cd, boot it, go to "Index", "fdisk", select the windows drive, don't change the partitions at all, just press W to write the partition table as-is, and then choose the boot manager. That should do the trick for you. Not sure the FreeBSD boot manager is smart enough to boot linux. It's *very* basic which is why it doesn't have any helper-bits outside of the bootsector. You could probably also have someone with a dual-boot machine dd their windows bootsector, send it to you and then dd it onto your windows drive. -------------------- One good thing about V3 is that I no longer have to see this shit. :D
|
|
|
|
Oct 8 2011, 12:46 PM
Post
#8
|
|
|
Atomican Overlord ![]() |
I realise this is a bit late, but i thought a solution may help in future.
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) CODE sudo apt-get install lilo command, CODE sudo lilo -M /dev/sda mbr ref. http://ubuntuforums.org/showthread.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 ref. http://www.linuxquestions.org/questions/li...56/#post1526191 to rewrite the entire mbr, use 512 instead of 446 ref. http://www.cyberciti.biz/faq/linux-how-to-uninstall-grub/ Hope this helps, regards Glenn This post has been edited by GlennsPref: Oct 8 2011, 03:39 PM -------------------- "Everything depends upon relative minuteness".
Life is what "you" make of it. http://counter.li.org registered as GNU/Linux user #406321 Mageia1, kde4, openbox VirtualBox (non-ose AMD64) must read... http://www.religioustolerance.org/taoism.htm #(spiritual-stuff, it's good!) http://www.webofdebt.com/articles/dollar-deception.php |
|
|
|
Oct 13 2011, 09:13 AM
Post
#9
|
|
|
Mod Super Hero ![]() |
Cheers Glenn.
In the end, I downloaded a retail disk of windows, put it on a CD, fixed the MBR, and then threw out the disk and deleted the iso. Got ubuntu happily running on it's own SSD. -------------------- Romans 10:3
absit iniuria verbis |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 19th May 2013 - 03:48 AM |