Bug 243997 - bsdinstall should not format EFI partition
Summary: bsdinstall should not format EFI partition
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-sysinstall mailing list
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-02-09 09:45 UTC by David Demelier
Modified: 2020-02-13 07:47 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (re)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Demelier 2020-02-09 09:45:24 UTC
Hi,

FreeBSD makes a bit complicated to dual boot an UEFI install when using the bsdinstall partition tool.

Even though you don't modify the EFI partition (if already existing) FreeBSD will format it and therefore losing all your previous systems EFI loaders.

The script should not format the EFI partition and use it if already existing or propose the user to create one if not found.

Steps to reproduce:

1. Install any operating system that is not FreeBSD with a EFI partition
2. Boot FreeBSD installer
3. Create a freebsd-ufs partition (do not use auto partitioning!)
4. Install will format the EFI partition and you lose all your data on it.
Comment 1 Andrey Fesenko 2020-02-11 21:51:32 UTC
13-Current not format too

bsdinstall script, work 2019

 PARTITIONS="$DISKSLICE GPT { 512K freebsd-boot, 1M efi, auto freebsd-ufs / }
 #!/bin/sh -x
 # Make diskname independante
 gpart modify -l freebsd-boot -i 1 ada0
 gpart modify -l efi -i 2 ada0
 gpart modify -l root -i 3 ada0
 # Make EFI happy
 mount_msdosfs /dev/gpt/efi /media/
 mkdir -p /media/EFI/BOOT/
 cp /boot/loader.efi /media/EFI/BOOT/BOOTX86.efi
 umount /media/

FreeBSD-13.0-CURRENT-amd64-20200206-r357606-disc1.iso not format efi partition
Comment 2 Andrey Fesenko 2020-02-11 21:53:26 UTC
(In reply to David Demelier from comment #0)
sorry, misunderstand you bug
Comment 3 Ed Maste freebsd_committer 2020-02-12 22:50:19 UTC
Yes we shouldn't format an existing EFI partition.
Comment 4 David Demelier 2020-02-13 07:47:25 UTC
(In reply to Andrey Fesenko from comment #1)

I've tried to check the 12.1 version code in bsdinstall but could not find that part. I've only tried in 12.1 though.

Has it changed in 13-CURRENT? I'll give a try to make sure.