Re: Disk geometry from /sys
- From: "Francis Moreau" <francis.moro@xxxxxxxxx>
- Date: Thu, 10 Apr 2008 21:23:32 +0200
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/
- References:
- Disk geometry from /sys
- From: Francis Moreau
- Re: Disk geometry from /sys
- From: Lennart Sorensen
- Disk geometry from /sys
- Prev by Date: [PATCH] x86: setup_trampoline() - fix section mismatch warning
- Next by Date: -- ONLINE GAME TOSHIBA AWARD --
- Previous by thread: Re: Disk geometry from /sys
- Next by thread: Re: Disk geometry from /sys
- Index(es):
Relevant Pages
|