aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bsdinstall/scripts/bootconfig
Commit message (Collapse)AuthorAgeFilesLines
* bsdinstall: Fix typosJose Luis Duran12 days1-1/+1
| | | | | | Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53170
* bsdinstall: Add loader.efi to all ESPs we createWarner Losh2025-09-301-21/+40
| | | | | | | | | | | | | | | For proper redundancy, add copies of loader.efi to each of the ESPs we create when we create multi-volume ZFS datasets. zfsboot creates a list of secondary ESPs, while bootpart doesn't create any (it's the UFS partitioning tool) because we don't supporg UFS over gmirror. The primary ESP is mounted and is what we use efibootmgr to boot from. The redundant copies allow the system to boot if the primary disks fails. Sponsored by: Netflix MFC After: 2 days PR: 208802 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52780
* bsdinstall: Improve message for existing FreeBSD EFI entryEd Maste2025-07-261-1/+1
| | | | | | | | | | | When reinstalling FreeBSD bsdinstall reported "There are multiple FreeBSD EFI boot entries." This sounds like something went wrong in the past. Clarify that there may be only one existing entry, which is not surprising for a reinstall. Reviewed by: manu, ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51527
* bsdinstall: fix ps3 regressionChattrapat Sangmanee2025-06-131-0/+3
| | | | | | | | | | | | | b6644f5 introduces FREEBSD_BOOTLABEL="FreeBSD" as default value but cc42ef5 removed this line, expecting it to be set by update_uefi_bootentry() But ps3 don't use this function so its broken completely. So we add this line back. Signed-off-by: Chattrapat Sangmanee <aomsin27@hotmail.co.th> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1594
* Copy the new ia32 loaderAhmad Khalifa2024-09-201-14/+22
| | | | | | | | | | | | | | | | This handles copying in install-boot.sh and bsdinstall's bootconfig. install-boot.sh: make_esp_file now optionally takes extra arguments so it can copy multiple files. This is used by the amd64 release scripts. make_esp_device also takes an extra optional argument for efibootname. This is currently unused, but it can be used in the future to do something like: make_esp_device loader.efi bootx64 make_esp_device loader_ia32.efi bootia32 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Capitalize title like in all other titles.Jens Schweikhardt2022-09-141-2/+2
|
* bsdinstall: allow whitelabeling the scriptsBrad Davis2022-05-241-10/+8
| | | | | | Approved by: allanjude, asiciliano Differential Revision: https://reviews.freebsd.org/D35197 Sponsored by: Rubicon Communications, LLC ("Netgate")
* Fix grammatical issues.Nathan Whitehorn2022-01-021-1/+1
|
* bsdinstall: bootconfig: Try to clean old efi boot entriesEmmanuel Vadot2021-12-151-2/+52
| | | | | | | | | | | | | | | | | If one install FreeBSD on the same machine multiple times in a row or on different harddrive they have a lot of 'FreeBSD' efi boot entries added. With this patch we now do : - If there is no 'FreeBSD' entry we add one like before - If there is one or more entries we ask the user if they want to delete them all and add a new one - If they say yes we do that - If they say no we prompt them an inputbox so they can enter a different entry name if they want, it defaults to 'FreeBSD' Reviewed by: bapt, imp MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33330
* powerpc64: make autoboot possible on powernv machinesAlfredo Dal'Ava Junior2021-11-261-4/+7
| | | | | | | | | | | | It's required to specify a default boot option in order to make petitboot's autoboot feature work. Tested on Raptor Blackbird Reviewed by: imp, luporl MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D32838
* Fix scripted installation from media without local distfiles.Nathan Whitehorn2021-05-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | The bsdinstall script target did not have the infrastructure to fetch distfiles from a remote server the way the interactive installer does on e.g. bootonly media. Solve this by factoring out the parts of the installer that deal with fetching missing distributions into a new install stage called 'fetchmissingdists', which is called by both the interactive and scripted installer frontends. In the course of these changes, cleaned up a few other issues with the fetching of missing distribution files and added a warning if fetching the MANIFEST file, which is used to verify the integrity of the distribution files. We should at some point add cryptographic signatures to MANIFEST so that it can be fetched safely if not present on the install media (which it is for bootonly media). Initial patch by: Vinícius Zavam PR: 255659, 250928 Reviewed by: dteske MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D27121
* Restore /boot/efi to mtree.Nathan Whitehorn2021-03-061-1/+1
| | | | | | | | | | | | | Instead of whether /boot/efi exists, which it now always does, including on systems that don't and can't use EFI, use whether /boot/efi is present in fstab to signal to the installer that it is a valid ESP and should be configured. This has essentially the same semantics, but allows /boot/efi to be created unconditionally. Reviewed by: bdragon, imp Tested by: bdragon (ppc64) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29068
* Mount the EFI system partition (ESP) on newly-installed systems.Nathan Whitehorn2021-02-231-124/+26
| | | | | | | | | | | | | | | | | | Per hier(7), the ESP will be mounted at /boot/efi. On UFS systems, any existing ESP will be reused and mounted there; otherwise, a new one will be made. On ZFS systems, space for an ESP is allocated on all disks in the root pool, but only the partition actually used to boot is set up and mounted. This makes future upgrades of the EFI loader easier (upgrade scripts can just change /boot/efi) and also greatly simplifies the parts of the installer involved in initialization of the ESP. It also makes the installer's behavior correspond to the documentation in hier(7). Reviewed by: imp, tsoome MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28897
* bsdinstall: riscv-specific tweaksMitchell Horne2021-01-271-1/+2
| | | | | | | | | | | | Make the installer more useful, by allowing it to create a bootable installation. Also, enable the menu option for ZFS-on-root. Like arm64, RISC-V boots by UEFI only, so arm64's partedit implementation is renamed and shared among the two platforms. Reviewed by: gjb MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D28180
* bsdinstall: create /efi/boot directory in ESPMitchell Horne2021-01-271-4/+7
| | | | | | | | | | If the installer is creating a new ESP, then this directory will not exist and the subsequent cp will fail silently. This is usually of no consequence if /efi/freebsd/loader.efi is set up correctly. Reviewed by: imp MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D28176
* Initial support for implementing the bootXXX.efi workaroundWarner Losh2020-10-091-0/+24
| | | | | | | | | | | | | | | | | | | | | Too many version of UEFI firmware (so far only confirmed on amd64) don't really support efibootmgr selection of boot. That's the most reliable, when it works, since there's no guesswork. However, many do not save, unmolested, the variables that efibootmgr sets, so as a fallback we also install loader.efi as bootXXX.efi (where XXX is either aa64 or x64) if it doesn't already exist in /efi/boot on the ESP. The standard only defines this for removable devices, but it's almost ubiquitously used as a fallback. Many BIOSes implement a drive selection feature that takes over the efibootmgr protocol, rendinering it useless (either generally, or for those vendors not on the short list). bootxxx.efi works around this. However, we don't install it unconditionally there, as that breaks some popular multi-boot setups. MFC After: 1 week Differential Revision: https://reviews.freebsd.org/D26428 Notes: svn path=/head/; revision=366554
* bsdinstall: Use TMPDIR if setRebecca Cran2020-01-151-4/+6
| | | | | | | | | Submitted by: Ryan Moeller <ryan@freqlabs.com> Reviewed by: bcran, Nick Wolff <darkfiberiru@gmail.com> Differential Revision: https://reviews.freebsd.org/D22979/ Notes: svn path=/head/; revision=356740
* bsdinstall: fix ESP detection for auto ZFS layoutYuri Pankov2019-10-091-7/+11
| | | | | | | | | | | | | | Pass the list of user selected disks from zfsboot to bootconfig so that the latter doesn't rely on ESP autodetection that apparently fails for some cases, e.g. memstick installation with nvme (boot) and sata drives. While here, fix printing of debug messages in bootconfig. Reviewed by: bcran, imp, tsoome Differential Revision: https://reviews.freebsd.org/D21930 Notes: svn path=/head/; revision=353335
* Use the --activate efibootmgr(8) flag when creating entries in bootconfigRebecca Cran2018-12-311-7/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=342638
* Fix ESP generation when using a gmirror, and when booting from RO mediumRebecca Cran2018-12-311-8/+15
| | | | | | | | | | | | | | | | | 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. Relnotes: yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D18645 Notes: svn path=/head/; revision=342637
* Rework UEFI ESP generationRebecca Cran2018-12-201-2/+117
| | | | | | | | | | | | | | | | Currently, the installer uses pre-created 800KB FAT12 filesystems that it dd's onto the ESP partition. This changeset improves that by having the installer generate a FAT32 filesystem directly onto the ESP using newfs_msdos and then copying loader.efi into /EFI/freebsd. For live installs it then runs efibootmgr to add a FreeBSD boot entry in the BIOS. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D17947 Notes: svn path=/head/; revision=342283
* Set kernelname in bootconfig to the kernel fileJustin Hibbits2018-06-041-1/+1
| | | | | | | | | | | | Summary: The kernel reads 'kernelname' to set the kern.bootfile sysctl. By setting this, 'make installkernel' will backup the running kernel as appropriate. Reviewed by: nwhitehorn Differential Revision: https://reviews.freebsd.org/D15660 Notes: svn path=/head/; revision=334615
* Add installer support for PS3 and PowerNV systems, also laying theNathan Whitehorn2018-01-021-0/+40
foundation for invoking efibootmgr as part of new-style EFI booting on x86. On PS3 and PowerNV, which are booted using Linux kexec from petitboot rather than by loader(8), install the kernel and the rest of /boot to a FAT partition and set up the appropriate petitboot configuration file there. The new bootconfig installer stage can do platform-dependent modifications more complex than partition layout and installation of boot blocks and can be used to (as here) set up some special configuration files, run efibootmgr, or boot0cfg. MFC after: 1 month Notes: svn path=/head/; revision=327487