The usual case of a mismatched checksum for installer snapshots
(e.g., -CURRENT, -ALPHA*) is that a newer snapshot has been built and
the old install sets have been replaced. Provide a specific error
message for checksum mismatches there that suggests looking for a newer
snapshot.
Submitted by: Guangyuan Yang <[email protected]>
Sponsored by: The FreeBSD Foundation
This was originally added as "exit $SUCCESS" but with nothing to set the
SUCCESS variable. Thus it became an exit with no argument, which just
exits with the status of the preceding command.
Sponsored by: The FreeBSD Foundation
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
bsdinstall: Make sure chroot filesystems are umounted after use
* DISTDIR_IS_UNIONFS is set every time BSDINSTALL_DISTDIR is mounted inside
BSDINSTALL_CHROOT. Use this flag to decide if it needs to be umounted
* BSDINSTALL_CHROOT/dev is mounted when 'bsdinstall mount' is called, there is
no need to mount it again when user goes to shell after installation
Reviewed by: allanjude
Obtained from: pfSense
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D8573
MFC [85] revisions 309719-309720, 309901-309902, 309904-309911,
309913-309920, 309922-309924, 309926, 309928, 309930, 309932, 309934,
309937-309942, 309944-309952, 309958-309998, and 310038 (described below)
r309719: Remove unnecessary trailing backslashes
r309720: Functions in their own section
r309901: Comments
r309902: Use $( ... ) instead of `...`
r309904: Change "[ ! -z ... ]" => "[ ... ]" and "[ -z ... ]" => "[ ! ... ]"
r309905: Remove unnecessary local initializers
r309906: Consolidate locals
r309907: Replace funny block with something easy to digest
r309908: Collapse tiny if statements
r309909: Change "[ ! ... ] && ..." to "[ ... ] || ..."
r309910: Remove unnecessary quotes around number in test
r309911: Group fallbacks together
r309913: Allow $BSDINSTALL_TMPETC to contain whitespace or special chars
r309914: Add missing `-e' parameter to sed invocations
r309915: "echo | sed | sed | awk" is silly (changed to "echo | awk")
r309916: Be internally consistent (": > ..." is used elsewhere in this file)
r309917: awk(1) match() takes a regex, use /.../ to remind ourselves of this
r309918: Remove unnecessary `-n' parameter to head/tail
r309919: Whitespace
r309920: Use provided API instead of hard-coded status integers
r309922: Centralize backtitle string
r309923: There is zero harm in always passing --default-item to dialog
r309924: Always pass --default-item parameter to dialog
r309926: Change the name of a variable from $def_item_... to $default_...
r309928: Use ~ instead of match()
r309930: Use ternary operator
r309932: Remove an unnecessary "return $?" at end of function
r309934: Consolidate redirects into here documents
r309937: Whitespace (dialog options separated to minimize diffs)
r309938: Use provided API (change "dialog" to "$DIALOG")
r309939: Fix incorrect use of provided API
r309940: Reorder dialog parameters based on commonality for readability
r309941: Use provided API to centralize dialog title strings
r309942: Allow the script path to contain whitespace and special characters
r309944: Fix invalid parameter expansion (change $@ to "$@")
r309945: 1 is the default descriptor for redirects without an fd prefix
r309946: Use more succinct awk syntax
r309947: Remove unnecessary semi-colons
r309948: Remove incomplete and unnecessary creation of fd3
r309949: Utilize provided i18n strings
r309950: Whitespace
r309951: Remove an unnecessary call to f_dialog_title_restore()
r309952: Move the secondary condition into the action clause
r309958: Quote WLAN_IFACE (pedantic)
r309959: Use oft-neglected syntax "startcondition, stopcondition { ... }"
r309960: Add missing backslash
r309961: Stop repeating strings (centralize prompt string)
r309962: More efficiently make use of the exit status
r309963: Avoid non-standard options
r309964: Sort the domains
r309965: Whitespace alignment
r309966: Sanitize dialog output for portability/compatibility requirements
r309967: Use more generic f_yesno() from provided API
r309968: Properly quote variable
r309969: Send stderr to the same place as stdout
r309970: Remove completely unnecesary parentheses
r309971: Start deconstructing a conveluted hunk of code
r309972: If the first ping succeeded, why on Earth should we ping it again?
r309973: Why use $? when you can use the command itself
r309974: These two error messages have always been backwards since inception
r309975: Continued resolution of conveluted statement
r309976: You don't need parentheses for awk's printf
r309977: Whitespace and alignment
r309978: Neither printf nor print need parens in awk
r309979: This statement has too many backslashes
r309980: Just use print
r309981: Add missing quotes
r309982: Remove unnecessary quotes
r309983: Use the provided API for calculating the appropriate size of menus
r309984: Whitespace alignment
r309985: Comment
r309986: There's an API function for displaying errors
r309987: There's an API function for displaying yes/no dialogs
r309988: There's an API function for displaying pauses
r309989: There's an API function for catching errors
r309990: Calculate proper size of menu list dialog
r309991: Simplify bringup of interface after changes and catch errors
r309992: Restore previous comment
r309993: Why test $? when you can test the command
r309994: Wordsmithing
r309995: Simplify loop by moving predicate to clause
r309996: Simplify single-line if statements
r309997: The flags of a WLAN need to be quoted
r309998: It's completely pointless to replace newlines with space
r310038: Revert r309918 -- modern POSIX has deprecated -<#>/+<#> syntax
PR: bin/214933
Fix non-functional bsdinstall services dialog.
The most recent version of bsdinstall does not seem to respect any of
the checkboxes in the "Choose the services you would like to be started
at boot" dialog. None of the chosen services end up in the rc.conf file
that is installed onto the target system.
This is caused by the bsdinstall/scripts/hardening script, which
implements the new hardening options dialog. The script starts by
overwriting the previously written rc.conf.services file:
echo -n > $BSDINSTALL_TMPETC/rc.conf.services
which is obviously incorrect. It should clear out rc.conf.hardening
instead.
Approved by: re (kib)
Reviewed by: allanjude
PR: 211506
Differential Revision: https://reviews.freebsd.org/D7387
Add new System Hardening menu and options to bsdinstall.
This patch add new 'hardening' file responsible for new bsdinstall
'System Hardening' menu allowing users to set some sane and carefully
picked system security options (like random process id's, hiding
other users/groups processes and others).
All options are OFF by default in this patch due to POLA principle
with intention to turn change some of them to ON by default in future.
Reviewed by: adrian, allanjude, bdrewery, nwhitehorn
Approved by: re@, adrian, allanjude
Add new menu to bsdinstall to allow user to set date and time after
selecting timezone. The 'skip' button is the default selection.
Submitted by: des
Approved by: re (gjb)
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)
Apply the LenovoFix (fake partition in pMBR is 2nd rather than 1st)
and GPT Active fix (mark the fake pMBR partition active) to respective
hardware that is confirmed to require such to boot correct.
Submitted by: Sam Fourman Jr. <[email protected]> (ThinkPad W520)
Submitted by: Matthias Apitz <[email protected]> (Latitude E6330)
Approved by: re (gjb)
Sponsored by: ScaleEngine Inc.
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 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
Allow to setup country and/or regulatory domain before scanning
(since channel list is affected by regulatory restrictions this may
impact scan results).
PR: 182600 (originally)
Differential Revision: https://reviews.freebsd.org/D6325
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.
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
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.
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 <[email protected]> (original version)
If a user requested encrypted swap, but 0 sized, it would still be added to fstab
PR: 208630
Submitted by: Ganael LAPLANCHE <[email protected]>
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
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.
The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode
without the Active flag in the Protective MBR. Suggest the workaround
during installation.
Since an increasing number of Dell systems exhibit this behavior,
I imagine all Dells past a certain date will do so. I would like
to suggest the workaround for all Dells with a BIOS date of, say,
2014 or later, but I would need to test a variety of systems before
committing such a change.
Reviewed by: allanjude, dteske
MFC after: 5 days
Relnotes: We should probably suggest using GPT+Active on "recent" Dells.
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D4075
- Rework MANIFEST generation and parsing via bsdinstall(8).
- Allow selecting debugging distribution sets during install.
- Rework bsdinstall(8) to fetch remote debug distribution sets
when they are not available on the local install medium.
- Allow selecting additional non-GENERIC kernels during install.
At present, GENERIC is still required, and installed by default.
Tested with: head@r293203
Sponsored by: The FreeBSD Foundation