Re: Disk geometry from /sys



Hello,

On Wed, Apr 9, 2008 at 11:28 PM, Lennart Sorensen
<lsorense@xxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Gmail Drive
    ... fact the "disks" in question are decidedly rectangular, and solid, such ... as the Compact Flash ones which I use. ... 1st HD (5Gb partitions) could be C, E, F, G, H, I, J, K ...
    (soc.culture.scottish)
  • Re: Gmail Drive
    ... fact the "disks" in question are decidedly rectangular, and solid, such ... as the Compact Flash ones which I use. ... 1st HD (5Gb partitions) could be C, E, F, G, H, I, J, K ...
    (soc.culture.scottish)
  • Re: Two partitions in a block device. Want to hide one
    ... My Compact Flash has two partitions. ... an EXT DOS partition. ... (l'indirizzo di reply di questo messaggio non è ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Should I enable "48-bit LBA" in this case?
    ... I didn't say anything about what was required for 48-bit LBA. ... Ken Blake - Microsoft MVP Windows: ... Do I still need to enable "48-bit LBA" when none of my partitions ... drives larger than 128/137GB. ...
    (microsoft.public.windowsxp.general)
  • Re: New HD for WinMe, AMD Duron (Feb 2001) - BIOS limit, solved?
    ... >| can cause trouble wiht major operations later (file recovery, ... confirm that you have Service Pack 3 or higher. ... the large LBA support after the service pack has been installed. ... > partition then store data on subsequent partitions. ...
    (microsoft.public.win2000.general)