Bug 1527003 - mkfs fat with blocksize:512 does not set the block size correctly
Summary: mkfs fat with blocksize:512 does not set the block size correctly
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-18 10:22 UTC by Richard W.M. Jones
Modified: 2025-10-17 12:52 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-10-17 00:10:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2017-12-18 10:22:16 UTC
(This bug was found by Xianghua Chen)

Description of problem:

mkfs fat does not set the block size correctly:

$ rm test.img
$ truncate -s 100M test.img
$ guestfish -a test.img \
    run : part-disk /dev/sda mbr : mkfs fat /dev/sda1 blocksize:512 : mount /dev/sda1 / : statvfs /
...
bsize: 2048

bsize is expected to be 512 because we set blocksize:512 when creating
the filesystem.

Version-Release number of selected component (if applicable):

libguestfs 1.37.35

How reproducible:

100%

Steps to Reproduce:
1. See reproducer above.

Additional info:

We're adding ’-b 512’ to the command line, but that option to mkfs.fat
sets the backup boot sector location, so that's completely wrong.

This is a bug introduced when we fixed the following bug:
https://bugzilla.redhat.com/show_bug.cgi?id=599464

Comment 1 Red Hat Bugzilla 2025-10-17 00:10:37 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.

Comment 2 Alasdair Kergon 2025-10-17 12:52:13 UTC
Reopening because Virtualization Tools has not been discontinued.


Note You need to log in before you can comment on or make changes to this bug.