summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts/zfsboot
Commit message (Collapse)AuthorAgeFilesLines
* MFC r321734: bsdinstall: default to UEFI-only boot on arm64emaste2017-08-081-9/+19
| | | | Sponsored by: The FreeBSD Foundation
* bsdinstall: use consistent EFI configuration across platformsemaste2017-06-191-1/+1
| | | | | | | | | | | | | | MFC r320007: - increase arm64 EFI partition to 200M, as x86 - use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86 - increase ZFS EFI partition to 200M MFC r320008: bsdinstall: correct comment after r320007 PR: 201898 Approved by: re (kib) Relnotes: Yes Sponsored by: The FreeBSD Foundation
* MFC: r319863allanjude2017-06-151-0/+6
| | | | | | | | | bsdinstall: Make ZFS min_auto_ashift adjustment persistent MFC: r319864 bsdinstall: support Auto ZFS mode for ARM64 Approved by: re (gjb)
* MFC: r302940allanjude2016-07-261-1/+2
| | | | | | | | Fix error in bsdinstall triggered when doing a GELI encrypted install to an MBR formatted disk Approved by: re (gjb) Sponsored by: ScaleEngine Inc.
* MFC: r302941allanjude2016-07-261-0/+9
| | | | | | | | At the start of the installation process, all ZFS pools are exported and all GELI instances are detached, to allow a restarted install to proceed. PR: 210814 Approved by: re (gjb)
* Fix an error in bsdinstall when ZFS installation uses a bootpoolallanjude2016-07-031-8/+11
| | | | | | | | | | | | | | A separate bootpool is used when the selected partition type is MBR or when the disk is GELI encrypted and a UEFI loader is selected. BIOS avoids the bootpool by using bootcode and loader that support GELI. bsdinstall did not remount the bootpool after creating the main pool, which caused an error when mkdir tried to create /boot/zfs PR: 210717 Approved by: re (gjb) Sponsored by: ScaleEngine Inc.
* Fix bsdinstall for root-on-zfs with MBR partitioningallanjude2016-06-101-9/+5
| | | | | | | | | | | | Fix an error where vfs.root.mountfrom was not always set as required when creating a bootpool. After the recent geliboot changes, it was only set if the main pool was encrypted. Also resolve an error where the bootpool was unmounted twice causing bsdinstall to stop with an error message about the failed command. Approved by: re (gjb) Sponsored by: BSDCan Hacker Lounge
* Only set kern.geom.part.mbr.enforce_chs=0 once, instead of once per diskallanjude2016-05-241-1/+1
| | | | Sponsored by: ScaleEngine Inc.
* Add support for RAID 1+0 (striped mirrors) to bsdinstall/zfsbootallanjude2016-05-241-5/+40
| | | | Sponsored by: ScaleEngine Inc.
* Only export and re-import the root pool if installing on MBRallanjude2016-05-231-22/+26
| | | | | | This step is required in order to dd the boot2 bits into the ZFS partition Sponsored by: ScaleEngine Inc.
* Fix missing pool name in zfs set commandallanjude2016-05-231-1/+1
|
* Fix error in bsdinstall where additional filesystems cannot be mountedallanjude2016-05-231-1/+5
| | | | | | | | | | | Do not set canmount=noauto on the boot environment at create time, because this causes / to not be mounted, and since the chroot is read only, new mountpoints cannot be created. The property is set later, when other properties are adjusted Reported by: HardenedBSD Sponsored by: ScaleEngine Inc.
* bsdinstall/zfsboot GPT+BIOS+GELI installs now make use of GELIBOOTallanjude2016-05-221-60/+84
| | | | | | | | | | | | In this configuration, a separate bootpool is not required. This allows ZFS Boot Environments to be used with GELI encrypted ZFS pools. Support for GPT+EFI+GELI is planned for the future. Tested by: Joseph Mingrone, HardenedBSD Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D5869
* Fix default ZFS layout to work better by default with sysutils/beadmallanjude2016-05-221-1/+1
| | | | | | | | | The root file system is mounted early via vfs.root.mountfrom. The canmount=noauto property only affects the zfs rc.d script. This ensures that the 'default' BE is not mounted overtop of another BE when one is selected from the beastie menu Sponsored by: ScaleEngine Inc.
* Fix typo in comments for the zfsboot scriptbapt2016-05-221-1/+1
| | | | Submitted by: Colby Swandale <colby@taplaboratories.com.au> (via github)
* bsdinstall/zfsboot: Do not mirror swap when swapsize is 0allanjude2016-05-101-1/+1
| | | | | | PR: 209415 Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks
* usr.sbin/bsdconfig: minor spelling fixes on comments.pfg2016-05-011-1/+1
| | | | No functional change.
* Add a new installation type to bsdinstall/zfsboot: BIOS+UEFIallanjude2016-04-191-16/+52
| | | | | | | | | | | Installs both pmbr+gptzfsboot as well as boot1.efifat in separate partitions The resulting system can be booted with either UEFI or BIOS/CSM. Preference is controlled by the user's firmware boot settings. This is now the default for zfsboot installs PR: 208629 Submitted by: Galael LAPLANCHE <ganael.laplanche@corp.ovh.com> (original version)
* bsdinstall/zfsboot should create /tmp and /var/tmp if they do not existallanjude2016-04-081-0/+2
| | | | | | | PR: 208629 PR: 208568 Submitted by: Galael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks
* Do not add swap to fstab when swapsize is 0allanjude2016-04-081-2/+2
| | | | | | | | | If a user requested encrypted swap, but 0 sized, it would still be added to fstab PR: 208630 Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks Sponsored by: ScaleEngine Inc.
* Remove 50% ZFS conditional from bsdinstall/zfsbootallanjude2016-03-171-5/+5
| | | | | | | | Remove the requirement that the resulting partition table be atleast 50% ZFS PR: 208094 Requested by: brooks Sponsored by: ScaleEngine Inc.
* The zfsboot automated part of bsdinstall now supports UEFIallanjude2016-01-301-68/+47
| | | | | | MFC after: 3 days Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4960
* Never 4k align the MBR bootpool because zfsldr can not deal with a gapallanjude2016-01-161-1/+3
| | | | | | | | | | | | | | | | If the bootpool does not start at the first sector of the BSD partition then zfsldr seeks to the wrong offset inside the ZFS vdev label, and is unable to find zfsboot, so the system does not boot If 4k alignment is requested, align the BSD partition in the MBR table, and align the swap and data pool, but the bootpool must start at sector 1 While here, if 4k alignment is requested, disable MBR CHS alignment, as this results in not-4k aligned partitions. Reported by: Alex Wilkinson MFC after: 5 days Sponsored by: ScaleEngine Inc.
* Replace `return' outside of function with exitdteske2015-09-111-1/+1
| | | | | | MFC after: 3 days X-MFC-to: stable/10 Pointy hat to: me
* Add support for two workarounds for known issues booting GPT in legacy mode ↵allanjude2015-07-181-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | on some hardware For Lenovo laptops with buggy bios (x220, t420, t520): Write the 0xee entry into the second slot in the pmbr instead of the first For some Dell and HP models: The BIOS gives a warning message when booting in legacy mode from a GPT partitioned disk where the 0xee partition in the pmbr is not flagged active For models known to have this problem, mark the pmbr active during installation Use smbios data to identify machines known to be affected by any of the above, and offer the user the option to apply the workaround In bsdinstall's ufs auto mode (autopart partition wizard): Allow users to select which type of partition table to use Keep current defaults: MBR for BIOS, GPT for UEFI This allows users to choose GPT for legacy boot if they wish PR: 184910 PR: 194359 Reviewed by: Michael Dexter Approved by: marcel MFC after: 3 days X-MFC-With: r285594 Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3091
* Make bsdinstall's zfsboot script align partitions to 4k/1m when the user ↵allanjude2015-07-141-22/+39
| | | | | | | | | | | | requests it PR: 195174 Reviewed by: darius Approved by: brueffer MFC after: 3 days Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3062
* Set a mountpoint on the root of the pool so user-created datasets have a ↵allanjude2015-07-141-1/+10
| | | | | | | | | | | mountpoint to inherit Reviewed by: darius Approved by: brueffer MFC after: 3 days Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3063
* Have bsdinstall's zfsboot script make /var/audit its own dataset, so it is ↵allanjude2015-07-141-0/+1
| | | | | | | | | | | not part of the OS boot environment PR: 199864 Submitted by: Jason Unovitch Approved by: brueffer MFC after: 3 days Relnotes: yes Differential Revision: https://reviews.freebsd.org/D2861
* Fix a typo in bsdinstallallanjude2015-07-131-1/+1
| | | | | | | | | | | A variable was misspelled resulting in chmod executing on the installer instead of on the target chroot PR: 191402 Submitted by: Martin Simmons <martin@lispworks.com> Approved by: brueffer MFC after: 3 days Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3061
* Fix a syntax error in bsdinstall/zfsbootallanjude2015-05-221-1/+1
| | | | | | | | | Differential Revision: https://reviews.freebsd.org/D2571 Submitted by: Michael Dexter Approved by: dteske MFC after: 1 week X-MFC-With: r283023, r282443 Sponsored by: ScaleEngine Inc.
* bsdinstall/zfsboot: Skip adding swap lines to /etc/fstab if swap is 0 sizedallanjude2015-05-171-0/+4
| | | | | | | Differential Revision: https://reviews.freebsd.org/D2571 Reviewed by: dim Approved by: eadler (mentor) Sponsored by: ScaleEngine Inc.
* Add a sanity check to the swap size in zfsboot of bsdinstallallanjude2015-05-051-4/+22
| | | | | | | | | | | Loop until the user enters a valid size (>100mb or 0) Differential Revision: https://reviews.freebsd.org/D2299 Reported By: Shawn Webb Reviewed by: roberto Approved by: brd MFC after: 2 weeks Sponsored by: ScaleEngine Inc.
* Add "GELI Passphrase:" prompt to boot loader.dteske2015-04-161-0/+3
| | | | | | | | | | | | | | | A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now allow you to enter your geli(8) root-mount credentials prior to invoking the kernel. See check-password.4th(8) for details. Differential Revision: https://reviews.freebsd.org/D2105 Reviewed by: imp, kmoore Discussed on: -current MFC after: 3 days X-MFC-to: stable/10 Relnotes: yes
* Unbreak ZFS+GELI install option.dteske2015-04-061-1/+1
| | | | | | | | | Reported by: delphij Submitted by: delphij Pointy hat to: dteske (me) MFC after: 3 days X-MFC-to: stable/10 stable/9 X-MFC-with: r281160
* Fix permissions on ZFS root encryption key (644 -> 600).dteske2015-04-061-0/+3
| | | | | | | MFC after: 3 days X-MFC-to: stable/10 stable/9 Security: CVE-2015-1415 Reported by: Pierre Kim
* Whoops! "arc commit --revision" != "arc diff --update"dteske2015-04-011-3/+0
|
* Add "GELI Passphrase:" prompt to boot loader.dteske2015-04-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add "GELI Passphrase:" prompt to boot loader. A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now allow you to enter your geli(8) root-mount credentials prior to invoking the kernel. See check-password.4th(8) for details. Differential Revision: https://reviews.freebsd.org/D2105 Reviewed by: (your name[s] here) MFC after: 3 days X-MFC-to: stable/10 Relnotes: yes Test Plan: Drop a head copy of check-password.4th into /boot and then apply the patch (only the patch to /boot/check-password.4th is required; no other changes are required but you do have to have a HEAD copy of check-password.4th to apply the patch). NB: The rest of your /boot files can be up to 2 years old but no older. NB: The test won't work unless your kernel has the following change https://svnweb.freebsd.org/base?view=revision&revision=273489 Now, put into /boot/loader.conf: geom_eli_passphrase_prompt="YES" and reboot. You should be prompted for a GELI passphrase before the menu (if enabled), just after loading loader.conf(5). NB: It doesn't matter if you're using GELI or not. However if you are using GELI and a sufficiently new enough release (has SVN r273489) and you entered the proper passphrase to mount your GELI encrypted root device(s), you should notice that the boot process did not stop (you went from loader all the way to login). Reviewers: cperciva, allanjude, scottl, kmoore Subscribers: jkh, imp Differential Revision: https://reviews.freebsd.org/D2105
* Update copyright(s)dteske2015-03-211-2/+2
| | | | | MFC after: 3 days X-MFC-to: stable/10
* Whitespace cleanup(s).dteske2015-03-211-43/+49
| | | | | MFC after: 3 days X-MFC-to: stable/10
* Fix bsdinstall when working with geli boot diskssmh2015-01-181-0/+3
| | | | | | | | PR: 196790 Differential Revision: https://reviews.freebsd.org/D566 Submitted by: Michael Gmelin <grembo@FreeBSD.org> MFC after: 2 weeks Sponsored by: Multiplay
* Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12smh2014-12-211-46/+19
| | | | | | | | | | Previously we used gnop(8) to fake 4K sector size disks but ZFS now has a sysctl to control this when creating new top level vdev's so use that instead. Differential Revision: D566 MFC after: 1 month Sponsored by: Multiplay
* Change the /var dataset in the default ZFS layout to have theallanjude2014-09-281-1/+1
| | | | | | | | | | | | ZFS property canmount=off so that /var/db/pkg and other such directories are part of the / dataset, and only /var/mail, /var/log, and /var/crash are excluded from the ZFS boot environment (beadm). PR: 193971 Approved by: jmg MFC after: ASAP Relnotes: yes Sponsored by: ScaleEngine Inc.
* Make the root-on-zfs part of the installer warn a user who booted the ↵allanjude2014-09-141-0/+58
| | | | | | | | | | installer via UEFI that we do not support booting ZFS via UEFI yet PR: 193595 Approved by: nwhitehorn MFC after: 5 days Sponsored by: ScaleEngine Inc. CR: https://reviews.freebsd.org/D782
* Add ZFS support to the bsdinstall partition editor and sade.nwhitehorn2014-09-131-2/+0
| | | | | Submitted by: Kurt Lidl (original version) MFC after: 6 weeks
* Fix syntax error thrown at the point of creating the root pool, caused bydteske2014-05-221-12/+17
| | | | | | | | | | | | | | | | | | | an embedded newline appearing within the options string surrounded by double-quotes. Rework the logic that goes into setting dataset options on the root pool dataset while we're here -- added two new variables (which can be altered via scripting) ZFSBOOT_POOL_CREATE_OPTIONS and also ZFSBOOT_BOOT_POOL_CREATE_OPTIONS for setting pool/dataset attributes at the time of pool creation. The former is for setting options on the root pool (zroot) and the latter is for setting options on the optional separate boot pool (bootpool) implicitly enabled when using either GELI or MBR. The default value for the root pool variable (ZFSBOOT_POOL_CREATE_OPTIONS) is "-O compress=lz4 -O atime=off" and the default value for separate boot pool variable (ZFSBOOT_BOOT_POOL_CREATE_OPTIONS) is NULL (no additional options for the separate boot pool dataset). Reviewed by: allanjude MFC after: 7 days X-MFC-with: r266107-266109
* Fix the "disks" variable reuse.roberto2014-05-151-3/+6
| | | | | | | | | | | | | It starts off being used to track the grammar for the number of disks (singular vs plural) and then it is reused as the list of available disks. Replace the variable with disks_grammar and move 'disk' and 'disks' to msg_ vars so they can be translated in the future. Submitted by: Allan Jude <freebsd@allanjude.com> Reviewed by: roberto MFC after: 2 weeks Sponsored by: ScaleEngine Inc.
* Updates to the datasets created by zfsboot.roberto2014-05-151-8/+9
| | | | | | | | | | | | Set compress=lz4 for the entire pool, removing it from the individual datasets Remove exec=no from /usr/src, breaks the test suite. Submitted by: Allan Jude <freebsd@allanjude.com> Reviewed by: roberto MFC after: 2 weeks Sponsored by: ScaleEngine Inc.
* Here is a patch for the bsdinstall root-on-zfs stuff that adds optionalroberto2014-05-151-16/+93
| | | | | | | | | encryption for swap, and optional gmirror for swap (which can be combined) Submitted by: Allan Jude <freebsd@allanjude.com> Requested By: roberto Sponsored By: ScaleEngine Inc. MFC after: 2 weeks
* Update zfsboot to coincide with r264840 to bsdconfig(8) addingdteske2014-04-231-23/+71
| | | | | | | | GEOM support (thereby adding GEOM support to the disk selection menu of bsdinstall(8)'s `zfsboot' module updated herein). MFC after: 1 week X-MFC-with: 264840
* When merging docsinstall and zfsboot updates to stable/9 it was discovereddteske2014-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that the slightly older dialog(1) requires --separate-output when using the --checklist widget to force response to produce unquoted values (whereas in stable/10 --checklist widget without --separate-output will only quote the checklist labels in the response if the label is multi-word (contains any whitespace). Since these enhancements (see revisions 263956 and 264437) were developed originally on 10, the --separate-output option was omitted. When merged to stable/9, we (Allan Jude) and I found during testing that the "always- quoting" of the response was causing things like struct interpolation to fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for example -- literal quotes inherited from dialog(1) --checklist response). To see the behavior, execute the following on stable/9 versus stable/10: dialog --checklist disks: 0 0 0 da0 "" off da1 "" off Check both items and hit enter. On stable/10, the response is: da0 da1 On stable/9 the response is: "da0" "da1" If you use the --separate-output option, the response is the same for both: da0 da1 So applying --separate-output on every platform until either one of two things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or 2) we drop support for stable/9. MFC after: 3 days Reviewed by: Allan Jude
OpenPOWER on IntegriCloud