View previous topic :: View next topic |
Author |
Message |
Tim77 Apprentice
Joined: 13 May 2003 Posts: 211 Location: Germany
|
Posted: Fri May 16, 2003 6:54 pm Post subject: How you can fix your screwed up Win Bootblock... |
|
|
Just in case, someone has the same problem and is searching this forum for a solution...
After I installed Grub I, WinXP refused to boot. I think I wrote grub via instead of into my WinXP partition accidently. The result was a "Disk error" reported by grub any time I tried to boot Windows.
So I had to find a way to fix it. I tried a from the Win Install CD without any success. After searching google I found a solution:
On Fat32-Partitions there is a backup of the original boot sector in sector 6. You can use the Linux command dd to copy it to the right location and overwrite your corrupted boot sector. Assuming your Win-Partition is /dev/hda1:
Code: | # Make a backup of your corrupted boot sector...
dd if=/dev/hda1 of=bootsect-original.bin bs=512 count=1
# Copy sector 6 to sector 0
dd if=/dev/hda1 of=bootsect.bin bs=512 count=1 skip=6
dd if=bootsect.bin of=/dev/hda1 bs=512 count=1 |
Hopefully someone will be glad to read this... |
|
Back to top |
|
|
soulwarrior Guru
Joined: 21 Oct 2002 Posts: 331
|
Posted: Fri May 16, 2003 8:11 pm Post subject: |
|
|
If I remember correctly there does also exist the "fixmbr" command on the Windows-XP cdrom, maybe this could also help to fix the bootsector.
I was once in the same situation and I think I rescued my system with fixmbr and fixboot. |
|
Back to top |
|
|
Mystilleef Guru
Joined: 27 Apr 2003 Posts: 561 Location: Earth
|
Posted: Fri May 16, 2003 8:39 pm Post subject: |
|
|
Hello Gents,
I usually do a fixboot and fixmbr to rewrite the MBR, this wipe grup or lilo of. I then use a chroot into my linux partition via a Gentoo-live CD and then use grub or lilo as the case may be.
It fixmbr should be done with caution. The last time I use it, I lost the my MBR, but I doubt that was the reason, I had done several silly things prior to that command.
In many cases, people experiencing the problem listed above can't even boot into a Windows XP bootable CD. The above post might rectify this problem.
Good Luck
Mystilleef _________________ simple, sleek and sexy text editor for gnome
"My logic is undeniable." |
|
Back to top |
|
|
ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Fri May 16, 2003 10:17 pm Post subject: |
|
|
Boot from a DOS disk and run: fdisk /mbr
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|
Back to top |
|
|
Tim77 Apprentice
Joined: 13 May 2003 Posts: 211 Location: Germany
|
Posted: Sat May 17, 2003 9:06 am Post subject: |
|
|
I tried fixboot and fixmbr both without any success. The dd-solution solved the problem. |
|
Back to top |
|
|
radTube n00b
Joined: 05 Mar 2003 Posts: 24 Location: Finland
|
Posted: Sun May 18, 2003 4:44 pm Post subject: |
|
|
Y'all should read Tim77's initial post again. He accidentally installed grub into the first sector of the windows partition, not into the mbr of the disk. Can't fix that by replacing the mbr. |
|
Back to top |
|
|
elmie Tux's lil' helper
Joined: 12 Sep 2002 Posts: 124 Location: Brisbane - Australia
|
Posted: Tue May 20, 2003 12:29 pm Post subject: |
|
|
lol, what a complete waste of time with all the crap.. excuse me!
if you can get or have a bootable floppy, stick it into the PC, boot it with the windows floppy..
once done just type fdisk /mbr to remove the GRUB boot from the drive and windows is back, good as gold mate!! simple.....
have fun |
|
Back to top |
|
|
Reformist Guru
Joined: 06 Oct 2002 Posts: 323
|
Posted: Tue Aug 12, 2003 7:33 am Post subject: |
|
|
worked for me as well! Go fat 32 and dd! Man am I glad I formatted everything fat32... my friends say it's an abomination compared to ntfs, but when you're doing linux interop, it's essential! _________________ -Phil Crosby |
|
Back to top |
|
|
kabutor l33t
Joined: 12 Dec 2002 Posts: 821 Location: Benalmadena - Melrose Place
|
Posted: Thu Sep 25, 2003 2:06 am Post subject: |
|
|
Same dumb mistake here, and browsing with lynk and this post saves me 10 hours work. (The dd trick works in fat32 perfect)
Nice Post Tim77 !!!!! Thank you very much !! |
|
Back to top |
|
|
aman Apprentice
Joined: 07 Sep 2003 Posts: 198 Location: Bay Area, California
|
Posted: Thu Sep 25, 2003 8:05 am Post subject: |
|
|
If you copy ntldr, and ntdetect.com from the winxp cdrom in the /i386 directory to your c, or windows boot drive, then run fixmbr you will be in good shape. It might be a little redundant, but it works for me every time. Oddly, now that I have spent so much time setting up gentoo, I dont even care about my windows installs anymore.
replace drive with your cd-rom drive letter, and run these two commands after cd'ing into your C drive.
Code: | copy drive:\i386\ntldr c:\ |
Code: | copy drive:\i386\ntdetect.com c:\ |
Of course this assumes that you will be fixing grub also!!
[/code] _________________ Yes, I do run Gentoo on production servers... |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Thu Sep 25, 2003 10:57 pm Post subject: |
|
|
kabutor wrote: | Same dumb mistake here, and browsing with lynk and this post saves me 10 hours work. (The dd trick works in fat32 perfect)
Nice Post Tim77 !!!!! Thank you very much !! |
Yeah me too!
Too many late nights going round in circles trying to get r5 to genkernel to something that actually boots I guess.
Sadly my win98 didnot like the dd trick. It got rid of my duplicate grub on the boot sector but it wont boot (missing OS) and I cant even swap to C:(abort/retry/fail)!
Does anyone know if there is a variant for win98. Sector 6 did not seem to be the right thing.
I really dont want to reinstall win98 because of a dumb slip-up like that.
Thanks in advance. |
|
Back to top |
|
|
aman Apprentice
Joined: 07 Sep 2003 Posts: 198 Location: Bay Area, California
|
Posted: Thu Sep 25, 2003 11:14 pm Post subject: |
|
|
Sorry I dont have any tips for WIN98, but maybe now is a good time to switch to WIN2000 or something. _________________ Yes, I do run Gentoo on production servers... |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Thu Sep 25, 2003 11:26 pm Post subject: |
|
|
Yeah, well I'd prefere to upgrade one OS at a time that way I'm not throwing everything into the air.
As for win2000 the whole reason Im investing time in trying Linux is 'cos I'd had an arse full of windows. To be honest it no longer looks so bad!
Now back to recover my boot sector. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Mon Sep 29, 2003 11:31 am Post subject: |
|
|
Follow up on last post:
I didnot manage to recover my win98 bootsector with the dd tip given above. Not sure why because I'm sure I have used that in the past on this system.
I used a floppy created with sys a: and then added a copy of sys.com to the floppy.
reboot system with floppy and execute sys c:
Finally a fdisk /mbr to be sure of a clean start and reinstalled Grub (correctly this time) on hd0.
HTH |
|
Back to top |
|
|
|