chebe: (Default)
[personal profile] chebe
Problem: Grub replaced MBR without asking.

I'm a dual-booter. I keep the XP installation that my laptop came with because some proprietary software, especially the newest stuff, only really works on Windows. I also have a partition for work purposes, with crazy-strict security. And then, then I like to install different flavours to play around with. So happened one day I was playing with Ubuntu. Then it did something that I disliked very much, it replaced my Windows MBR with grub. But not just any grub, one with config files bloated with comments and talk of auto-updating. I quickly decided that Ubuntu (at least that release) wasn't for me*, but I couldn't delete for fear of what it would do to my booting ability. Fast forward a few months and I've managed to get the grub menu to be chain-loaded from the default Windows MBR. (I did it mostly ass-about-backwards, but these are the important steps.)


Solution:
1. Burn yourself a linux rescue cd, just in case. Personally I like SystemRescueCd (also, wget for Windows? *glee*). Backing up all the files in question is a good idea as well.

2. Boot into your Linux that maintains the active grub menu. Copy the boot sector to a file (name unimportant).
dd if=/dev/sda4 of=/mnt/external/bootfile.lnx bs=512 count=1

3. Boot into Windows XP, copy the bootfile.lnx somewhere, and edit your boot.ini. It's probably hidden, so from cmd.exe:
cd C:\
edit boot.ini


Append to end of file (under operating systems) something like:
C:\bootfile.lnx="Linux Grub"
Save and exit.

4. Insert a Windows Installation disc, or Windows rescue disc. Reboot into cd. Go to the Recovery Console (R), select which Windows partition (generally 1), enter password (may be null, in which case just press return), and at prompt enter:
fixmbr
Accept warning. When complete, reboot.

5. Try out your new menu.


I am almost back to where I was. One of my Linux partitions is still buried inside the grub menu. I was unable to create a working bootfile for it to give it it's own MBR entry, but I haven't given up. Also, I did most of this in reverse order, and used the linux rescue cd to reinstall/re-setup grub on the Ubuntu partition. I don't think that was necessary, but I was/am just figuring things out. Maybe that's what allowed me to create the working bootfile? I don't know yet, but I'll keep looking.




*(I don't intend to do any kind of flavour bashing here, this is just personal opinion. If you disagree, good, variety is, as they say, the spice of life :)
From:
Anonymous (will be screened)
OpenID (will be screened if not validated)
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org


 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.
Page generated 2017-Aug-23, Wednesday 11:47 am
Powered by Dreamwidth Studios