Commit graph

474 commits

Author SHA1 Message Date
Jessica Clarke
ccbd3de0f3 bsdinstall: Copy /etc/localtime as symlink in jail script
Without -P (or -R, which defaults to enabling -P) symlinks are
dereferenced and so the target file is copied, not the symlink itself.

Fixes:	5e16809c95 ("tzsetup: symlink /etc/localtime instead of copying")
2025-08-27 22:35:54 +01:00
Isaac Freund
6fa24b29d8 release, bsdinstall: include FreeBSD-kernel-man package
This package has been newly split off during man page reorganization and
should be considered part of the "base" component rather than being
ignored. Update pkgbase release and bsdinstall scripts for this change.

Reviewed by:	ivy
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51519
2025-07-30 18:57:17 -04:00
Lexi Winter
16045420e7 bsdinstall: use the canonical name for compression
According to zfsprops(7), the canonical property for the compression
algorithm is "compression", with "compress" accepted as an alternate
name.  Use the canonical name in bsdinstall.

While here, change "lz4" to "on" so we pick up any future changes in
the default compression algorithm.

MFC after:	1 week
Reviewed by:	delphij
Differential Revision:	https://reviews.freebsd.org/D51572
2025-07-28 13:45:26 +01:00
Ed Maste
ebc6ff8db1 bsdinstall: Improve message for existing FreeBSD EFI entry
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
2025-07-26 16:06:22 -04:00
Ed Maste
ee110941e3 bsdinstall: Remove support for ZFS + MBR disk layouts
It hasn't worked for some time -- as reported in review D40816
"Installing FreeBSD with Auto ZFS + MBR has been broken ever since the
move to OpenZFS with FreeBSD 13."  It relied on the partition table and
ZFS data overlapping in a very fragile way and is not a good idea.

Reviewed by:	jhb
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51028
2025-07-25 15:26:09 -04:00
Isaac Freund
cc413e2c04 bsdinstall: Always install FreeBSD-base.conf if using pkgbase
Currently bsdinstall does not install FreeBSD-base.conf when performing
an offline pkgbase installation. This commit fixes that.

PR:		287821
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51101
2025-07-21 15:29:04 -04:00
Bjoern A. Zeeb
153e73d782 bsdinstall: wlanconfig: ensure the interface is always up for scanning
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	thj (earlier), emaste
Differential Revision: https://reviews.freebsd.org/D51312
2025-07-15 18:41:05 +00:00
Bjoern A. Zeeb
5a1e2927d6 bsdinstall: wlanconfig: properly format regdomain dialog input
Without the extra '\n' the dual-column ('REGD' '') are not properly
separated for dialog which leads to an [misleading] error hidden on
the command line:
	Error: --menu bad arguments items number.
[Writing this I wonder why the dual-column input is needed].

It is still unclear as to where the error message quoted in PR287538
suddenly came from for 14.3-RELEASE given the code was broken since 2016
(or noone ever noticed or reported).

Looking at manual ifconfig output:
    ifconfig wlan0 country GB regdomain Expected
    -> ifconfig: unknown regdomain Expected
and "ifconfig: " gets stripped by the script, which means the regdomain
variable would have to be set to "Expected" or more likely to
"Expected eval: Use: not found" which looks like a concatination of
errors.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Fixes:		95ee591e83
PR:		287538
Reviewed by:	emaste, thj
Differential Revision: https://reviews.freebsd.org/D51313
2025-07-15 17:53:21 +00:00
Ed Maste
1b0b13915a bsdinstall: Report error from installing firmware
We should improve error reporting from commands invoked by binstall more
generally, but this is a small improvement for an observed failure case.

PR:		287654
Reviewed by:	allanjude
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50941
2025-06-24 15:13:39 -04:00
Ed Maste
47c3158b65 bsdinstall: Skip pkgbase question if no legacy dist sets
If the install media was built without dist sets (and so has no MANIFEST
file) we do not need to prompt the user, and only pkgbase is in use.

Reviewed by:	Isaac Freund <ifreund@freebsdfoundation.org>
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50918
2025-06-23 10:44:14 -04:00
Ed Maste
eb5884c564 bsdinstall: Emit a warning if the system has too little memory
PR:		251993
Reviewed by:	adrian
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50944
2025-06-20 15:22:18 -04:00
Ed Maste
9134ed1573 bsdinstall: Default to pkgbase if media contains base packages
As of commit 62d18f8c4c ("release: Add -DPKGBASE option to include
pkgbase packages") we can include base system packages on the install
media instead of dist tarballs.

Set the default for the traditional/pkgbase question to match the
artifact type included in the install image.

Reviewed by:	jrm
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50467
2025-06-16 18:44:57 -04:00
Chattrapat Sangmanee
754bc3dcd3 bsdinstall: fix ps3 regression
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
2025-06-12 19:21:45 -06:00
Pierre Pronchery
9de72af2cc bsdinstall: restore the environment when restarting
It is possible to restart the installation process upon errors, when
installing normally through the `auto` script, or when installing a jail
with the `jail` script. However, some values obtained interactively from
the user or guessed by some scripts were kept in the environment when
restarting the process; this made it impossible to re-run some steps as
expected after the restart.

For instance, if a bad choice of mirror was made in the `mirrorselect`
phase, restarting the installer remembered the choice made, and would
never prompt for a different one again. Rebooting was then the only easy
way out of this situation.

This change restores a pre-defined list of environment variables when
restarting the installation process.

PR:		266987
Reviewed by:	emaste
Approved by:	philip (mentor)
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D42281
2025-06-01 14:53:16 +02:00
Pierre Pronchery
046800313a bsdinstall: implement rootpass with bsddialog
This provides a more consistent user experience to the FreeBSD
installer.

Tested by:	thj
Approved by:	philip (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D44280
2025-05-30 16:45:48 +02:00
Isaac Freund
0a86a8ace3 bsdinstall: support offline pkgbase installation
Reviewed by:	bapt, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50347
2025-05-23 09:41:49 -04:00
Isaac Freund
0bfa8a4596 bsdinstall: improve pkgbase target retry prompts
These now use bsddialog rather than prompting the user for input on the
console.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50270
2025-05-23 09:40:12 -04:00
Isaac Freund
3c3dd62966 bsdinstall: add pkgbase component selection dialog
This matches the style of the component selection dialog for traditional
tarball-based installations. The only difference is that there is
currently no ports component offered when using pkgbase.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50178
2025-05-22 14:59:47 -04:00
Graham Perrin
f69afe4201 zfsboot: fix misuse of the phrase zpool
A pool is not a zpool.

Reviewed by:	jbh, ivy
Approved by:	des (mentor)
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1569
2025-05-19 09:10:29 +01:00
Dag-Erling Smørgrav
5870d6a1ef bsdinstall: Use a login shell for final configuration.
If the user accepts our offer of a shell to perform final configuration
tasks before rebooting, start a login shell.  This ensures it will have
the correct PATH and be able to install packages without issues.

PR:		286722
MFC after:	3 days
Reviewed by:	jrtc27, allanjude, emaste
Differential Revision:	https://reviews.freebsd.org/D50297
2025-05-11 23:04:55 +02:00
Isaac Freund
34b43f4b26 bsdinstall: add pkgbase prompt to auto script
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49824
2025-04-28 20:34:18 -04:00
Isaac Freund
4daf244aed bsdinstall: add pkgbase prompt to jail script
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49823
2025-04-28 20:34:18 -04:00
Isaac Freund
ee9cfd7275 bsdinstall: add pkgbase target
Reviewed by:	ziaee (manpages), kevans (lua), emaste
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49822
2025-04-28 12:12:27 -04:00
Jessica Clarke
97350075fe bsdinstall: Switched back to amended single-button finalconfig
Commit ac78e3e9c5 ("bsdinstall: Add "Finish" button to finalconfig")
removed the Exit entry from the menu, renamed OK to Select and added a
Finish in place of the old Exit entry. On the surface this seemed like a
good idea, as at a glance OK wasn't clear that it was selecting an entry
rather than just closing the box, Exit isn't the most obvious term
to use for proceeding through the installer without doing anything, and
it separated out the different cases of "do something extra" and
"continue". However, because bsddialog (and dialog) keep a menu entry
highlighted even when the Cancel (in this case, Finish) button is
selected, this now looks even more confusing, with users easily
believing that they are about to select the Add User option (being
either surprised when it doesn't actually do that, or being confused
about how to not select it).

Instead, go back to the old scheme that fits more with bsddialog's
supported functionality but tweak it to try and improve on the confusing
UI/UX from the past. Specifically, the UI changes compared with the
original version are as follows:

1. The OK button is renamed to Select, as in the current UI
2. The Exit entry is renamed to Finish, mirroring the label of the
   button in the current UI that it replaces

This partially reverts commit ac78e3e9c5.

Reviewed by:	khorben_defora.org
Differential Revision:	https://reviews.freebsd.org/D47229
2025-02-04 17:27:00 +00:00
Franco Fichtner
d726bc2863 bsdinstall: hook up help line and prompt for ZFS disk selection
Previously we were passing the wrong variable names for the prompt and
help line, so the intended action wasn't clear to the user.

Reviewed by:	jhb, markj
MFC after:	3 days
See also:	https://github.com/opnsense/installer/issues/22
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1579
2025-01-24 19:33:18 +00:00
Alexander Ziaee
347eb42dbc
bsdinstall/zfsboot: Remove unused global variable
In an AMA session on the FreeBSD Discord, it was revealed that no
logic remains calling GPART_BOOTCODE_PARTONLY. It was removed in
aa2a0e0fc3 for FreeBSD 12. git grep shows no other references.
No functional change intended.

MFC after:		2 weeks
Fixes:			aa2a0e0fc3 (Enable new UEFI+GELI support)
Reported by:		Antranig Vartanian <antranigv@freebsd.am>
Reviewed by:		emaste, mhorne
Approved by:		emaste, mhorne (src)
Approved by:		mhorne, carlavilla (mentors)
Differential Revision:	https://reviews.freebsd.org/D48086
2025-01-21 14:26:53 -05:00
Mark Johnston
5bf3ac7ae2 bsdinstall: Fix a typo in a comment
PR:		283507
MFC after:	1 week
2025-01-06 22:56:49 +00:00
Craig Leres
ca7e12f7df bsdinstall zfsboot: Add an option to edit the ZFS pool creation options
This allows the default options (-O compress=lz4 -O atime=off) to be
overridden, before the ZFS boot pool is created. For example, to set the
compression algorithm to something different.

Reviewed by:	jhb, dim
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D47478
2024-12-26 15:44:24 +01:00
Bjoern A. Zeeb
bbe2a1da2d bsdinstall: add menu to install firmware
Add a menu to the installer to run fwget(8) inside the newly installed
system to install firmware known to be needed.
This requires working netowrking.

This is needed at least for wireless currently for when we entirely
stop shipping new firmware in src.git to have working networking on
the installed system (we already do need this for at least rtw89).

Sponsored by:	The FreeBSD Foundation
Tested with:	4 different iwlwifi chipsets in a system (earlier version)
Suggested improvments by: jrtc27
MFC after:	8 hours
Differential Revision: https://reviews.freebsd.org/D47491
2024-11-20 13:06:06 +00:00
Bjoern A. Zeeb
5399052c63 bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant
Make sure an interface is back up before (re-)starting wpa_supplicant
in wlanconfig not relying on wpa to UP the interface (though we fixed
that).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	emaste (in D47491)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D47491
2024-11-19 00:06:16 +00:00
Ed Maste
2d9ff965b5 bsdinstall: skip tzsetup UTC question
During installation bsdinstall asks (via tzsetup):

> Is this machine's CMOS clock set to UTC?  If it is set to local time,
> or you don't know, please choose NO here!

Most operating systems, except for Windows, use UTC in the hardware
real-time clock by default.  This question from tzsetup is presumably
intended to aid in dual-boot-with-Windows configurations, but these
represent a fraction of all FreeBSD installs.

Rather than asking this question on every install just default to UTC.
Users who want to dual-boot Windows can create /etc/wall_cmos_clock.
We can look at making this smarter in the future.

Reviewed by:	bapt, brooks, brd, cy, 0mp, ngie
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45569
2024-11-12 14:49:04 -05:00
Ahmad Khalifa
599273f942 Copy the new ia32 loader
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
2024-09-20 08:45:10 -06:00
Warner Losh
e9ac41698b Remove residual blank line at start of Makefile
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
2024-07-15 16:43:39 -06:00
Renato Botelho
55d2990548 bsdinstall: Fix wifi network selection size
Use correct variable while creating dialog used to select among
available wireless networks

Approved by:	asiciliano
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D45271
2024-05-20 13:39:29 -03:00
Fernando Apesteguía
47535ba3d3 bsdinstall: Remove unused variables in fetchmissingdists
ALL_DISTRIBUTIONS and VERIFY_MANIFEST_SIG

They are neither used in the script nor exported.
Not referenced anywhere in bsdinstall/*

Approved by:		imp@
Differential Revision:	https://reviews.freebsd.org/D42369
2024-05-12 19:25:06 +02:00
Mark Johnston
ffbaa453c1 bsdinstall: Stop loading cryptodev for ZFS installations
- zfs depends on the crypto module, not cryptodev, and most arm64 kernel
  configs include std.dev, which includes "device crypto" anyway.
- This config works around a problem with kldxref lacking cross-target
  support, but that has since been fixed.
- Loading cryptodev creates /dev/crypto, which gives unprivileged users
  access to the kernel's opencrypto framework.  Very few applications
  need it, so we're needlessly increasing the kernel's surface area.

Thus, stop auto-loading cryptodev.

Reviewed by:	kevans, allanjude, des
Differential Revision:	https://reviews.freebsd.org/D45127
2024-05-08 12:01:52 -04:00
Bjoern A. Zeeb
ad31d47642 bsdinstall: update comment related to pkg
pkg_add has been gone since 2013(?).  Refer to pkg(8) instead.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	jrtc27
Differential Revision: https://reviews.freebsd.org/D44946
2024-04-25 17:44:18 +00:00
Mike Karels
970ea0b2cb bsdinstall: draw attention to new network config options
The network configuration options have changed in bsdinstall, with
an Auto option to proceed directly to DHCP and IPv6 autoconfig (which
is the default) as well as Manual (the old mode).  For users like me
that were used to hitting return automatically to select an interface,
but want manual configuration, attempt to call out the difference:
Change the menu caption to say "Please select a network interface
and configuration mode:" and not just an interface.

Reviewed by:	jrtc27
2024-03-27 15:20:26 -05:00
Philip Paeps
2911c44baf bsdinstall: remove two dead mirrors 2024-02-15 21:49:33 +08:00
Philip Paeps
9c59988175 bsdinstall: prefer HTTP
In 2024, users are more likely to have working HTTP than working FTP.
Present http://ftp.FreeBSD.org as the first option in the installer.
Keep ftp://ftp.FreeBSD.org as the second option.

MFC after:	3 weeks
2024-02-15 21:49:33 +08:00
Jessica Clarke
c994f226bb bsdinstall: Add new Auto option to netconfig interface selection dialog
This changes the OK / Cancel buttons into Auto / Manual / Cancel, with
Auto being the default. Manual behaves like OK used to, i.e. presents a
series of dialogs asking exactly how to configure the interface, and
Cancel is unchanged, exiting with exit code 1. Auto will attempt to
configure IPv4+DHCP and IPv6+SLAAC with no interaction, failing only if
neither can be configured, thereby supporting all of IPv4-only,
IPv6-only and dual-stack environments. If at least one DNS server is
provided, it will also skip asking for DNS settings, otherwise it will
act like Manual mode for the purposes of DNS settings and prompt. For a
standard dual-stack environment this cuts down the number of netconfig
dialogs from 6 (interface, IPv4, DHCP, IPv6, SLAAC, DNS) to just the
first one.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D43731
2024-02-09 18:13:47 +00:00
Jessica Clarke
1e75e61d5c bsdinstall: Fix broken netconfig persistence for installed system
The replacement of echo >> with sysrc -f used sysrc key value, which
means "read variables key and value" and thus did nothing useful (and in
fact emitted errors to the log about neither existing). Instead use the
correct sysrc key=value form so the installed system comes back up with
working networking.

Fixes:	60b37735f3 ("bsdinstall netconfig: avoid duplicate entries in rc.conf")
2024-02-03 22:50:47 +00:00
Jessica Clarke
7414d14bd5 bsdinstall: Drop Error from title in netconfig no interfaces dialog
This isn't inherently an error. It is if you're attempting to download
dist tarballs or later install packages, but a FreeBSD system with no
NIC is a reasonable setup to have, especially in a throwaway VM setting,
so we shouldn't say it is one.

Leaving the exit code as 1 is still fine, since auto will ignore it, and
avoids breaking other uses.

MFC after:	1 week
2024-02-03 01:52:53 +00:00
Jessica Clarke
b809c7d6a2 bsdinstall: Fix netconfig script when no interfaces are present
The script uses [ -z "$INTERFACES" ] to check if the list of interfaces
is empty and will exit early if so, but INTERFACES always contains at
least a space due to the way it appends the list of wireless devices.
Fix this by only adding the space when there are devices to append,
mirroring the behaviour for non-wireless devices above (both will result
in a redundant leading space when the list is non-empty, but that one is
harmless).

Fixes:		159ca5c844 ("Adapt to new wireless scheme where base wlan interfaces do not show up in ifconfig anymore.")
MFC after:	1 week
2024-02-03 01:52:37 +00:00
Jessica Clarke
7143521f4c Revert "bsdinstall: separate out dist selection in prep for pkgbase support"
Firstly, my review comments were not addressed and instead totally
ignored. Secondly, and a more valid justification for the revert, this
completely breaks the installer, since selectdists isn't installed.
Given the blatant lack of testing, back out this commit until it has
actually been tested and review comments taken on board so that the
installer actually works.

This reverts commit 009d3f66cb.
2024-02-03 01:31:11 +00:00
Brad Davis
009d3f66cb bsdinstall: separate out dist selection in prep for pkgbase support
No functional change intended.

Approved by:	asiciliano
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43621
2024-01-31 15:05:27 -07:00
Michael Gmelin
731704f5ea bsdinstall: Fix installation script splitting
This allows writing setup scripts that contain lines starting with
"#!", e.g., a shebang when creating a shell script using cat:

    #!/bin/sh
    echo "Populate rc.local"
    cat >/etc/rc.local<<EOF
    #!/bin/sh
    echo booted | logger -s -t 'example'
    EOF

Prevent accidentally running a setup script left behind by a
previous invocation of bsdinstall.

Reviewed by:	imp, jrtc27
Differential Revision:	https://reviews.freebsd.org/D43350
2024-01-09 19:14:17 +01:00
Jessica Clarke
47d669f10e bsdinstall: Encode dists to valid variable names in checksum script
Currently we just strip the .txz of the dist name (and add a status_
prefix) to get the shell variable name for its status, but this doesn't
give a valid result for dists like base-dbg, kernel-dbg and lib32-dbg,
or even kernel.KERNCONF (or, combining the two, kernel.KERNCONF-dbg). As
a result, four things go wrong for such dists:

1. If there is a dot and/or a dash in the name, writing to the variable
   fails and spits an error out on stderr to the log
3. If there is a dot in the name before any dash, the syntax is always
   invalid, reading the variable fails, spits an error out on stderr to
   the log, the result is the empty string and that is interpreted as
   being 0%
2. If there is a dash in the name before any dot, and there is a dist
   whose name is the substring up to that first dash, and it has already
   had its status written to, reading the variable instead reads that
   dist's variable and so the status of that dist is displayed instead
3. If there is a dash in the name before any dot, and either there is
   not a dist whose name is the substring up to that first dash or there
   is such a dist but it has not already had its status written to,
   reading the varaible instead results in the substring after the first
   dash, including any additional string expansion syntax that follows
   (i.e. ${status_kernel-dbg:--11}, the expression used to read the
   variable, is interpreted as reading status_kernel with a default
   value of "dbg:--11")

For example, in a default install with base, kernel, kernel-dbg and
lib32, the following sequence of displays happens:

1. base is In Progress, kernel is Pending, kernel-dbg is 0% (what shows
   for the garbage input "dbg:--11") and lib32 is Pending
2. base is Passed, kernel is In Progress, kernel-dbg is In Progress
   (since kernel has now had its status written to) and lib32 is
   Pending
3. base is Passed, kernel is Passed, kernel-dbg is Passed (again, since
   that is the status of kernel, despite that kernel-dbg is being
   verified at this point) and lib32 is Pending
4. base is Passed, kernel is Passed, kernel-dbg is Passed and lib32 is
   In Progress

Fix this with a crude encoding scheme. More special characters can
easily be added if needed in future.

Note that, prior to bsddialog being used (and thus for branches this is
MFC'ed to where dialog is still used), the same problem existed but
displayed slightly differently due to a combination of different default
values and different behaviour for unintended inputs.

Fixes:		b70047d413 ("Add generation of an installation manifest containing SHA256 checksums as ...")
MFC after:	1 week
2023-12-06 21:37:32 +00:00
John Baldwin
de82aed119 bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null.
Only set a default value of 1 if the shell variable is unset.  This allows
installer scripts to disable the variable.

PR:		274513
Reported by:	Albin "a12l" Otterhäll <bugs.freebsd.org@a12l.xyz>
Differential Revision:	https://reviews.freebsd.org/D42319
2023-11-18 11:18:29 -08:00
Alfonso S. Siciliano
e44751530e
bsdinstall hostname: Restore bsdconfig API
Restore bsdconfig API to handle hostname dialog because bsddialog 1.0
matches all features required by bsdconfig(1). Implicitly this commit
restores also Xdialog(1) for this script.

This commit reverts:
 - "bsdinstall hostname: Replace dialog with bsddialog"
   6368dcb292
 - "bsdinstall(8) hostname: Update for bsddialog 0.3"
   5f3ec44e7e.

The script continues to use bsddialog(1) by default via $DIALOG in
bsdconfig(1).
2023-10-19 12:59:49 +02:00