Commit Graph

596 Commits

Author SHA1 Message Date
Brad Davis
be0d16b0b0 bsdinstall: filter out disks that are unavailable from the list of options in ZFS
Reviewed by:	allanjude, rew
Differential Revision:	https://reviews.freebsd.org/D34167
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-04-10 15:09:14 -06:00
Alfonso S. Siciliano
50e244964e
bsdinstall/partedit: Replace libdialog with libbsddialog
bsdinstall/partedit: Replace (LGPL) libdialog with (BSD-2-Clause)
libbsddialog. Rewrite diskeditor.c and rename diskmenu.c because
it uses an API for menu totally incompatible with libbsddialog.
This is a User Interface change everything else is unchanged.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34639
2022-04-04 02:05:00 +02:00
Alfonso S. Siciliano
6833ac673d
bsdinstall netconfig: Replace dialog(1) with bsddialog(1)
Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1).

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34682
2022-04-02 21:33:40 +02:00
Jens Schweikhardt
e50daba0e4 Remove extraneous semicolons trailing break and continue statements. 2022-03-29 19:48:11 +02:00
Alfonso S. Siciliano
2617d4df52
bsdinstall mount: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34651
2022-03-29 16:54:51 +02:00
Alfonso S. Siciliano
48af6ad902
bsdinstall fetchmissingdists: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34654
2022-03-29 16:43:01 +02:00
Alfonso S. Siciliano
230811a883
bsdinstall/distfetch: Remove duplicate header
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34685
2022-03-29 16:19:57 +02:00
Alfonso S. Siciliano
0868f62176
bsdinstall checksum: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34660
2022-03-26 01:37:59 +01:00
Alfonso S. Siciliano
bbddd8888a
bsdinstall mirrorselect: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34582
2022-03-26 01:16:03 +01:00
Alfonso S. Siciliano
268c47b9ac
bsdinstall time: Revert dialog title
Revert dialog title like before dialog(1) replacement
0e5c72c3cc.

Reported by:		jrtc27
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34647
2022-03-26 00:52:21 +01:00
Alfonso S. Siciliano
852d975ccf
bsdinstall services: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34640
2022-03-26 00:22:10 +01:00
Farhan Khan
4b1e2c2f77 bsdinstall(8): Usage example of tar doesn't work
The order of arguments in the example does not work, because tar thinks
the directory is named -C, which does not exist and reports:
tar: Error opening archive: Failed to open '-C'

Approved by:	rpokala@ (src) on IRC
Differential Revision:	https://reviews.freebsd.org/D34649
2022-03-23 21:59:53 +01:00
Alfonso S. Siciliano
0e5c72c3cc
bsdinstall time: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility,
'dialog --calendar' is replaced by 'bsddialog --datebox' with same
features but different User Interface.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34583
2022-03-23 16:56:37 +01:00
Alfonso S. Siciliano
4d1ba6febf
bsdinstall hardening: Replace dialog with bsddialog
bsdinstall/scripts/hardening: Replace (LGPL) dialog utility with
(BSD-2-CLAUSE) dialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34102
2022-03-23 00:58:48 +01:00
Jens Schweikhardt
8422d54f40 Correct a handful of typos and grammos. 2022-03-22 21:12:42 +01:00
Alfonso S. Siciliano
f27c6a3e87
bsdinstall/distfetch: Replace libdialog with libbsddialog
Replace (LGPL) libdialog with (BSD-2-Clause) libbsddialog,
while here diversify error messages to find quickly the exact point
of failure.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34464
2022-03-16 00:27:36 +01:00
Alexander Motin
2117cdd4b4 GEOM: Introduce gctl_add_param() API.
Make gctl_add_param() API public, allowing more precise control over
parameter flags.  Previously it was impossible to properly declare
write-only ASCII parameters, used for result reporting, they were
declared as read-write binary instead, that was not nice.

MFC after:	1 month
2022-03-07 11:12:25 -05:00
Alfonso S. Siciliano
912df915c2
wlanconfig: allow to enter WiFi details if no networks found
Improve the installer: wlanconfig allows user to enter WiFi details
if no networks found, useful to connect to a hidden SSID.

PR:			246192
Reported by:		emaste
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34149
2022-03-02 00:04:57 +01:00
Alfonso S. Siciliano
55af0f96d0
bsdinstall/distfetch: fix main bar percentage with errors
UI fix not related to the real fetching process, use 'nfiles'
(instead of 'total files size') to compute main bar percentage
if an error occurs:

 - fix: main bar greater than 100%, if an error occurs before fetching
 - fix: main bar less than 100%, if an error occurs during fetching
 - add: last mixedgauge, at least one dialog if a total failure occurs

PR:		164094, 169748
Approved by:	bapt (mentor)
Review:		https://reviews.freebsd.org/D33978
2022-02-23 01:54:51 +01:00
Baptiste Daroussin
f954986015 disextract: eliminate last use of __DECONST 2022-01-28 10:09:08 +01:00
Baptiste Daroussin
dd8ca6b27f distextract: simply code by using strsep(3) 2022-01-28 10:06:55 +01:00
Alfonso Siciliano
263660c061 bsddialog: import version 0.1
Import bsddialog 0.1 Utility and Library, fully refatorized, API stable,
manuals completed, easier to maintain and improve.

Update deps for new API:
add mixedgauge consts, delete __DECONST and add bsddialog_geterror()
info to avoid silent errors

* tzsetup
* kbdmap
* distextract

Differential Revision:	https://reviews.freebsd.org/D34066
2022-01-28 09:56:21 +01:00
Tom Jones
f0ec0fda01 bsdinstall: Add quotes around error message argument
When error is called with a message with spaces (and probably multiple
lines) these are passed into dialog unquoted and an error message was
presented, wrap with quotes.

Reviewed by:	bapt, allanjude
Sponsored by:   Ampere Computing LLC
Sponsored by:   Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D33918
2022-01-27 17:14:30 +00:00
Nathan Whitehorn
dfa5a74357 Fix grammatical issues. 2022-01-01 19:34:48 -05:00
Alfonso Siciliano
18f20d5d96 bsddialog: convert bsdinstall/distextract
Differential Revision:	https://reviews.freebsd.org/D33581
2022-01-01 21:51:23 +01:00
Emmanuel Vadot
9935b0e8ea bsdinstall: zfsboot: Prompt user for zpool name if the pool already exists
If one install FreeBSD on multiple disks (say 13 and CURRENT) the first created
pool will always be used.
Prompt the user for a new pool name if we detect that the default or supplied one
already exists.

Reviewed by:	imp
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33331
2021-12-15 15:24:07 +01:00
Emmanuel Vadot
40c928e7b8 bsdinstall: bootconfig: Try to clean old efi boot entries
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
2021-12-15 15:23:27 +01:00
Alfredo Dal'Ava Junior
b6644f529c powerpc64: make autoboot possible on powernv machines
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
2021-11-25 21:02:53 -03:00
Baptiste Daroussin
7d51283f70 partedit: cleanup headers
Removed dialog.h where not needed and include headers actually used
2021-11-24 12:06:34 +01:00
Marcin Wojtas
bf410c6eda Revert "bsdinstall: add knob to set ASLR sysctls"
This reverts commit 020f411255.

Because now ASLR is enabled by default for 64-bit architectures
and the purpose of the installation menu is to allow choosing
additional 'mitigation'/'hardening' options that are originally
disabled, remove the ASLR knob from bsdinstall.

Discussed with: emaste
Obtained from: Semihalf
Sponsored by: Stormshield
2021-11-16 23:16:10 +01:00
Mateusz Piotrowski
4042b356a0 bsdinstall: Fix mirror selection
This is a follow-up to 2697622687,
which fixed 2 out of 3 broken uses of the mirrorselect script.

Reviewed by:	emaste
Approved by:	emaste (src)
MFC after:	7 days
Differential Revision:	https://reviews.freebsd.org/D32927
2021-11-11 16:18:36 +01:00
Baptiste Daroussin
19deec3b30 bsdinstall: reduce overlinking
both distextract and distfetch does not directly use ncurses,
or figpart, drop their direct link to those libs
2021-10-04 11:38:27 +02:00
Ed Maste
3e5bff102b bsdinstall: Remove unused sysctl.h header #include 2021-08-07 20:30:29 -04:00
Renato Botelho
95f0da5be1 bsdinstall: Only show menu if there are more items to be installed
MFC after:	3 days
Obtained from:	Rubicon Communications, LLC ("Netgate")
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-07-22 16:02:34 -04:00
Jose Luis Duran
6ce785c50b bsdinstall: Also copy /var/db/zoneinfo
Per tzsetup(8), /etc/localtime and /var/db/zoneinfo go hand in hand.

Reviewed by:	imp@
Pull Request:	https://github.com/freebsd/freebsd-src/pull/486
2021-06-30 11:08:26 -06:00
Ryan Moeller
b50db44f02 bsdinstall: Avoid double-mounting /dev
After 34766aa8cb we are mounting and
unmounting devfs elsewhere already.

Reviewed by:	nwhitehorn
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D30877
2021-06-23 21:24:53 +00:00
Philip Paeps
7daa45becf bsdinstall: add a new mirror in Bulgaria
Provided by Telepoint Mirror Service.

Reported by:	Valentin Nikolov <mirror@telepoint.bg>
MFC after:	3 days
2021-06-17 21:07:37 +08:00
eoli3n
6f4c1456b5 bsdinstall: Allow automation in jails
Set SCRIPT=/path/to/script env var to be able to automate bsdinstall to
a jail.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/473
Reviewed by:	allanjude
2021-06-11 13:53:17 -06:00
Navdeep Parhar
5104dfbeff bsdinstall: Fix typo (Instalation -> Installation). 2021-06-02 21:44:11 -07:00
John Ko
7ef92163ab Allows user to specify an optional ZFSBOOT_POOL_SIZE for their zroot
The default is to create a zroot that consumes the whole disk because if
used with geli(8) this makes sense.

Without geli(8), I like to keep my data pool separate from my system
pool.

This is different than ZFSBOOT_BOOT_POOL_SIZE which is named bootpool.

Reviewed by:		allenjude
Pull Request:		https://github.com/freebsd/freebsd-src/pull/53
Differential Revision:	https://reviews.freebsd.org/D30588
2021-06-02 11:12:14 -06:00
Nathan Whitehorn
40923b0c81 Fix scripted installation from media without local distfiles.
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
2021-05-28 10:01:27 -04:00
Nathan Whitehorn
34766aa8cb Fix scripted installs on EFI systems using ZFS root with zfsboot.
Unlike attended installations, scripted installs did not mount non-ZFS
partitions when ZFS root (via zfsboot) was selected. Since this included
the ESP, the EFI loader was not installed. Copy logic from the
attended-install path to make this work.

PR:		255824, 255081
MFC after:	1 week
Obtained from:	Mark Huizer
2021-05-14 08:30:41 -04:00
Warner Losh
ccefbe98d8 bsdinstall: remove compat hacks for FreeBSD 9 and earlier
Sponsored by:		Netflix
2021-04-20 15:51:31 -06:00
Yuri Pankov
d3f0c032fb bsdinstall: restore time selection screen
Apparently new dialog does not like the height of 2 for the
timebox widget, use 0 (minimum size) instead.

Do the same for calendar widget as it does not change the
appearance and to prevent possible future surprises.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D29720
2021-04-19 21:39:59 +03:00
Philip Paeps
e5fc416c28 bsdinstall: remove ftp7.ua.freebsd.org mirror
PR:		254779
Reported by:	Dmytro <dima@dima.rv.ua>
2021-04-06 10:32:52 +08:00
Nathan Whitehorn
b8639a1098 Tweak language involving ZFS installation; no content changes. 2021-04-05 10:23:41 -04:00
Nathan Whitehorn
3b20b988e0 Add some general notes about scripted installations. 2021-04-05 10:23:41 -04:00
Ryan Moeller
b07b7aec65 bsdinstall: Drop vestigial bsdinstall-esps cleanup
This is not needed after 0b7472b3d8.

MFC after:	3 days
Sponsored by:	iXsystems, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D29325
2021-03-26 14:12:18 -04:00
Nathan Whitehorn
5140034cc0 Add a new mode to the scripted partition editor for variant disk names.
If the disk parameter "DEFAULT" is set in place of an actual device name,
or no disk is specified for the PARTITIONS parameter, the installer will
follow the logic used in the automatic-partitioning mode, in which it
will either provide a selection dialog for one of several disks if
several are present or automatically select it if there is only one. This
simplifies the creation of fully-automatic installation media for
hardware or VMs with varying disk names.

Suggested by:	Egoitz Aurrekoetxea <egoitz@sarenet.es>
MFC after:	3 weeks
Relnotes:	yes
2021-03-26 11:43:47 -04:00
Nathan Whitehorn
c2f16c595e Fix scripted installs on EFI systems after default mounting of the ESP.
Because the ESP mount point (/boot/efi) is in mtree, tar will attempt to
extract a directory at that point post-mount when the system is installed.
Normally, this is fine, since tar can happily set whatever properties it
wants. For FAT32 file systems, however, like the ESP, tar will attempt to
set mtime on the root directory, which FAT does not support, and tar will
interpret this as a fatal error, breaking the install (see
https://github.com/libarchive/libarchive/issues/1516). This issue would
also break scripted installs on bare-metal POWER8, POWER9, and PS3
systems, as well as some ARM systems.

This patch solves the problem in two ways:
- If stdout is a TTY, use the distextract stage instead of tar, as in
  interactive installs. distextract solves this problem internally and
  provides a nicer UI to boot, but requires a TTY.
- If stdout is not a TTY, use tar but, as a stopgap for 13.0, exclude
  boot/efi from tarball extraction and then add it by hand. This is a
  hack, and better solutions (as in the libarchive ticket above) will
  obsolete it, but it solves the most common case, leaving only
  unattended TTY-less installs on a few tier-2 platforms broken.

In addition, fix a bug with fstab generation uncovered once the tar issue
is fixed that umount(8) can depend on the ordering of lines in fstab in a
way that mount(8) does not. The partition editor now writes out fstab in
mount order, making sure umount (run at the end of scripted, but not
interactive, installs) succeeds.

PR:		254395
Reviewed by:	gjb, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29380
2021-03-23 09:29:54 -04:00
Nathan Whitehorn
9f88bee146 Bump documentation date after recent updates to bsdinstall.8. 2021-03-22 19:41:49 -04:00
Nathan Whitehorn
c8923d191d Include examples of how to build script-install media. 2021-03-22 15:58:10 -04:00
Nathan Whitehorn
f91026bf46 Improve example install scripts, making them simpler and more robust.
In particular:
- There is no need to do anything with gpart (the installer does that
  for you).
- There is no need to specify the network interface, since we have
  an option for defaults.
2021-03-22 15:58:10 -04:00
Nathan Whitehorn
e8b4c5a622 Clarify that scripted installations don't require specification of boot
partitions, as there seems to be widespread confusion on this point.

MFC after:	1 day
2021-03-19 09:45:58 -04:00
Nathan Whitehorn
e77cf2a4ab Restore /boot/efi to mtree.
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
2021-03-05 21:01:11 -05:00
Nathan Whitehorn
0b7472b3d8 Mount the EFI system partition (ESP) on newly-installed systems.
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
2021-02-23 16:24:21 -05:00
Ed Maste
020f411255 bsdinstall: add knob to set ASLR sysctls
Reviewed by:	mw
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28418
2021-02-20 11:55:00 -05:00
Ed Maste
fbc57e2df9 bsdinstall: replace multiple ifs with case
Reduce copy-paste and use a more typical construct.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28417
2021-02-20 11:54:31 -05:00
Mitchell Horne
7b08a307e8 bsdinstall: riscv-specific tweaks
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
2021-01-27 19:29:42 -04:00
Mitchell Horne
676b7d077c bsdinstall: create /efi/boot directory in ESP
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
2021-01-27 19:27:51 -04:00
Mitchell Horne
10720ae4db bsdinstall: remove VTOC8 partition scheme option
Now that sparc64 has been removed, there are no kernels built with
support for the VTOC8 partitioning scheme by default. Remove the option
from the installer, as it is unsupported on all installer images
produced by re@.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D27641
2020-12-17 15:00:19 +00:00
Warner Losh
c6d56081c9 Initial support for implementing the bootXXX.efi workaround
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
2020-10-09 00:16:26 +00:00
Kyle Evans
7cc42f6d25 Do a sweep and remove most WARNS=6 settings
Repeating the default WARNS here makes it slightly more difficult to
experiment with default WARNS changes, e.g. if we did something absolutely
bananas and introduced a WARNS=7 and wanted to try lifting the default to
that.

Drop most of them; there is one in the blake2 kernel module, but I suspect
it should be dropped -- the default WARNS in the rest of the build doesn't
currently apply to kernel modules, and I haven't put too much thought into
whether it makes sense to make it so.
2020-10-01 01:10:51 +00:00
Niclas Zeising
ce5ab9661f bsdconfig, bsdinstall: Prune dead mirrors
Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall.
All these return NXDOMAIN when trying to resolve them.

Reviewed by:	emaste
Approved by:	emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D26535
2020-09-26 16:27:09 +00:00
Kyle Evans
9ed054096d Revert r361257: bsdinstall: do a certctl rehash upon installation [...]
As of r365829, any given base distribution set will now include the /etc/ssl
symlinks that this rehash would've otherwise installed. This extra step is
no longer required.

MFC after:	1 week
X-MFC-With:	r365837
2020-09-17 20:35:45 +00:00
Ryan Moeller
60403b98b9 bsdinstall: Update loader.conf for new OpenZFS deps
zfs.ko now includes the SPL but relies on cryptodev instead.

Reported by:	D Scott Phillips
Sponsored by:	iXsystems, Inc.
2020-08-25 21:07:27 +00:00
Marc Fonvieille
e0e236ba88 s/redundacy/redundancy
MFC after:	1 week
2020-08-24 14:04:59 +00:00
Marc Fonvieille
633963a352 Add missing Korean doc package entry, remove non-existent Serbian doc
package entry.

Approved by:	re (gjb)
MFC after:	1 week
2020-08-24 14:00:12 +00:00
Yoshihiro Takahashi
8f11c99715 - Cleanups related to sparc64 removal.
- Remove remains of sparc64 files.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D25831
2020-07-28 10:58:37 +00:00
Allan Jude
c5acd3a091 bsdinstall: only kill the dhclient for the interface we are restarting
PR:		205821
Reported by:	mjg
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
2020-07-11 17:20:17 +00:00
Allan Jude
5b8d2467eb bsdinstall: don't fail if fstab is empty
PR:		210865
Submitted by:	Tim Lukasiewicz <eclipzetech08@gmail.com>, h-fujishima@sakura.ad.jp (original version)
Reported by:	h-fujishima@sakura.ad.jp
Reviewed by:	sef
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
2020-07-11 17:06:48 +00:00
Allan Jude
9a55656956 bsdinstall: kill dhclient before starting a new instance
PR:		205821
Submitted by:	William Orr <will@worrbase.com>
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D14572
2020-07-11 15:32:53 +00:00
Devin Teske
63939df8bc Fix indentation in bsdinstall-created wpa_supplicant.conf
PR:		base/221982
Reported by:	emaste
Reviewed by:	emaste, allanjude
MFC after:	0 days
X-MFC-to:	stable/11
Differential Revision:	https://reviews.freebsd.org/D23641
2020-05-20 21:39:19 +00:00
Kyle Evans
1840a4fa01 bsdinstall: do a certctl rehash upon installation of configuration
If certctl is installed on the system we're configuring, do a certctl
rehash.

Note that certctl may not be present if the world we've installed was built
either WITHOUT_OPENSSL or WITHOUT_CAROOT. In this scenario, we don't
currently see if the host has a certctl as this may be an indication that
the system *shouldn't* have certs installed into /etc/ssl.

Reviewed by:	allanjude, dteske
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D24640
2020-05-19 15:19:39 +00:00
Philip Paeps
762f1f6b68 bsdinstall: remove the Italian mirror
ftp.it.FreeBSD.org has been down for several years.

PR:             244481
Reported by:    xgeoplasma6@gmail.com
MFC after:      3 days
2020-02-28 03:39:00 +00:00
Mateusz Piotrowski
89be2c1ee3 Improve documentation of bootconfig and PARTITIONS
- Mention bootconfig target in TARGETS section.
- Document PARTITIONS variable, which is only mentioned in the examples,
  but doesn't have its own point.

Submitted by:	arrowd@
Reviewed by:	bcr
Approved by:	bcr (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D22927
2020-02-06 20:18:45 +00:00
Ben Woods
595373dd64 bsdinstall: Provide help text for partitioning options
Includes commentary of when ZFS works well by default (>= 8GB RAM),
and where to go for information on ZFS tuning if required.

Also hoist the options text to the top of script as variables
(will help with future international translations).

Reviewed by:	philip, dteske, karels, imp, emaste
Approved by:	rgrimes
Differential Revision:	https://reviews.freebsd.org/D23224
2020-01-27 22:45:49 +00:00
Ben Woods
2d482628aa Fix regression in bsdinstall post r356740 - partedit errno(2) 21 EISDIR
This resulted in the partitioning step failing if either of the
"Auto (UFS)" or "Manual" options were selected.

Reason: partedit was attempting to open a directory (TMPDIR) read/write,
which resulted in errno(2) 21 - EISDIR - Is a directory.

Reported by:	Clay Daniels <clay.daniels.jr@gmail.com>
Reviewed by:	Ryan Moeller <ryan@freqlabs.com>
Approved by:	emaste, bcran
Differential Revision:	https://reviews.freebsd.org/D23232
2020-01-17 22:26:41 +00:00
Ben Woods
d512033e2a bsdinstall: Change "default" (first) Partitioning method to ZFS
Reported by:	Ruben Schade (during his talk at linux.conf.au)
Approved by:	philip
Differential Revision:	https://reviews.freebsd.org/D23173
2020-01-15 07:47:52 +00:00
Rebecca Cran
a107ddbb83 bsdinstall: Use TMPDIR if set
Submitted by:	Ryan Moeller <ryan@freqlabs.com>
Reviewed by:	bcran, Nick Wolff <darkfiberiru@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D22979/
2020-01-15 00:45:05 +00:00
Maxim Konovalov
4a3c7e6718 o Spell "Redundancy" and "Remember" correctly.
PR:		243187
Submitted by:	mikael.urankar@gmail.com (partially)
2020-01-08 14:01:15 +00:00
Mateusz Piotrowski
6e02be63f4 bsdinstall.8: Fix description of DISTRIBUTIONS environment variable
Reviewed by:	bcr
Approved by:	bcr (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22478
2019-11-21 15:54:56 +00:00
Yuri Pankov
a89559c269 bsdinstall: fix ESP detection for auto ZFS layout
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
2019-10-09 05:28:10 +00:00
Glen Barber
e7a71e6d1b Add a comment explaining why the opensolaris_load line in loader.conf
is explicitly added.

Requested by:	rgrimes
MFC after:	3 days
MFC with:	r353004
Sponsored by:	Rubicon Communications, LLC (Netgate)
2019-10-02 16:09:28 +00:00
Glen Barber
8cdae52ef6 Explicitly add opensolaris_load="YES" to loader.conf through the
installer when installing the system on a ZFS root filesystem.

For arm64, zfs_load="YES" does not add opensolaris.ko as a kld
dependency, so add it explicitly to prevent boot-time failures
out-of-box.

PR:		240478
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
2019-10-02 13:30:17 +00:00
Emmanuel Vadot
9160989fc2 bsdinstall: up the interface before calling dhclient
MFC after:	1 week
2019-04-25 16:47:15 +00:00
Justin Hibbits
bc4d122db0 powerpc/boot: Move ubldr to /boot/uboot, and make this a separate filesystem
Summary:
Now that mpc85xx can boot via ubldr, move ubldr to a separate
filesystem, mounted on /boot/uboot, so that a fresh install can boot correctly.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D18709
2019-02-18 01:57:47 +00:00
Rebecca Cran
7e02f8b30a Use the --activate efibootmgr(8) flag when creating entries in bootconfig
Sponsored by:	Netflix
2018-12-31 00:26:35 +00:00
Rebecca Cran
5fa62a9335 Fix ESP generation when using a gmirror, and when booting from RO medium
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
2018-12-31 00:20:58 +00:00
Rebecca Cran
db8b561345 Rework UEFI ESP generation
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
2018-12-20 19:39:37 +00:00
Devin Teske
1b41374f09 Sort i18n messages in bsdinstall zfsboot
No functional change.

Sponsored by:	Smule, Inc.
2018-10-28 22:09:18 +00:00
Devin Teske
2c9d329756 Adjust for 80-columns.
No functional change.

Sponsored by:	Smule, Inc.
2018-10-28 00:58:39 +00:00
Devin Teske
ee21b0efc8 Adjust bsdinstall zfsboot code to 80-columns and whitespace fixes
No functional changes.

Sponsored by:	Smule, Inc.
2018-10-26 05:25:22 +00:00
Devin Teske
f0c98fded6 Fix dialog autosizing in bsdinstall auto error messages
Sponsored by:	Smule, Inc.
2018-10-26 02:08:44 +00:00
Devin Teske
224df38669 Whitespace alignment in bsdinstall hostname
Aligning line-continuation characters to prevent mistakes.
This is also the prevalent style replication throughout.

Sponsored by:	Smule, Inc.
2018-10-26 01:57:32 +00:00
Devin Teske
be99b53818 Sort i18n strings in bsdinstall hostname
Sponsored by:	Smule, Inc.
2018-10-26 01:47:52 +00:00
Devin Teske
6fd587f9f9 Add improved error checking to bsdinstall hostname
Sponsored by:	Smule, Inc.
2018-10-26 01:06:03 +00:00
Devin Teske
05b1c42540 Fix dialog autosizing in bsdinstall hostname
Sponsored by:	Smule, Inc.
2018-10-26 00:08:27 +00:00
Glen Barber
2ba8b5b375 Fix the distribution path for -ALPHA builds, which are under
the snapshots directory, not releases.

Reported by:	David Marec david.marec _at_ davenulle _dot_ org
Approved by:	re (rgrimes)
Sponsored by:	The FreeBSD Foundation
2018-10-08 19:48:58 +00:00
Mateusz Piotrowski
ace6712810 bsdinstall(8): Fix a typo.
Reported by:	Jose Luis Duran
Reviewed by:	bcr
Approved by:	re (gjb), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17409
2018-10-05 08:17:29 +00:00