Change a Hard drive from CHS to LBA

stevvie

Member
Apr 22, 2007
77
0
0
I once installed linux on a Maxtor 160gig hard drive, it is now seen as CHS and the read times have almost HALVED. I'm after converting it back to LBA like it was before but What do I use as linux changed it from LBA to CHS. All I have in my bios is LBA/Large Mode (auto, or Disabled) NO enabled or force LBA.
Can anybody help on this.

PS I know I'm going to lose all the data on the drive but as it stands the drive is hardly usable as it is so slow at reading.

Thanks

 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Originally posted by: stevvie
I once installed linux on a Maxtor 160gig hard drive, it is now seen as CHS and the read times have almost HALVED. I'm after converting it back to LBA like it was before but What do I use as linux changed it from LBA to CHS. All I have in my bios is LBA/Large Mode (auto, or Disabled) NO enabled or force LBA.
Can anybody help on this.

PS I know I'm going to lose all the data on the drive but as it stands the drive is hardly usable as it is so slow at reading.

Thanks

I have no clue what you are talking about. You can't "convert" a drive to CHS (or other low-level formats, like CKD) -- all modern ATA drives are natively LBA and cannot be changed. Perhaps you somehow installed some weird filesystem on it?

In any case -- set everything to auto in the BIOS, then do a zero fill with the manufacturer's utilities, or wipe out all the partitions on the drive and start over.
 

stevvie

Member
Apr 22, 2007
77
0
0
what happened was that I installed linux on it, didn't like linux and then reformated the drive in windowsXP as NTFS. and ever since then the drive writes twice as fast as it can read. In atto it used to write at around 70-80 MB/sec and read at around 80-90 MB/sec. But now it writes at around 70-80 MB/sec and reads at around 30-40 MB/sec. I have an old WD 10gig drive that was removed from an xbox that reads much better than that now. If I install a fresh copy of XP on the maxtor drive it take over 6 minutes to load and it should be well under a minute on a fresh install. Every S.M.A.R.T program passes this drive without an error or a warning. The only reason I said about CHS/LBA was that a freind (I.T consultant) said that if it was changed by linux then change it back, but didn't know how to change it back. As I said that was my first try of linux and have never had a problem like this before. I had used partition magic to remove the partition and let winXP install CD repartition the drive before reformating it.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,369
10,067
126
Originally posted by: Matthias99
I have no clue what you are talking about. You can't "convert" a drive to CHS (or other low-level formats, like CKD) -- all modern ATA drives are natively LBA and cannot be changed. Perhaps you somehow installed some weird filesystem on it?
CHS isn't a low-level format, it's a method of addressing, and all ATA drives still support it (along with LBA support for all newer drives 8.4GB and larger).
It's the BIOS code (and 32-bit native low-level IDE drivers) that decide whether or not a drive is supposed to run in CHS addressing mode or LBA mode. Normally, with current modern systems, the BIOS automatically defaults to LBA mode.

However,

In certain cases, depending on the partition table, if it "looks" like a CHS partition, then the BIOS will use CHS addressing for the drive, which also limits max capacity a bit.

And it just so happens, that this was a known issue with certain versions of the RedHat Linux installer, it re-writes partition tables on the HD, so that to the BIOS, they look like CHS.

The end result, if the system is continued to be used, then you can effectively scramble your HD. With RedHat in particular, people running a dual-boot found out that they could no longer properly boot Windows.

The solution is to re-write the partition table, and fix the problem.

It's too bad that current BIOS's still use an "auto" setting, instead of simply defaulting to a fixed setting of LBA mode. In some sense, the BIOS is actually one of the reasons for this bug, not just certain versions of Linux.

Originally posted by: Matthias99
In any case -- set everything to auto in the BIOS, then do a zero fill with the manufacturer's utilities, or wipe out all the partitions on the drive and start over.
The brute-force solution will also work.
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
CHS isn't a low-level format, it's a method of addressing, and all ATA drives still support it (along with LBA support for all newer drives 8.4GB and larger).
It's the BIOS code (and 32-bit native low-level IDE drivers) that decide whether or not a drive is supposed to run in CHS addressing mode or LBA mode. Normally, with current modern systems, the BIOS automatically defaults to LBA mode.

A matter of perspective, I suppose. I didn't think that modern drives natively supported CHS addressing anymore, but maybe the functionality is still there for legacy systems that want to use it. You certainly can't address the entirety of modern hard drives that way, so its utility seems very limited. But yes, it is just another way of telling the drive which blocks you want to read and write.

Forgive me for being stupid but what exactly is the brute force method ?

The 'brute force method' is what I suggested -- zero-filling the drive (or at least removing the partition table).

I'm not sure exactly how you would fix the partition table nondestructively in this case.
 

stevvie

Member
Apr 22, 2007
77
0
0
I know that I'm going to loose all the data. As soon as the drive gets about 60 gig on it it becomes so SLOWWWWW. I haven't put much more than that on it. I'm gonna use the kids 2 PC's to dump the stuff onto and have a play with the drive.
 

Zepper

Elite Member
May 1, 2001
18,998
0
0
Best to back your data up, wipe the drive and repartition/format it at the proper BIOS setting.

.bh.
 

stevvie

Member
Apr 22, 2007
77
0
0
Everything is backed up, I have almost NO control over the format/type in the bios as all I have is largeblockmode off or auto, there's NO on that will force the drive to be LBA. I have a 4coredual-VSTA but might try and put it in an older PC I have to see if I can force change the type in there.
 

stevvie

Member
Apr 22, 2007
77
0
0
Found an old board (abit KT7A) that has the settings in this order CHS,LBA,Large,Auto. This is a diamondmax9 160Gig 8mb cache hardrive.

Am I right in thinking I should be going for LBA and NOT large ?
 

Zepper

Elite Member
May 1, 2001
18,998
0
0
KT7A won't be able to handle the current large drives which need 48-bit addressing (over about 130GB).

,bh,
 

stevvie

Member
Apr 22, 2007
77
0
0
Yes it will and does as I had a previous maxtor 160gig drive with 2 meg cache on it when it was my motherboard a few years ago. And the wife still uses it now with a 160gig drive that is seen by the bios correctly and seen by windows correctly as 153gig after formating.