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
Unknown Object (File)
Dec 20 2023, 1:55 AM
Unknown Object (File)
Nov 5 2023, 4:58 PM
Unknown Object (File)
Oct 4 2023, 3:57 PM
Unknown Object (File)
Sep 17 2023, 9:35 AM
Unknown Object (File)
Sep 4 2023, 8:49 AM
Unknown Object (File)
Aug 4 2023, 4:17 PM
Unknown Object (File)
Aug 4 2023, 4:17 PM
Unknown Object (File)
Aug 4 2023, 4:15 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.