Commit Graph

482 Commits

Author SHA1 Message Date
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
Mateusz Piotrowski
5475ce6290 bsdinstall(8): Document ZFS installation scripting.
- Extend the bsdinstall(8) man page with ZFS installation scripting
  details. [1]
- Extend the bsdinstall(8) man page with the description of all the ZFS
  variables involved in a scripted installation of ZFS-based systems. [1]
- Extend the SCRIPTING section with an example for a ZFS-based scripted
  installation. [1]
- Create a new section explaining how ZFS datasets must be written into
  a variable to get them set on the final system. [1]

While here:
- Add Roberto to the copyrights for recognition as changes to the manual
  page are huge.
- Use "Dq" for default values.
- Use sysrc(8) instead of echo in examples.

Submitted by:	Roberto Fernandez Cueto <roberfern@gmail.com> [1]
Reviewed by:	dteske
Approved by:	re (gjb), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D14169
2018-10-04 09:28:40 +00:00
Dag-Erling Smørgrav
c3afb29bb6 Add an installer option to disable destructive dtrace.
Submitted by:		Jörg Pernfuß <code.jpe@gmail.com>
Approved by:		re (kib)
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D12474
2018-09-21 09:27:32 +00:00
Mark Johnston
33a5ef3587 Fix variable name typo in the bsdinstall ttys hardening code.
Submitted by:	Jörg Pernfuß <code.jpe@gmail.com>
Reviewed by:	allanjude, dab, emaste
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D12476
2018-09-20 16:37:50 +00:00
Allan Jude
aa2a0e0fc3 bsdinstall/zfsboot: Enable new UEFI+GELI support
After r336252 it is no longer necessary to have a separate bootpool when
booting from an encrypted disk with UEFI.

This change also switches the EFI System Partition contents from
the 800 KB boot1.efifat to a new 200 MB filesystem created with newfs_msdos
and uses loader.efi directly, instead of boot1.efi.

PR:		228916
Reviewed by:	dteske
MFC after:	1 month
Relnotes:	yes
Sponsored by:	Klara Systems
Differential Revision:	https://reviews.freebsd.org/D12315
2018-08-23 22:50:11 +00:00
Kevin Lo
40bb18ef11 Remove unused MAPDESCFILE. 2018-08-11 14:45:33 +00:00
Justin Hibbits
60f18ad0b4 Add partition scheme for mpc85xx devices
Some mpc85xx devices with u-boot need MBR partitioning with a FAT boot
partition.  Since the infrastructure is already in place to have a dedicated
boot partition, this adds the necessary bits to use that infrastructure with
mpc85xx boards.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15664
2018-06-07 00:24:10 +00:00
Justin Hibbits
fdb600af60 Set kernelname in bootconfig to the kernel file
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
2018-06-04 14:42:13 +00:00
Nathan Whitehorn
fb4f0dcae9 Use sysrc(8) in the documentation rather than echoing things to rc.conf
in order to encourage good habits.

PR:		228325
Submitted by:	Mateusz Piotrowski
MFC after:	2 weeks
2018-05-18 17:46:40 +00:00
Nathan Whitehorn
8c7de243f4 Fix math error in the computation of the free space after the last partition
on a disk. This resulted in one sector always remaining free at the end.

PR:		bin/228322
Submitted by:	Rikiya Yonemoto
MFC after:	2 weeks
2018-05-18 17:43:15 +00:00
Allan Jude
229c92e7a8 Add the ThinkPad X1 (sandybridge) to the bsdinstall blacklist
MFC after:	2 weeks
Sponsored by:	FOSDEM IllumOS Table
2018-02-04 12:16:36 +00:00
Ed Maste
4a8b3e41f5 bsdinstall: enable SUJ by default (revert r327890)
fsck should be fixed as of r328092.

PR:		225110
Tested by:	dumbbell, Arshan Khanifar <arshankhanifar gmail.com>
2018-01-25 19:57:21 +00:00
Ed Maste
643139e5b1 bsdinstall: disable SUJ by default
SUJ + cg checksums produce spurious warnings after an unclean shutdown
(e.g. a crash).  For now disable SUJ for UFS installs so installing from
a FreeBSD 12 snapshot results in a usable filesystem, until this can be
fixed.

PR:		225110
Submitted by:	Arshan Khanifar <arshankhanifar gmail.com>
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D13890
2018-01-12 20:25:57 +00:00
Nathan Whitehorn
8befcf7be1 Add installer support for PS3 and PowerNV systems, also laying the
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
2018-01-02 05:27:24 +00:00
Nathan Whitehorn
a5837f2c26 Skip errors from being unable to set modification and creation times. If
one of the directories in the filesystem hierarchy is a FAT mountpoint,
settings its times will fail, which would cause installation to abort.
Instead, make this a best-effort thing.

Handling this error is a hack and a better internal scheme for handling
this should be added to libarchive.
2018-01-02 05:22:54 +00:00