Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I answered this question, assuming that the *.img file had a sector size of 512.

How do I query a device, or the image of a device, to find the correct sector size?

share|improve this question

2 Answers

up vote 6 down vote accepted

fdisk -l (that's lower L in the parameter) will show you, among other informations, the sector size too.

share|improve this answer

According to the documentation for the queue sysfs files:

# cat /sys/block/sda/queue/hw_sector_size
512
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.