Bug 222922 - bsdinstall(8) does not format efi partitions as msdosfs
Summary: bsdinstall(8) does not format efi partitions as msdosfs
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-sysinstall (Nobody)
URL:
Keywords: install
Depends on:
Blocks:
 
Reported: 2017-10-11 04:37 UTC by Trix Farrar
Modified: 2023-03-06 00:39 UTC (History)
4 users (show)

See Also:


Attachments
Test script to demonstrate failure of bsdinstall(8) to format efi partitions as msdosfs (657 bytes, application/x-shellscript)
2017-10-11 04:37 UTC, Trix Farrar
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trix Farrar 2017-10-11 04:37:54 UTC
Created attachment 187069 [details]
Test script to demonstrate failure of bsdinstall(8) to format efi partitions as msdosfs

bsdinstall(8) doesn't properly format partitions of type efi when using scriptedpart.

To produce the issue:
  - Start an install (I used PXE and mfsroot, but should work booting from install CD) on a physical or virtual host with a blank disk (no pre-existing gpart partition tables.
  - drop to a command prompt to run bsdinstall(8)
  - define/export a PARTITIONS variable containing a disk layout that defines a GPT disk with, at least, a freebsd-boot partition, an efi partition, and a freebsd-ufs partition
  - execute /usr/sbin/bsdinstall scriptedpart ${PARTITIONS}
    (the efi partition will show "failed")
  - execute /usr/sbin/bsdinstall mount
    (the mount_msdosfs command will fail with an invalid argument)

efi partitions should be formatted with /sbin/newfs_msdos the same way freebsd-ufs is formatted with newfs(8).

I think the comparison at line 170 of /usr/src/usr.sbin/bsdinstall/partedit/gpart_ops.c may be failing?

The script I tested with is attached.
Comment 1 Trix Farrar 2017-10-11 04:40:54 UTC
Changing the efi partition, in the definition of the PARTITIONS variable, to freebsd-ufs results in successful completion, but it can't be used for UEFI until the partition type is changed and properly formatted.
Comment 2 Nathan Whitehorn freebsd_committer freebsd_triage 2017-12-18 23:13:38 UTC
This is fixed in -CURRENT and changes will be MFC'ed shortly.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:50:31 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 4 Piotr Pawel Stefaniak freebsd_committer freebsd_triage 2021-10-03 11:46:02 UTC
I think this has been fixed in all currently supported releases.
Comment 5 Ben Woods freebsd_committer freebsd_triage 2023-03-06 00:39:49 UTC
Closing as fixed, according to comments from nwhitehorn and pstef above.