tuxera/ntfs-3g

mkfs.ntfs can't use HDIO_GETGEO on nbd devices

Closed this issue · 1 comments

strace -eioctl mkfs.ntfs /dev/nbd0p1
ioctl(3, BLKROGET, [0])                 = 0
ioctl(3, BLKSSZGET, [512])              = 0
ioctl(3, BLKBSZSET, [512])              = 0
ioctl(3, BLKGETSIZE64, [8388608])       = 0
ioctl(3, HDIO_GETGEO, 0x7fff8a9aa660)   = -1 ENOTTY (Inappropriate ioctl for device)
The partition start sector was not specified for /dev/nbd0p1 and it could not be obtained automatically.  It has been set to 0.
ioctl(3, HDIO_GETGEO, 0x7fff8a9aa650)   = -1 ENOTTY (Inappropriate ioctl for device)
The number of sectors per track was not specified for /dev/nbd0p1 and it could not be obtained automatically.  It has been set to 0.
ioctl(3, HDIO_GETGEO, 0x7fff8a9aa650)   = -1 ENOTTY (Inappropriate ioctl for device)
The number of heads was not specified for /dev/nbd0p1 and it could not be obtained automatically.  It has been set to 0.
Cluster size has been automatically set to 4096 bytes.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.

I'm not sure if this is a real issue but I can't find a lot of info about it.

https://unix.stackexchange.com/a/213836 suggests that HDIO_GETGEO shouldn't be used but I can't find a lot of info on that either.

This is what you would see when initializing an NTFS filesystem directly on an image file as well. If you're not planning to boot Windows from this network device (is that even a possibility?) then this is completely fine and as expected.
If you are initializing an NTFS filesystem for booting Windows off the network... well I'm not sure that it matters in that case either, but I'd be happy to hear about the results.
Closing this for now as I don't think there's any issue, but please comment further on this issue if you think otherwise