Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not specify '-F 16' for mkfs.vfat and also no '-o fat=16' when mounting it #2576

Merged
merged 7 commits into from Mar 4, 2021

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Feb 25, 2021

Do no longer specify '-o fat=16' when loop mounting efiboot.img file
but rely on the automatic FAT type detection when mounting
cf. #2575
plus some general generic code cleanup in
output/ISO/Linux-i386/700_create_efibootimg.sh

Do no longer specify '-o fat=16' when loop mounting efiboot.img file
but rely on the automatic FAT type detection when mounting
cf. #2575
plus some general generic code cleanup in
output/ISO/Linux-i386/700_create_efibootimg.sh
@jsmeix jsmeix added enhancement Adaptions and new features cleanup minor bug An alternative or workaround exists labels Feb 25, 2021
@jsmeix jsmeix added this to the ReaR v2.7 milestone Feb 25, 2021
@jsmeix jsmeix self-assigned this Feb 25, 2021
@jsmeix jsmeix changed the title Update 700_create_efibootimg.sh Do no longer specify '-o fat=16' when mounting Feb 25, 2021
Do no longer specify '-o fat=16' when loop mounting boot.img file
but rely on the automatic FAT type detection when mounting
cf. #2575
plus some minor generic code cleanup in
output/ISO/Linux-ia64/200_mount_bootimg.sh
Added explanatory comment why '-o fat=16' is not used.
@jsmeix jsmeix requested review from gdha and gozora February 25, 2021 13:21
@jsmeix
Copy link
Member Author

jsmeix commented Feb 25, 2021

@gdha @gozora
could you have a look here if that change looks OK to you?

I wonder if -F 16 is actually needed for mkfs.vfat ?

output/ISO/Linux-ia64/200_mount_bootimg.sh
indicates -F 16 was specified because 'size >30MB'

# make sure we select FAT16 instead of FAT12 as size >30MB
mkfs.vfat $v -F 16 $TMP_DIR/boot.img

but on my openSUSE Leap 15.2 "man mkfs.vfat" reads (excerpt)

-F FAT-SIZE
  Specifies the type of file allocation tables used (12, 16 or 32 bit).
  If nothing is specified, mkfs.fat will automatically select between
  12, 16 and 32 bit, whatever fits better for the filesystem size.

so also for mkfs.vfat it seems to be better to
rely on what "mkfs.fat will automatically select".

@jsmeix
Copy link
Member Author

jsmeix commented Feb 25, 2021

@rmetrich
could you have a look here if that should be OK for Red Hat
in particular for older Red Hat versions, see also
#2575 (comment)
how things look on SLES11 according to what the man pages tell there.

For 'mkfs.vfat' do not use a '-F 16' or '-F 32' option and hope for the best,
see #2575 (comment)
For 'mkfs.vfat' do not use a '-F 16' or '-F 32' option and hope for the best,
see #2575 (comment)
@jsmeix jsmeix changed the title Do no longer specify '-o fat=16' when mounting Do not specify '-F 16' for mkfs.vfat and also no '-o fat=16' when mounting it Feb 26, 2021
Let mkfs.vfat automatically select the FAT type based on the size.
I.e. do not use a '-F 16' or '-F 32' option and hope for the best,
cf. #2575
Copy link
Member

@gozora gozora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes looks OK to me.
Unfortunately I don't have currently time to test them.

V.

@jsmeix
Copy link
Member Author

jsmeix commented Mar 1, 2021

@gozora
thank you for having a look!
I did not expect that you test it.
But perhaps you had known a reason why FAT16 was enforced with -F 16
(there was no comment that could have explained why that -F 16 was there).

What do you think about
#2575 (comment)

@gozora
Copy link
Member

gozora commented Mar 1, 2021

Hello @jsmeix,

What do you think about

I think that changing defaults to 512MB is OK. 400MB is not a nice number and I'm not surprised that some UEFI versions might have problems with.

V.

In default.conf increased USB_UEFI_PART_SIZE to 512 MiB
because mkfs.vfat automatically makes FAT32 starting at 512 MiB
so the FAT filesystem of the ESP will be in compliance with
that the ESP should officially use a FAT32 filesystem
(a FAT16 ESP causes issues with certain UEFI firmware)
cf. #2575
@jsmeix
Copy link
Member Author

jsmeix commented Mar 3, 2021

From my point of view this pull request is now sufficiently complete
so I would like to merge it tomorrow afternoon
unless there are objections.

@jsmeix jsmeix merged commit 9a6b9a1 into master Mar 4, 2021
@jsmeix jsmeix deleted the jsmeix-no-fat16-mount-option branch March 4, 2021 12:33
@jsmeix
Copy link
Member Author

jsmeix commented Mar 4, 2021

@OliverO2 @gozora
thank you for your help with this issue!
It is much appreciated because I am really not an expert in that area.

jsmeix added a commit that referenced this pull request Apr 21, 2021
In 300_format_usb_disk.sh adapt USB_UEFI_PART_SIZE fallback value to 512
to be in compliance with the new default.conf setting of 512 MiB since
9a6b9a1
that was done in relation to #2576
see also #2602
@jsmeix jsmeix mentioned this pull request Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup enhancement Adaptions and new features fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants