ABXZone Computer  Forums



Welcome to the ABXZone Computer Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Reply
 
LinkBack Thread Tools Display Modes
Old 10-09-2004, 07:03 PM   #1
Registered User
 
Fish_abx's Avatar
 
Join Date: Feb 2003
Location: Oxford
Posts: 110
MBR Madness

I have a SATA disk on my PC. It has four partitions, three primary and one extended.

The first primary partition is WinXP and the last primary partition contains Debian Linux. Booting is controlled by grub via the Debian install.

Can I get rid of the Linux/Debian install and get rid of grub and then fix the MBR back to whatever it was under the original Windows install?

When I boot off the Windows CD it won't recognize my SATA disk so fixmbr and other commands come up empty.

So, erm, it looks like I could be stuffed?

Board is an Asus P4G8X (7205 Granite Bay).



Fish
__________________
Las qué passoun
tournoun pas maï

Asus P4G8X P4 2.4b @ 2.91, PNY GeForce 7600GS, Debian GNU/Linux Unstable, OpenSUSE 10.2 & WinXP
(Offline)   Reply With Quote
Old 10-09-2004, 10:51 PM   #2
????????????????
 
swannema's Avatar
 
Join Date: Feb 2001
Posts: 9,627
Did you try fdisk/mbr with a boot disk, after you boot into a: just execute fdisk/mbr
I never tried it with a SATA drive, so I don't know if it will work.
(Offline)   Reply With Quote
Old 10-11-2004, 03:17 AM   #3
Self Terminated
 
Join Date: Dec 2002
Posts: 3,311
It semi works on sata you have to do it through the windows XP recovery console.
(Offline)   Reply With Quote
Old 10-11-2004, 01:34 PM   #4
The race for quality has no finish line- so technically, it's more like a death march.
 
Join Date: Feb 2001
Posts: 18,159
The nice thing about the XP recovery console is that you will have the SATA drivers referenced before getting to the console. There are two commands to try:
fixmbr
fixboot (link to fixboot is found on link below about fixmbr)
http://www.microsoft.com/resources/d...ns_fixmbr.mspx
__________________

(Offline)   Reply With Quote
Old 10-11-2004, 02:56 PM   #5
PHX
 
wallijonn's Avatar
 
Join Date: Jul 2004
Location: Phoenix
Posts: 2,569
You wouldn't just want to get rid of GRUB.

You would first want to run Linux' FDISK and undo all the Linux partitions, especially the swapspace, then write the table out to it. This will basically format that partiton (actually clear it).

http://www-uxsup.csx.cam.ac.uk/suse/...9.0/node8.html :

Quote:
Boot from the Windows XP CD and press the R key during the setup to start the recovery console. Select your Windows XP installation from the list and enter the administrator password. At the input prompt, enter the command FIXMBR and confirm with y when asked to do so. Then reboot the computer with exit.
You might also be able to issue the bootconfig command at the Recovery Console command prompt.

I hope that the Repair process asks for a SATA driver floppy (in case you need to do a re-install). {I don't have SATA drives on my sys and I use caddies so that I never have to have bootloaders type problems}.

Does hitting F8 work when you boot?, hopefully bypassing GRUB?

Hopefully you have your boot.ini, ntldr, ntdetect.com, \system32\wpa.bdl and wpa.bak on floppy or CDR.

I say that you need to erase the Linux partitions just in case; after all it is probably in Reiser format and WXP may have problems seeing that partition. I do it as a matter of course. Of course you could always try not doing it this wasy and reporting back, in this thread, your findings.
(Offline)   Reply With Quote
Old 10-11-2004, 03:17 PM   #6
The race for quality has no finish line- so technically, it's more like a death march.
 
Join Date: Feb 2001
Posts: 18,159
Quote:
Originally Posted by wallijonn
I say that you need to erase the Linux partitions just in case; after all it is probably in Reiser format and WXP may have problems seeing that partition. I do it as a matter of course. Of course you could always try not doing it this wasy and reporting back, in this thread, your findings.
Having Linux partitions on a box will not affect Windows.

Generally, a person will install GRUB (or LILO) in the MBR. If so, this does not get recreated by a Linux partition residing on the 'puter. Another option a person has is to install GRUB on a 'booting' partition using a Linux partition. This is my preferred method because I control the booting up of the OSes with a boot manager. Having GRUB on a Linux partition instead of the MBR will also not affect Windows if the partitions are left on the box. You have to explicitly tell Linux where to install GRUB, it's fortunately not done automagically.

Here's a simple fact about Windows.
It must boot from an active primary partition.

Therefore, with the proper tools, you can force the partition that Windows resides on to become the active primary partition after fixing the MBR.
__________________

(Offline)   Reply With Quote
Old 10-11-2004, 03:58 PM   #7
PHX
 
wallijonn's Avatar
 
Join Date: Jul 2004
Location: Phoenix
Posts: 2,569
Quote:
Originally Posted by pointreyes
With the proper tools, you can force the partition that Windows resides on to become the active primary partition after fixing the MBR.
Such as?

My concern was for WXP to see the Linux partition in admin tools/computer management and to be able to format it from within the OS. Will WXP even see the partition? It should see the disk, so you would think it would see all the partitions, but will it see it as 'healthy' and will it allow you to put it on-line and format? I say that if you erase it first you should not have any problems formatting it from within WXP. Of course it could have the opposite effect - if you erase Linux it could wipeout the MBR when you write the disk table out... who knows for sure?

The safest way would be to fixmbr and then if WXP has problems boot from the Linux CD and run fdisk to delete the partitions and write the disk table back out; reboot, go into WXP and format the drive.

I base this on my experience using an HD for Linux then making it useable for Windows. It isn't as easy as just quick formatting the drive (in this case formatting the Linux partition).

I do know that if you have separate disks, and if you install Linux while the Windows HD (hd0) is connected, it will modify the MBR of the first disk (hd0) and install a bootloader. If however you install Linux onto HD1 without HD0 connected you will need to boot via the BIOS setting as no multiboot bootloader will get written to the first drive, hd0. That is my preferred way of doing it; others will see it as a major inconvience.

Last edited by wallijonn : 10-11-2004 at 04:10 PM.
(Offline)   Reply With Quote
Old 10-11-2004, 04:32 PM   #8
The race for quality has no finish line- so technically, it's more like a death march.
 
Join Date: Feb 2001
Posts: 18,159
Quote:
Originally Posted by wallijonn
I do know that if you have separate disks, and if you install Linux while the Windows HD (hd0) is connected, it will modify the MBR of the first disk (hd0) and install a bootloader.
You are making it rather absolute.

Linux will not install a loader on the MBR unless you explicitly say so. However, the instructions can be quite cryptic during the installation process about where to install the loader. I have been installing Linux since 1996 and I have always been given the option of where to install the loader. If you are using a distro that is not being this friendly about it, I don't suggest it being used.

Here's what does absolutely gets modified in the MBR. The partition table. Nothing else is touched unless it is explictly stated during the installation. The Windows bootloader will not be touched if a person makes sure to tell Linux to boot from a different partition. Then a boot manager has to be used to force the MBR to look to that partition for the booting up phase.

The Windows Disk Management utility will allow you to reformat a Linux partition at least it does for me with ext2, ext3, and reiser. The utility will see the partitions as different type of partitions but the utility fortunately does allow for reformating of the partition. What can a person use to fix the MBR? A boot manager. Why? Because you can backup the MBR before installing another OS. What prevents using the MBR for booting up Linux? A boot manager. Are there any free boot managers? Yes, XOSL. I use the commercial based System Commander for my boot manager. It's worth it's weight in gold for the hassles it has reduced for me with playing around with other OSes.

Oh yeah, image backups are the greatest.
__________________

(Offline)   Reply With Quote
Old 10-12-2004, 07:18 AM   #9
Registered User
 
Fish_abx's Avatar
 
Join Date: Feb 2003
Location: Oxford
Posts: 110
Quote:
Originally Posted by pointreyes
The nice thing about the XP recovery console is that you will have the SATA drivers referenced before getting to the console. There are two commands to try:
fixmbr
fixboot (link to fixboot is found on link below about fixmbr)
Well, to get back to basics: the WinXP CD does not recognize my sata hd so using the recovery console is no good because it can't do anything. I can go through the fixmbr routine but the only devices it can find are the cdroms and the floppy. I guess I could reinstall the sata drivers using f6 earlier in the sequence, but wanted to avoid this in case it trashed the hd. Anyway, I think I will leave it for now and plug on with Debian. I should have a fully working Debian installation in, aah, only another three weeks or so if I can find the time to devote, say, ten hours a day to configuration issues ... but in the meantime Grub is booting up WinXP OK.

Thanks for the comments.



Fish
__________________
Las qué passoun
tournoun pas maï

Asus P4G8X P4 2.4b @ 2.91, PNY GeForce 7600GS, Debian GNU/Linux Unstable, OpenSUSE 10.2 & WinXP
(Offline)   Reply With Quote
Old 10-12-2004, 11:09 AM   #10
The race for quality has no finish line- so technically, it's more like a death march.
 
Join Date: Feb 2001
Posts: 18,159
Quote:
Originally Posted by Fish
I guess I could reinstall the sata drivers using f6 earlier in the sequence, but wanted to avoid this in case it trashed the hd.

Thanks for the comments.



Fish
If your concern is trashing the hdd then if the XP CD would have seen the SATA you would still be at the same risk as you were suspecting if you had to use F6.
__________________

(Offline)   Reply With Quote
Old 10-12-2004, 02:34 PM   #11
Passionately Objective
 
ChAsM's Avatar
 
Join Date: Apr 2001
Location: MD
Posts: 917
Quote:
Originally Posted by pointreyes
Linux will not install a loader on the MBR unless you explicitly say so.
Unfortunately pointreyes, that is not entirely true of all distros. Some do not provide an in-your-face prompt unless you install in expert mode or do custom package installation.
__________________
--PeAcE--

<---ChAsM---<<


Loyalty is an honorable trait. Enmity is disgraceful.
(Offline)   Reply With Quote
Old 10-12-2004, 03:16 PM   #12
The race for quality has no finish line- so technically, it's more like a death march.
 
Join Date: Feb 2001
Posts: 18,159
Quote:
Originally Posted by ChAsM
Unfortunately pointreyes, that is not entirely true of all distros. Some do not provide an in-your-face prompt unless you install in expert mode or do custom package installation.
And hence the reason why I said: "If you are using a distro that is not being this friendly about it, I don't suggest it being used."

I personally hate distros that are automagically installing onto the MBR and believe they should stop being used in order to get a message to the idiots that believe it's ok to modify such an important part of the installation.

Er, not like I'm telling how I really feel about this subject.
__________________

(Offline)   Reply With Quote
Old 10-12-2004, 05:15 PM   #13
Passionately Objective
 
ChAsM's Avatar
 
Join Date: Apr 2001
Location: MD
Posts: 917
LOL. Sorry about that PR. Not sure how I could've missed something *that* blatantly obvious. It's becoming increasingly more difficult to do my job AND browse these forums.
__________________
--PeAcE--

<---ChAsM---<<


Loyalty is an honorable trait. Enmity is disgraceful.
(Offline)   Reply With Quote
Old 10-12-2004, 05:35 PM   #14
The race for quality has no finish line- so technically, it's more like a death march.
 
Join Date: Feb 2001
Posts: 18,159
Quote:
Originally Posted by ChAsM
LOL. Sorry about that PR. Not sure how I could've missed something *that* blatantly obvious. It's becoming increasingly more difficult to do my job AND browse these forums.
I know the feelin'. I'm very overworked and the sad part is that I'm overworked on something that I hate doing. I hate fixing other peoples mistakes when the mistake is soooooo bad that I'm literally rewriting all the functional stuff to fit the 'pretty' GUI that a 'programmer' built. I mean this is a seriously bad one I'm stuck with, I reduced code by 2,500+ lines and yet added a huge amount of functionality that was within scope of what was expected and yet was not developed by the other 'programmer.'
__________________

(Offline)   Reply With Quote
Old 10-12-2004, 07:26 PM   #15
Self Terminated
 
Join Date: Dec 2002
Posts: 3,311
Quote:
Originally Posted by Fish
Well, to get back to basics: the WinXP CD does not recognize my sata hd so using the recovery console is no good because it can't do anything. I can go through the fixmbr routine but the only devices it can find are the cdroms and the floppy. I guess I could reinstall the sata drivers using f6 earlier in the sequence, but wanted to avoid this in case it trashed the hd. Anyway, I think I will leave it for now and plug on with Debian. I should have a fully working Debian installation in, aah, only another three weeks or so if I can find the time to devote, say, ten hours a day to configuration issues ... but in the meantime Grub is booting up WinXP OK.

Thanks for the comments.



Fish
basically you are booting grub from the grub shell and you have to type oin where windows is and chianload it?

Fix boot and fixmbr work fine when you have a stage 2 grub install but not stage 1.5 for some reason of which i have no idea.
(Offline)   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.1
vBulletin Skin developed by: vBStyles.com