You are not logged in.

#1 2004-06-18 22:32:31

Cobalt
Member
Registered: 2004-06-05
Posts: 10

Grub ate my windows

To start, here's my setup:
/dev/discs/disc0/part1    <-Windows 98SE partiation (FAT32)
/dev/discs/disc1/part1    <- /boot (EXT2)
/dev/discs/disc1/part2    <- / (EXT3)
/dev/discs/disc1/part3    <- swap
/dev/discs/disc1/part4    <-/home

When i recently got a grub update, i figured i better reinstall it on the harddrive and so i ran grub-install --root-directory=/boot "(hd0,0)" ...not remembering exactly which partition I had originally installed it on, and appearantly, this scenario overwrote the data that boots windows, rendering windows unbootable. I spent all day trying to figure out a way to fix this..still can't get it. When I tried the windows install cd and told it to install some boot info without reformatting the disc, it simply refused to accept the fact that the disc was formatted, and thus wouldnt write anyting to it for me. I know the filesystem and everything is in perfect shape...i can access it thorough linux. Does anyone have some insight as to how i might undo my little blunder without reformatting my whole windows disc and reinstalling windows? Thanks

Offline

#2 2004-06-18 22:46:29

afu
Member
From: Tuscalooser, Alabummer
Registered: 2004-02-19
Posts: 155

Re: Grub ate my windows

Sounds like you overwrote the boot sector. Go to www.bootdisk.com and get a dos 6.2.2 (or whatever) boot disk. Boot from the a: drive and give the command:
fdisk /mbr
That will recreate the windows boot sector. You won't have access to linux then I guess, other than booting from floopy or cdrom.
_shawn

Offline

#3 2004-06-18 22:48:22

iotc247
Member
From: Florida
Registered: 2004-05-31
Posts: 177
Website

Re: Grub ate my windows

I think it deleted windows.. Not sure though.. Anyways you should have installed in (hd0)

Offline

#4 2004-06-18 22:51:28

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Grub ate my windows

afu wrote:

That will recreate the windows boot sector. You won't have access to linux then I guess, other than booting from floopy or cdrom.

So make a boot disk for Linux too. smile

Offline

#5 2004-06-19 03:02:03

Cobalt
Member
Registered: 2004-06-05
Posts: 10

Re: Grub ate my windows

I tried fdisk /mbr  even before i posted the first post....all it does is give me some crap about it not being a system drive or not formatted or something like that...(i'm too lazy to reboot and try it so i could quote it) As for the other posts...no, windows is NOT gone, it's all there and all the data is quite healthy. What i'm trying to avoiddoing is backing up gigs worth of data, reinstalling windows (which appearanly requires reformatting the hd in this case..it refuses to do it otherwise). grrrr :x
I honestly could care less about windows even being on my system..but my mother just cant seem to learn that gnome [kde] and windows guis are virtually the same from the really really basic user's perspective.

PS: the reason i have all that data on the windows drive is rather complicated..but it's there nontheless...

Offline

#6 2004-06-19 19:33:03

afu
Member
From: Tuscalooser, Alabummer
Registered: 2004-02-19
Posts: 155

Re: Grub ate my windows

Hmmm...
At this point I would suggest backing the data up because it dosen't sound good. After that, disconnect all other drives and make sure the windows drive is set as primary, your bios is set correctly, blah, blah, blah, then try booting and fdisk /mbr again. Could be the disk is going bad, or some other strange thing. But whatever it is, back your stuff up asap.

As a side note to the strange, I have a spare computer that works fine except it won't boot because the disk "appears" to be bad to the bios. Weird, but it will boot when I force it and it runs fine. Might not next week though.

-Shawn

Offline

#7 2004-06-20 15:22:20

afu
Member
From: Tuscalooser, Alabummer
Registered: 2004-02-19
Posts: 155

Re: Grub ate my windows

One other thing I thought of last night. I think I remember reading somewhere that lilo makes a copy of the mbr when it is run, and that it can be copied back using the "dd" command. You might want to research the grub stuff and see if it does this as well.
-Shawn

Offline

#8 2004-06-25 13:38:07

monolin
Member
Registered: 2004-03-06
Posts: 31

Re: Grub ate my windows

just a quick but ultimate solution:

1. you shouldn't use dos622 bootdisk since it does not support FAT32 partitions.
2. You need this ultimate tool called: bootpart (just do a search in google)
3.  Bootpart can reconstruct hd0 bootsector for winxp/2k/95 and can add other bootsectors into boot.ini.
4. just install grub or lilo in your / partition and run bootpart from dos.

have fun!

You are using win98? The perhaps this method is better:

http://newdos.yginfo.net/grubdos.htm

get grub for dos, and when you boot win98, press F8 and you go into dos mode, then execute grub for dos and use it as you do with Linux grub.
Its manual is short. just take a look.


When false is taken for true, true becomes false;
If non-being turns into being, being becomes non-being.

Pages full of fantastic talk
Penned with bitter tears;
All men call the author mad,
None his message hears.

Offline

#9 2004-07-06 21:10:16

neotuli
Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204
Website

Re: Grub ate my windows

SOLVED!!! (I'm cobalt..but some stuff got mixed up...lost that name somehow or other...and got knocked offline for two weeks...wow the last little while has been bad)

So yes, i solved this sucker and saved windows. As i was praying and going to backup my entire harddrive, I figured I may as well try to run fsck.vfat (despite the fact that microsoft's own scandisk was refusing to recognize the disk) to try to make sure i wasnt backing up useless, munched up, data. So, as good 'ol fsck got revved up and goin...this wonderful alert came up "Current boot sector does not match backup boot sector...what would you like to do? A)copy backup to current B)Copy current to backup C) Do nothing" And i found myself thinking....all this wasted time...and THERE WAS A BACKUP?!?!:oops:
So anyway, i punched a and let fsck finish what it was doing, then rebooted and windows worked as always. oh joy


The suggestion box only accepts patches.

Offline

Board footer

Powered by FluxBB