Page MenuHomeFreeBSD

Fix ESP generation when using a gmirror, and when booting from RO medium
ClosedPublic

Authored by bcran on Dec 24 2018, 2:41 AM.
Tags
None
Referenced Files
F152575050: D18645.diff
Wed, Apr 15, 6:41 PM
Unknown Object (File)
Sun, Apr 12, 6:17 AM
Unknown Object (File)
Sun, Apr 12, 6:14 AM
Unknown Object (File)
Mar 17 2026, 3:38 AM
Unknown Object (File)
Mar 17 2026, 3:38 AM
Unknown Object (File)
Mar 13 2026, 3:19 PM
Unknown Object (File)
Mar 13 2026, 3:48 AM
Unknown Object (File)
Feb 28 2026, 4:30 PM
Subscribers
None

Details

Summary

When using a gmirror, entries in /dev can be removed. So instead of using
kern.disks, get the list of disks from "gpart status -sg" instead.

We assume that any 'efi' partition that can't be mounted as msdosfs should
be used as an ESP. However, the ESP on the CD/DVD can't be mounted read-write
and so was being treated as if unformatted. Try the mount as read-only
instead, to catch cases like this.

Also, add some messages to let users know what the script is doing.

Relnotes: yes
Sponsored by: Netflix

Test Plan

Verified it works in a Qemu VM booting from dvd1.iso

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I think this is fine, but I'm not totally sure.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 31 2018, 12:21 AM
This revision was automatically updated to reflect the committed changes.