Next Generation Emulation banner

1 - 8 of 8 Posts

·
Okama Way!
Joined
·
352 Posts
Discussion Starter #1
A couple of months ago I installed linux fedora core 2 dual boot wit XP and it prevented me from accessing windows.

this was supposedly because of kernal 2.6. There was a fix for this which involved typing stuff to reset the partition table but I couldn't get this to work and ending up beaking my HDD and having to get a new one.

My question is. sinse this was a partion table problem would installing some linux distros on one HDD and windows on another HDD would that fix this or would both HDDs share the same table and cause the same problem.

also have there been newer versions of linux released which fix this problem from accouring
 

·
Registered
Joined
·
209 Posts
I studied this hard a while back. Each harddrive has its own mbr.

The partition table is stored in the master boot record which is sector 0 of every harddrive and it can contain only 4 partitions. The master boot record also contains the first piece of software your bios will load from disk once it's finished with all initializations. The sector is only 512 bytes big and the partition table is only 16bytes per partition totalling 16*4=64 bytes. If those 64 bytes are lost then all the information about where each partitions bootsector (not to be confused with the mbr) is located and their size is lost, luckily you should be able to recover it.

When you do fixmbr and such only the bootcode of the mbr is rewritten, not the partition table. There are programs that will scan your entire disk for each partitions bootsectors which hopefully will be able to rebuild the partition table. You can find here:
http://www.geocities.com/thestarman3/testdisk.html

good luck ;)
 

·
Okama Way!
Joined
·
352 Posts
Discussion Starter #3
I didn't fully understand that

was that program for fixing boot records and partition records that have been deleted because if so then I don't think it would work as linux doesn't delete them it just reads the heads cylinders and sectors of an HDD and then instead of sending these values back to the partion table for some reason that I don't understand it sends incorrect values. when you try to boot windows it checks these values and beleives them to be correct so when they are not it can't boot.

at least I think that was the problem
 

·
Registered
Joined
·
209 Posts
First you have to know that there are two ways to describe a hard drive, and the heads, cylinders and sectors (CHS) model is not used by linux but windows still needs them to be sane values to be able to boot.

The values are stored in the CHS format in the partition table, but they are also stored in the LBA format which only has sectors and is linear.

"The partition table describes the location of partitions both in 1-dimensional ('LBA') and in 3-dimensional (CHS) form. The former is easy enough, but for the latter one needs to know the disk geometry. Note that these days this geometry is entirely fake, and different systems use different faked geometries for the same disk, giving lots of problems. (For example, a modern disk may have 2 or 4 heads, but will probably report 15 or 16 heads to the BIOS, which in turn may report 255 heads to DOS or Windows.)"

That buggy version of fedora core messed up the CHS values in the partition table but left the LBA values correct, so linux can still boot through grub but when windows boots it checks and uses the CHS values at first and fails to boot.

I suggest you read a little here if you want to know exactly how the mbr is organized:
http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/windows/2000/server/reskit/en-us/core/fncb_dis_ZDNC.asp

I'm not sure whether you have messed up your partitiontable fully while trying to fix it or not. If you have, you need to use a tool to scan your entire drive for the lost partitions as which I suggested.

I don't think your actual HD broke, but the partition table was messed up. I am guessing you have stuff you need on that drive, right?

If you are using another harddrive now, why not plug the old drive in as secondary and see if it shows up in the windows diskmanager. I think it uses LBA addressing in actual windows so if LBA values are still correct in your partitiontable you can possibly access it.
 

·
Okama Way!
Joined
·
352 Posts
Discussion Starter #5
I didn't know any of that LBA stuff.

I don't actually have the old drive it was TIME who replaced my old my old one with my shiny new one (thank god for warranties)

anyway I thought this problem wasn't just a buggy fedora core I thought it was a problem in all the linux disros that use kernel 2.6 and windows XP. either way are you sure that that tool would work, have you, tried it yourself for this problem. It's just that I know of people trying to fix this problem using windows repair discs and breaking there hdds even more i.e. being unable to even access linux.
 

·
Registered
Joined
·
209 Posts
Hmm, so you are saying they provided you with a new hd preinstalled with WindowsXP or what, because I don't think the actual harddrive can break because of invalid partition table. o_O

There are tools that will backup the masterboot record and be able to restore it later, and I'd recommend running one of those incase you want to try linux again. Or run a virtual machine instead with virtualpc or vmware (for windows) and install linux in a large file instead, that way you don't have to repartition or anything but obviously everything will run somewhat slower. But it's a good way to try out new os:s.

I found this info:
"When I boot FC2 disc 1 to rescue mode, the 2.6 kernel reports the disk geometry as 38760,16,63, while fdisk reports it as 2432,255,63, and parted reports it as 38760,16,63.

The reports of other users suggest that if new partitions are created during FC2 installation, then Disk Druid will create a new partition table using the geometry 38760,16,63 because Disk Druid uses parted. In this case, Windows will not boot. If new partitions are not created during FC2 installation, that is, the current partition table is used, then Disk Druid will not create a new partition table. In this case, Windows will boot."

So it seems that the kernel reports wrong CHS size with 2.6, I don't know if this has been fixed or not...
 

·
Okama Way!
Joined
·
352 Posts
Discussion Starter #7
so you are saying that as long as I partiotion my hard drive seperately then install linux I should be OK. if so then baring in mind that I am a cheap ass and don't like paying for software can you recomend free software that can do this or would fdisk work fine. I was told before thought that fdisk can only create one primary partion and that you can only install an OS on a primary.
 

·
Registered
Joined
·
209 Posts
By fdisk they mean fdisk for linux and not the microsoft fdisk.

I don't want to recommend installing anything unless you know 100% what you are doing. It is cruicial to have a backup plan and lots of (linux) knowledge incase it messes up again.

If I were you I'd at least backup the MBR before trying again...

Get a win98 bootdisk or something:
http://www.bootdisk.com/bootdisk.htm

Download and copy mbrtool to the bootdisk:
http://www.diydatarecovery.nl/~tkuurstra/mbrtool.htm

Be careful when using mbrtool or you could mess up your drive,
select backup to file (2) from the main menu

It will backup the entire MBR sector (512 bytes) including the partition table

If you need to restore the mbr use menu 4, and then restore...

Read the manual of MBRtool carefully or you could end up destroying your bootsector instead of backing it up.

Thereafter, as long as you don't change the windows partition in linux you should be able to restore mbr and boot normally if something goes wrong.

--

I wouldn't recommend fedora core 2 again though, dunno if it's fixed in the 3rd release.
 
1 - 8 of 8 Posts
Top