Re: Comment on ATA 4 KiB sector issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 03/10/2010 05:15 PM, Tomasz Palac wrote:
>> Yes, the geometry is basically arbitrary values which can be queried
>> using a BIOS call and the reason why SCSI hosts can choose them is
>> they implement BIOS extensions themselves.
> 
> I mentioned SCSI host adapters to show that 64/32 geometry is no problem
> for Linux (and other OS-es). Really is 255/63 hardcoded in many places?

For starters, on some mobos I have, I can't change the reported
geometry.

>>> If not, then geometry can be read from partition table.
>>
>> From where?
> 
>> From the ending CHS values of partition if it ends at cylinder boundary.
> How do you calculate geometry from newer Windows partition tables (cases
> W-1, W-2 and W-3)?

By solving the equations matching CHSs and LBAs.  It only works if the
first partition ends before the CHS address limit (2 variables to
solve for so we need 2 different equations).

>> For modern OSes, geometry doesn't matter at all.  Older ones are the
>> ones having problems (I've been corrected: XP seems okay while 2000
>> depends on CHS).
> 
> You are proposing "doing what Windows is doing". This way:
> 
> 1. Partitions are aligned at 1 MiB (which is very good).
> 2. Geometry is "standard", i.e. 255/63 (which is good).
> 3. Partitions don't start and end at cylinder boundary (which is not so
>    good).
> 
> With 64/32 you can have:
> 
> 1. Partitions aligned at 1 MiB.
> 2. Geometry is not standard, but is widely used (SCSI disks, USB flash
>    disks).
> 3. Partitions start and end at cylinder boundary.

2 and 3 are meaningful iff the users agree on using that specific
geometry.  W/o any reliable way to communicate that custom geometry to
other users of the partition table, 2 and 3 virtually don't exist.
Partitioner partitions according to 64/32, BIOS reports 63/255.  It's
just broken.

We can feed 64/32 or whatever geometry to partitioners to trick them
into beliving certain geometry so that the end result is aligned in
certain way but that works only if the users of the partition table
don't care about CHS addresses in the partition table at all (most
modern ones don't).  The only reason we're talking about geometry is
for compatibility w/ older operating systems.  So, at this point,
diddling with geometry just doesn't make any sense at all.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux