Re: RFC: disk geometry via sysfs

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

 



Seewer Philippe wrote:

IDE tries to return the actual hardware geometry. Most other drivers
implement a "fake". Or try to guess the geometry from the MBR...


But there is no "actual hardware geometry". IDE disks can report a geometry, but that is no more real than any other made up geometry. If you take the geometry that the disk itself reports and write that to the MBR, then software that actually uses the geometry ( i.e. non LBA boot loaders ) will fail because it is not the geometry that the bios uses.

The only remaining purpose to geometry values that I see is to store in the MBR for non LBA boot loaders to use. Since they must have the values the bios uses, then you need to get the values from the bios when creating such an MBR.

My personal answer is here: Because there are so many tools around which
use the kernel values, that it is easier to overwrite the kernel than
patch all other software... (i know, i know...)

The only tools that I am aware of are boot loaders and disk partitioners, and these tools do not need the geometry, they just try to get it to maintain compatibility with ancient systems. As such, it is long past time for them to no longer require this information.


And additionally: When partitioning its sometimes necessary or safer to
write a whole new mbr (dd if=... of=... ; parted mklabel msdos). When
dd'ing the mbr goes away. And some drivers return geometry based on the
mbr...... So overwriting these values might come handy.


But what would you overwrite them with? The only values that have any actual use are the ones from the bios. If you get the values from the bios, it makes no sense to change them later.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux