[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux Software  |  Linux Installation Support  |  Topic: Restoring the boot sector
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: Restoring the boot sector  (Read 4020 times)
0 Members and 1 Guest are viewing this topic.
sashijoseph
Linux Noob !
*
Offline Offline

Posts: 14


View Profile
« on: September 03, 2004, 09:30:33 PM »

I have win98 and FC1 dual boot.Now I accidently installed grrub in the boot sector of the win98 partition(hda1) instead of the mbr(hda).Of course 98 won't boot.Does grub keep a backup of the sector it is writing?Or is there any other way of restoring the boot sector?
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #1 on: September 04, 2004, 01:48:46 AM »

In this case , boot from win98 startup disk and then do "fixmbr" , now again boot to Fedora using installation disk and using linux rescue install grub on MBR . your problem will be solved !
Logged
sashijoseph
Linux Noob !
*
Offline Offline

Posts: 14


View Profile
« Reply #2 on: September 05, 2004, 11:24:20 AM »

Ricky,what I meant was that I accidently wrote to the boot sector of win98 partition INSTEAD of the mbr.So now I actually have the mbr in the 98 boot sector ie I get the grub screen with win and fc1 listed;fc1 boots fine but when I select win98 it executes the boot sector(first sector of 98 partition)and i get the same grub screen back again.Even if I do a fdisk/mbr,the problem remains as it's not the mbr but the 98 boot sector which is at fault.
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #3 on: September 05, 2004, 11:38:30 AM »

Well.. if you do fdisk -MBR then it will remove grub !! but you are having grub so you are doing wrong.

In right manner, after fixmbr you will not get grub , you can only boot windws then again write to mbr ie install grub .. then you will be fine.
Logged
sashijoseph
Linux Noob !
*
Offline Offline

Posts: 14


View Profile
« Reply #4 on: September 06, 2004, 01:56:29 PM »

Well Ricky thanks for keeping this thread alive.I don't think there is a 'fixmbr' in win98;there's one in XP though.But even if there was I don't think it would help because it would remove grub from the mbr and only win98 would be left but it wouldn't correct the boot sector of win98 partition.Like I said I accidently wrote grub to the 98 boot sector instead of the mbr.So even if the mbr is corrected by 'fixmbr' it wouldn't help as the job of the mbr is to read the partition table and load the boot sector of the appropriate partition into memory and pass control to it.This boot sector then loads the operating system.But I've lost this boot sector which now contains grub.The mbr and this boot sector are both different things.
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #5 on: September 07, 2004, 02:07:18 AM »

win98 does contains..  fdisk -MBR


Smiley

Wht you need is first restore win98 boot sector so that you can boot 98 then install grub so that you can boot both !!
Logged
sashijoseph
Linux Noob !
*
Offline Offline

Posts: 14


View Profile
« Reply #6 on: September 08, 2004, 01:25:57 PM »

Booted from win98 CD.... fdisk -MBR
"Parameter format not correct  -MBR"
Ricky are you sure it is fdisk -mbr and not fdisk /mbr?
Thanks.
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #7 on: September 09, 2004, 12:26:00 AM »

hmm..
yes it is fdisk /mbr sorry for last reply ..
Logged
avo
New Member

Offline Offline

Posts: 1


View Profile
« Reply #8 on: September 11, 2004, 04:45:56 PM »

Sashijoseph, I'm recovering from exactly the same problem. No amount of fdisk /mbr can possibly fix this problem. To understand what's broken you have to understand a little about how grub works. Grub installls basically what amounts to a jump table in the MBR. The real work of booting up is done by extracting the OS specific boot info stored at the beginning of a partition. You and I, alas, replaced the Win98 boot block with another copy of grub's mbr (a.k.a. stage1).

The good news is that you can boot up Linux. Linux will let you  mount your Win98 partition. All you files are there!  If you have room save it in a Linux partition. Then you can reformat the windows as a bootable partition, and then (using Linux again) copy all your saved win stuff back into your new win partition.

Lastly, after you've done that you may want to make a copy of your win98 boot block:
dd if=/dev/hda1 of=MBRhda1.bin bs=512 count=1
(Assuming your win partition is hda1)
I believe the file created will be a snapshot of the Win98 boot block. It may help if you ever have to recover your win partition again.

Check out this site for more stuff on grub, mbr, windows, etc.
http://www.geocities.com/thestarman3/asm/mbr/GRUB.htm
Logged
sashijoseph
Linux Noob !
*
Offline Offline

Posts: 14


View Profile
« Reply #9 on: September 11, 2004, 11:31:05 PM »

Yeah thanks Avo for the tip. Cheesy
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #10 on: September 12, 2004, 01:27:48 AM »

Quote from: "avo"
Sashijoseph, I'm recovering from exactly the same problem. No amount of fdisk /mbr can possibly fix this problem. To understand what's broken you have to understand a little about how grub works. Grub installls basically what amounts to a jump table in the MBR. The real work of booting up is done by extracting the OS specific boot info stored at the beginning of a partition. You and I, alas, replaced the Win98 boot block with another copy of grub's mbr (a.k.a. stage1).

The good news is that you can boot up Linux. Linux will let you  mount your Win98 partition. All you files are there!  If you have room save it in a Linux partition. Then you can reformat the windows as a bootable partition, and then (using Linux again) copy all your saved win stuff back into your new win partition.

Lastly, after you've done that you may want to make a copy of your win98 boot block:
dd if=/dev/hda1 of=MBRhda1.bin bs=512 count=1
(Assuming your win partition is hda1)
I believe the file created will be a snapshot of the Win98 boot block. It may help if you ever have to recover your win partition again.

Check out this site for more stuff on grub, mbr, windows, etc.
http://www.geocities.com/thestarman3/asm/mbr/GRUB.htm


Hmm..
I had been same problem once.. I copied win98 boot sector and then installed grub and pointed it to load win98 !
anyway.. wht we all need is solution .. one or another way !
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
booting Linux from windows boot loader How to (Dual boot) -A Linux Tutorials & How To's « 1 2 » Ricky 17 18173 Last post August 30, 2007, 01:56:47 AM
by akashyak
boot.ini Linux Installation Support sirius 1 3253 Last post August 06, 2004, 08:39:52 AM
by Ricky
Problem with Boot Loader and Boot Sectors Linux Installation Support mohit_kakkar 5 1016 Last post April 08, 2006, 02:10:44 AM
by dalek
Dual linux boot and dual windows boot together? Distribution Specific Stuart36 3 893 Last post March 20, 2007, 02:50:10 PM
by Ricky
restoring all data from backup excluding an FS Miscellaneous ivo10 1 386 Last post May 07, 2008, 04:40:10 AM
by gauravbajaj
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 07:02:34 PM

Login with username, password and session length
Navigation
Recent Discussions
[Today at 02:29:08 PM]

[November 20, 2008, 11:30:52 PM]

[November 19, 2008, 07:52:41 PM]

[November 19, 2008, 07:52:36 PM]

[November 17, 2008, 10:42:59 AM]

[November 16, 2008, 12:49:47 AM]

[November 16, 2008, 12:48:58 AM]

[November 15, 2008, 08:29:02 AM]

[November 15, 2008, 08:24:41 AM]

[November 14, 2008, 05:11:50 AM]
Members
Total Members: 6229
Latest: razon_nnn
Stats
Total Posts: 8270
Total Topics: 2254
Online Today: 14
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 14
Total: 14
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc