Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How you can fix your screwed up Win Bootblock...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tim77
Apprentice
Apprentice


Joined: 13 May 2003
Posts: 211
Location: Germany

PostPosted: Fri May 16, 2003 6:54 pm    Post subject: How you can fix your screwed up Win Bootblock... Reply with quote

Just in case, someone has the same problem and is searching this forum for a solution... :wink:

After I installed Grub I, WinXP refused to boot. I think I wrote grub via
Code:
setup (hd0,0)
instead of
Code:
setup (hd0)
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
Code:
fixboot c:
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... :wink:
Back to top
View user's profile Send private message
soulwarrior
Guru
Guru


Joined: 21 Oct 2002
Posts: 331

PostPosted: Fri May 16, 2003 8:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mystilleef
Guru
Guru


Joined: 27 Apr 2003
Posts: 561
Location: Earth

PostPosted: Fri May 16, 2003 8:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Fri May 16, 2003 10:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tim77
Apprentice
Apprentice


Joined: 13 May 2003
Posts: 211
Location: Germany

PostPosted: Sat May 17, 2003 9:06 am    Post subject: Reply with quote

I tried fixboot and fixmbr both without any success. The dd-solution solved the problem.
Back to top
View user's profile Send private message
radTube
n00b
n00b


Joined: 05 Mar 2003
Posts: 24
Location: Finland

PostPosted: Sun May 18, 2003 4:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
elmie
Tux's lil' helper
Tux's lil' helper


Joined: 12 Sep 2002
Posts: 124
Location: Brisbane - Australia

PostPosted: Tue May 20, 2003 12:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Tue Aug 12, 2003 7:33 am    Post subject: Reply with quote

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
View user's profile Send private message
kabutor
l33t
l33t


Joined: 12 Dec 2002
Posts: 821
Location: Benalmadena - Melrose Place

PostPosted: Thu Sep 25, 2003 2:06 am    Post subject: Reply with quote

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 !! :D :D :D
Back to top
View user's profile Send private message
aman
Apprentice
Apprentice


Joined: 07 Sep 2003
Posts: 198
Location: Bay Area, California

PostPosted: Thu Sep 25, 2003 8:05 am    Post subject: Reply with quote

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. :lol:

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
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Thu Sep 25, 2003 10:57 pm    Post subject: Reply with quote

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 !! :D :D :D



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
View user's profile Send private message
aman
Apprentice
Apprentice


Joined: 07 Sep 2003
Posts: 198
Location: Bay Area, California

PostPosted: Thu Sep 25, 2003 11:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Thu Sep 25, 2003 11:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon Sep 29, 2003 11:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum