feat(grub): install BIOS GRUB without loop devices or chroot
Metadata
Current evaluation
Closed unmerged after inactivity; its zero-mount GRUB goal was superseded by merged #437 (commit 0ca6f6e), which replaced loop-device and chroot installation.
Resolution: closed superseded
Reason: PR #416 was closed unmerged with three unresolved review comments after becoming inactive. Merged PR #437 delivered a replacement zero-mount bootloader installer in commit 0ca6f6e, using fuse2fs for BIOS installation.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Part 6 of a stack that makes GRUB installation work without root privileges.
Converts the remaining BIOS/MBR path to the same unprivileged approach the EFI
path already uses, and deletes the chroot implementation.
BIOS booting is fiddlier than EFI because there is no filesystem involved at the
start -- the firmware just executes the first sector. So instead of copying
files into a partition, we:
1. Build `core.img` on the host with `grub-mkimage`.
2. Copy the boot sector out of GRUB's `boot.img` into sector 0 of the image.
3. Write `core.img` into the post-MBR gap.
4. Patch the boot sector with the sector where `core.img` starts and its
blocklist, which is the part `grub-install` would normally do for us.
With both firmware types converted, `setup_grub` no longer mounts anything or
attaches loop devices at all, so `_grub_install`, `_image_mounts` and the
transitional `_setup_grub_bios_chroot` wrapper introduced in the previous PR are
removed.
Adds `tests/spread/boot/classic-mbr`, which boots a BIOS image under QEMU's
SeaBIOS (no OVMF) and asserts it reaches userspace -- i.e. that the hand-written
boot sector and blocklist actually work.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged after inactivity; its zero-mount GRUB goal was superseded by merged #437 (commit 0ca6f6e), which replaced loop-device and chroot installation. | |
| stealth/space-bunny-alpha | — | closed stale | canonical/imagecraft#416 was closed unmerged after becoming inactive, with three unresolved review comments on its unprivileged BIOS/MBR GRUB implementation. | |
| stealth/space-bunny-alpha |
Impact:
58
Quick Win:
11
Complexity:
68
Confidence:
87
Actionability:
58
|
needs review | Adds unprivileged BIOS/MBR GRUB installation by building core.img, embedding it in the post-MBR gap, and patching the boot sector. Removes mount/chroot paths and adds a SeaBIOS boot test; 3 review comments remain unresolved. | |
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
70
Quick Win:
18
Staleness:
30
Complexity:
75
Confidence:
65
|
needs review | Part 6 of a stack refactoring GRUB BIOS/MBR installation to work without root privileges, removing chroot and loop device dependencies. Under review with 3 unresolved comments. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
30
Confidence:
90
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot. Removes legacy chroot wrapper and adds a SeaBIOS QEMU test. Currently pending maintainer review with 3 unresolved comments. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
45
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged method without loop devices or chroot, aligning it with the existing EFI approach. Removes legacy chroot code and adds a QEMU SeaBIOS test. Currently awaiting maintainer review with passing CI. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
65
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged method without loop devices or chroot, removes legacy wrappers, and adds a SeaBIOS QEMU test. Currently pending maintainer review with 3 unresolved comments. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
65
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged method without loop devices or chroot, removes legacy chroot code, and adds a SeaBIOS QEMU test. Currently pending maintainer review with passing CI. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged method without loop devices or chroot, removes legacy code, and adds a SeaBIOS spread test. Currently pending review with one failing OSV security scan. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
90
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot, aligning with the existing EFI path. Removes legacy chroot code and adds SeaBIOS QEMU tests. Currently pending maintainer review with CI mostly passing. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
65
Confidence:
90
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot, aligning it with the existing EFI path. Removes legacy chroot wrappers and adds a SeaBIOS boot test. Currently awaiting maintainer review with CI mostly passing. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
65
Confidence:
90
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot, removes legacy chroot code, and adds SeaBIOS QEMU tests. Currently awaiting maintainer review with CI checks in progress. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
90
|
needs review | Converts BIOS GRUB installation to an unprivileged method without loop devices or chroot, removing legacy chroot code and adding a QEMU SeaBIOS test. Currently awaiting maintainer review with CI checks pending. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
90
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot, removes legacy chroot code, and adds a QEMU SeaBIOS test. Currently pending maintainer review with mixed CI status. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
0
Complexity:
45
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot, aligning with the existing EFI path. Removes legacy chroot code and adds a QEMU SeaBIOS test. Currently pending maintainer review with mixed CI results. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
65
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot, removing legacy wrappers. Currently pending maintainer review with failing CI checks on build, lint, and slow tests. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged method without loop devices or chroot, removes legacy chroot code, and adds a QEMU SeaBIOS boot test. Currently pending maintainer review with mixed CI results. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
85
|
needs review | Converts BIOS GRUB installation to an unprivileged approach without loop devices or chroot, removing legacy wrappers and adding a SeaBIOS integration test. Currently awaiting maintainer review with CI checks pending. |
Update history
| Date | Change |
|---|---|
| updated | |
| closed | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related work
-
Superseded By:
canonical/imagecraft#437
(confidence 96%)
Merged replacement introduced imagecraft/pack/bootloader and removed the privileged loop-device and chroot GRUB installation flow.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #415 feat(grub): install EFI GRUB without loop devices | imagecraft | closed | Closed after its EFI/GPT work was superseded by #437, which merged the broader zero-mount bootloader installer in commit 0ca6f6e. | |
| #434 feat(grub): loop-device-free EFI GRUB setup | imagecraft | closed | Closed unmerged and superseded by #437, which merged the broader zero-mount bootloader installer in commit 0ca6f6e. | |
| #348 No loops for grub | imagecraft | closed | Closed unmerged and superseded by #437, merged as 0ca6f6e, which introduced zero-mount bootloader installation without loop devices. | |
| #437 feat: zero-mount bootloader installation | imagecraft | merged | Merged to main (commit 0ca6f6e). Replaces privileged loop-device+chroot GRUB install (pack/grubutil.py) with a zero-mount bootloader package staging files into prime dirs; +3415/-1275 across 31 files. |