Messages in this thread | | | Date | Thu, 10 Apr 2008 21:23:32 +0200 | From | "Francis Moreau" <> | Subject | Re: 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
| |