lkml.org 
[lkml]   [2008]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Disk geometry from /sys
Hello,

On Wed, Apr 9, 2008 at 11:28 PM, Lennart Sorensen
<lsorense@csclub.uwaterloo.ca> wrote:
> Many compact flash cards will report 16 heads, and 16 or 32 sectors
> per track. Compact flash can of course connect as an IDE drive, so they
> are worth supporting (I keep trying to get the grub guys to accept my
> patch to fix their code that also assumed all disks have 63 sectors per
> track if they use LBA, but which is false since compact flash also
> supports LBA even with smaller sizes).
>

Ok so assuming 255 heads seems not to be a good idea.

> Simplest way to find out what geometry a disk pretents to have is to ask
> fdisk,

or to create a new entry in /sys:

/sys/block/sda/geometry/heads

?

> and since the only use for the information is when creating
> partitions, then fdisk's opinion is really all that seems to matter. Of
> course partitions can start and end anywhere so the total size is
> actually all that really matters.
>

I'm not sure about that. Some bootloaders have constraint on the start
and end of a partition. It assume they're aligned on a cylinder size
boundary. I got this warning from sfdisk(8).

Thanks
--
Francis


\
 
 \ /
  Last update: 2008-04-10 21:25    [W:0.135 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site