GNU GRUB - Bugs: bug #58498, GRUB cannot correctly boot...
You are not allowed to post comments on this tracker with your current authentication level.
bug #58498: GRUB cannot correctly boot kFreeBSD i386 from ZFS
Submitter: | WHR <whr> | ||
Submitted: | Thu 04 Jun 2020 03:01:25 PM UTC | ||
Category: | Booting | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Software Error |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | WHR |
Open/Closed: | Open | Release: | Git master |
Release: | Reproducibility: | Every Time | |
Planned Release: | None |
Thu 04 Jun 2020 03:17:53 PM UTC, comment #1: |
WHR <whr> |
Thu 04 Jun 2020 03:01:25 PM UTC, original submission:
This issue can be reproduced with GRUB version 2.02 and 2.04, and I believe it exists in the latest source repository as well; unfortunately I can't select '2.04' in 'Release:' combo box on this page.
To reproduce
Simplified configuration example
ResultThe system hang soon after GRUB jumps to kFreeBSD entry point, there is no console output from kFreeBSD.
CauseGRUB source file 'grub-core/loader/i386/bsd.c' contains the following code in function 'grub_freebsd_boot':
it prepare the arguments to be passed to the entry point of the kernel ('btext' in kFreeBSD image); the arguments 3, 4 and 5 are incorrect, because according to the corresponding FreeBSD source code (https://svnweb.freebsd.org/base/stable/12/sys/i386/i386/locore.s?revision=339434&view=markup#l178), those 3 arguments should always be set to 0 to distinguish from old boot protocols, otherwise the kernel would just halt as they assumed it was booted with an unsupported boot protocol (https://svnweb.freebsd.org/base/stable/12/sys/i386/i386/locore.s?revision=339434&view=markup#l214).
Proposed fixI removed 'freebsd_zfsguid' variable and codes that used it. Passing a ZPOOL GUID to the kernel would be completely useless, as the kernel didn't use it in anyways, but instead chokes on it.
|
WHR <whr> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2020-06-04 | whr | Attached File | - | Added grub-kfreebsd-i386-zfs-hang-fix.diff, #49213 |
Powered by Savane 3.13-d3ae.
Corresponding source code
The configuration example missing a line to set where '/' should be mounted from by kernel:
However it isn't important for this bug anyways.