Bug 286702 - sysutils/grub2-bhyve: fail to boot linux vm with newer ext4fs filesystem flags
Summary: sysutils/grub2-bhyve: fail to boot linux vm with newer ext4fs filesystem flags
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-09 20:29 UTC by Alexandre Biancalana
Modified: 2025-05-09 20:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Biancalana 2025-05-09 20:29:02 UTC
I found that alpine-3.20.1 and newer use additional (metadata_csum_seed) ext4fs flags that aren't recognized by grub2-bhyve. 

This bug keeps any linux that use ext and newer flags (flags not ignored in grub code) from boot using grub in bhyve, the scenario is that you can install the os but fail to boot after install.

The work around that I follow was to disable the xxx flag using:

   tune2fs -O ^metadata_csum_seed /dev/md0s1


There are two fixes in upstream grub, for different flags:
  https://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/fs/ext2.c?id=7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763
  https://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/fs/ext2.c?id=2e9fa73a040462b81bfbfe56c0bc7ad2d30b446b

Also there's a pull request pending approval at grub2-bhyve github repo that fixes the problem:
  https://github.com/grehan-freebsd/grub2-bhyve/pull/18

It's possible to merge the pull request and update the port ?