Get Floppy Disk Geometry information in Linux

0

I have a floppy disk image (x86 boot sector) and I want to find information about the disk geometry for it (specifically Cylinders/ Head/ Sector).

How can I find this information?

The file command shows the following output for the image:

file disk.img 
disk.img: x86 boot sector

I installed fdutils on Linux and even tried the getfdprm command to get this information however it doesn't show the information.

$ getfdprm disk.img 
get geometry parameters: Inappropriate ioctl for device

I am not sure why getfdprm doesn't show me the disk geometry.

Is there any other way to get this information?

Neon Flash

Posted 2018-11-02T15:23:14.673

Reputation: 175

Answers

1

A disk image would have only the data that goes on the disk. As such it would only contain the filesystem and file data which is a level above the physical disk format.

Physical structure is for physical objects and is not necessarily applicable to image data.

As an example a physical hard disk contains a lot of physical error checking data. This data is specific to the drive itself and is not readable (nor is it relevant to be so) when creating an image using dd.

The same applies to floppy disk images.

Mokubai

Posted 2018-11-02T15:23:14.673

Reputation: 64 434

1And getfdparm is meant to be used on a /dev/fd device; where it would return the kernel information about the geometry. Unlike harddisks, where you can query the embedded controller for geometry, neither the floppy controller nor the floppy itself has that information. However, IBM floppies have a pretty standard geometry. – dirkt – 2018-11-02T17:50:17.840