Commit Graph

310 Commits

Author SHA1 Message Date
Devin Teske
e9c843adc7 Change "[ ! ... ] && ..." to "[ ... ] || ..." 2016-12-12 18:29:24 +00:00
Devin Teske
e20253348d Collapse tiny if statements 2016-12-12 18:28:20 +00:00
Devin Teske
114a587e3b Replace funny block with something easy to digest 2016-12-12 18:24:41 +00:00
Devin Teske
bede070805 Consolidate locals 2016-12-12 18:21:56 +00:00
Devin Teske
5b57fabb45 Remove unnecessary local initializers 2016-12-12 18:20:56 +00:00
Devin Teske
38a9942347 Change "[ ! -z ... ]" => "[ ... ]" and "[ -z ... ]" => "[ ! ... ]" 2016-12-12 18:17:30 +00:00
Devin Teske
138ab67af4 Use $( ... ) instead of ... 2016-12-12 18:10:33 +00:00
Devin Teske
97a4c9f0dc Comments 2016-12-12 18:05:54 +00:00
Devin Teske
f18789d787 Functions in their own section 2016-12-08 19:28:12 +00:00
Devin Teske
3d2b0857bf Remove unnecessary trailing backslashes 2016-12-08 19:26:22 +00:00
Devin Teske
3220bdd85c Add support for "hidden" Wi-Fi networks
PR:		bin/214933
Submitted by:	Maxim Filimonov <che@bein.link>
Reviewed by:	dteske, allanjude, adrian
MFC after:	6 days
X-MFC-with:	Follow-up commit for style
2016-12-08 16:41:18 +00:00
Steven Kreuzer
1d01cb0d72 Write kern.randompid to /etc/sysctl.conf
PR:		211471
Reported by:	survo@protonmail.com
Reviewed by:	robak@
Approved by:	allanjude@
MFC after:	3 days
Differential Revision:	 https://reviews.freebsd.org/D7440
2016-08-09 15:57:37 +00:00
Dimitry Andric
7212134272 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.

Reviewed by:	allanjude
PR:		211506
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D7387
2016-08-01 19:49:42 +00:00
Allan Jude
1b63cafb63 A failed installation once restarted will often error out
If an encrypted install is attempted and fails for any reason, the disk
cannot be erased by the installer because the partition is in use by GELI

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
Reported by:	jonathan
MFC after:	10 days
2016-07-16 19:35:04 +00:00
Allan Jude
4487af02ff Fix encrypted MBR install
The pools are exported and reimported in order to write the bootcode
This causes an error when the bootpool is later mounted by common code
The bootpool is now imported with the -N flag to prevent mounting

Reported by:	Michael Dexter
MFC after:	5 days
2016-07-16 18:28:44 +00:00
Bartek Rutkowski
0e3f233f51 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:	adrian, allanjude
MFC after:	7 days
2016-07-15 15:07:24 +00:00
Allan Jude
d4e5caaf7d Make the new 'set date and time' dialog default to skip
X-MFC-With:	302790
Requested by:	nwhitehorn
2016-07-14 00:41:19 +00:00
Allan Jude
09c4000afe bsdinstall: Prompt user to set the date and time after selecting timezone
Not having the correct date and time makes many PKI based things not work

In 10 and 11, it can mean that Unbound, ntpd, and sshd won't start

Submitted by:	des (original patch)
MFC after:	7 days
2016-07-13 23:49:45 +00:00
Allan Jude
e302644618 Add more machines to the bsdinstall workaround blacklist
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. <sfourman@gmail.com> (ThinkPad W520)
Submitted by:	Matthias Apitz <guru@unixarea.de> (Latitude E6330)
Approved by:	re (gjb)
Sponsored by:	ScaleEngine Inc.
2016-07-03 01:23:38 +00:00
Allan Jude
ca13d5d23a Fix an error in bsdinstall when ZFS installation uses a bootpool
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.
2016-07-03 01:22:59 +00:00
Allan Jude
52fffe9307 Fix bsdinstall for root-on-zfs with MBR partitioning
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
2016-06-10 14:31:59 +00:00
Andriy Voskoboinyk
4913f849ab bsdinstall: add country/regulatory domain configuration dialog.
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
2016-06-08 20:42:35 +00:00
Andriy Voskoboinyk
fb82771908 bsdinstall: unbreak static address assignment for wired networks.
This fixes regression introduced in r298946 (fixes static address
assignment for wireless networks).

Reported & submitted by:	allanjude
2016-05-26 11:58:36 +00:00
Allan Jude
24d17f1e24 Only set kern.geom.part.mbr.enforce_chs=0 once, instead of once per disk
Sponsored by:	ScaleEngine Inc.
2016-05-24 00:23:39 +00:00
Allan Jude
bb4fd0a0d1 Add support for RAID 1+0 (striped mirrors) to bsdinstall/zfsboot
Sponsored by:	ScaleEngine Inc.
2016-05-24 00:22:29 +00:00
Allan Jude
b06bc65e71 Only export and re-import the root pool if installing on MBR
This step is required in order to dd the boot2 bits into the ZFS partition

Sponsored by:	ScaleEngine Inc.
2016-05-23 17:04:13 +00:00
Allan Jude
7289f18f78 Fix missing pool name in zfs set command 2016-05-23 16:49:26 +00:00
Allan Jude
dcf362194d Fix error in bsdinstall where additional filesystems cannot be mounted
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.
2016-05-23 15:11:01 +00:00
Allan Jude
a1b8f55c77 bsdinstall/zfsboot GPT+BIOS+GELI installs now make use of GELIBOOT
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
2016-05-22 20:31:52 +00:00
Allan Jude
595568b58b Fix default ZFS layout to work better by default with sysutils/beadm
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.
2016-05-22 16:24:21 +00:00
Baptiste Daroussin
5e38260c4f Fix typo in comments for the zfsboot script
Submitted by:	Colby Swandale <colby@taplaboratories.com.au> (via github)
2016-05-22 12:59:07 +00:00
Allan Jude
06445fc0fa bsdinstall/zfsboot: Do not mirror swap when swapsize is 0
PR:		209415
Submitted by:	Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after:	2 weeks
2016-05-10 14:38:43 +00:00
Andriy Voskoboinyk
6d8e01b078 bsdinstall: fix static address assignment for protected wireless networks.
Filter out IFCONFIG_PREFIX variable (which may contain WPA keyword)
from ifconfig parameters.

PR:		169199
2016-05-02 21:40:34 +00:00
Pedro F. Giffuni
ec65e4f8d0 usr.sbin/bsdconfig: minor spelling fixes on comments.
No functional change.
2016-05-01 16:38:12 +00:00
Allan Jude
4d41f47272 Add a new installation type to bsdinstall/zfsboot: BIOS+UEFI
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)
2016-04-19 03:25:36 +00:00
Allan Jude
b3f7b13945 bsdinstall/zfsboot should create /tmp and /var/tmp if they do not exist
PR:		208629
PR:		208568
Submitted by:	Galael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after:	2 weeks
2016-04-08 15:08:22 +00:00
Allan Jude
6b5e33ba48 Do not add swap to fstab when swapsize is 0
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.
2016-04-08 15:05:06 +00:00
Allan Jude
6203e46b84 Remove 50% ZFS conditional from bsdinstall/zfsboot
Remove the requirement that the resulting partition table be atleast 50% ZFS

PR:		208094
Requested by:	brooks
Sponsored by:	ScaleEngine Inc.
2016-03-17 17:53:38 +00:00
Allan Jude
0edc8cc831 The zfsboot automated part of bsdinstall now supports UEFI
MFC after:	3 days
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D4960
2016-01-30 15:53:28 +00:00
Allan Jude
a94af9543d Never 4k align the MBR bootpool because zfsldr can not deal with a gap
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.
2016-01-16 19:25:16 +00:00
Eric van Gyzen
50d901977a bsdinstall: Suggest the GPT+Active workaround on Dell T5810
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
2016-01-14 00:31:00 +00:00
Glen Barber
8834318685 Merge ^/projects/release-install-debug:
- 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
2016-01-05 21:05:17 +00:00
Devin Teske
ed27536fd5 Explicitly set permissions on entropy files
Differential Revision:	https://reviews.freebsd.org/D3933
Submitted by:	jmg
Reviewed by:	delphij, markm
Approved by:	secteam (delphij)
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-12-28 17:27:20 +00:00
Nathan Whitehorn
159ca5c844 Adapt to new wireless scheme where base wlan interfaces do not show up in
ifconfig anymore.
2015-12-06 00:20:45 +00:00
Bryan Drewery
7fdd45b091 Use LIBEXECDIR for /usr/libexec.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:14:40 +00:00
Allan Jude
4c95e76ac4 Add a number of models to the bsdinstall GPT hack blacklist
PR:		194359
Approved by:	bapt (mentor)
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3525
2015-09-16 03:32:27 +00:00
Devin Teske
65f3614085 Replace `return' outside of function with exit
MFC after:	3 days
X-MFC-to:	stable/10
Pointy hat to:	me
2015-09-11 21:18:21 +00:00
Devin Teske
0a8354938c Use a variable for readability
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:14:48 +00:00
Devin Teske
e5a24129fa Update copyright
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:13:34 +00:00
Devin Teske
96eeaba5b1 Better to reset trap and explicitly exit success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:12:41 +00:00
Devin Teske
521414ebc7 Remove trailing newline at EOF
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:09:39 +00:00
Devin Teske
5e1ed71e4f Produce meaningful exit code
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:08:46 +00:00
Devin Teske
1a8cf17d01 Explicitly exit with success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:01:26 +00:00
Devin Teske
0705286bfb Explicitly exit with success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:59:13 +00:00
Devin Teske
fef95330a8 Update copyrights
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:58:00 +00:00
Devin Teske
cc478f6fd3 Produce meaningful exit code
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:56:36 +00:00
Devin Teske
527a9f3a85 Remove use of return outside of function
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:45:41 +00:00
Devin Teske
ff7b134cfa Ignore error results from newaliases(1)
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:39:41 +00:00
Glen Barber
1da17fb7be Ensure the local MANIFEST is always used when verifying remote
distribution sets.

MFC after:	immediately
Sponsored by:	The FreeBSD Foundation
2015-08-04 13:40:26 +00:00
Allan Jude
a7d5d8d9d0 Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround
PR:		194359
Requested by:	sbruno, hiren
Approved by:	marcel
MFC after:	3 days
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3139
2015-07-21 00:33:15 +00:00
Allan Jude
7059fa6ff8 Add support for two workarounds for known issues booting GPT in legacy mode 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
2015-07-18 18:49:44 +00:00
Allan Jude
69e4b249f8 Make bsdinstall's zfsboot script align partitions to 4k/1m when the user 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
2015-07-14 19:57:10 +00:00
Allan Jude
7e3ebc5b0a Set a mountpoint on the root of the pool so user-created datasets have a 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
2015-07-14 19:42:40 +00:00
Allan Jude
1bc080435c Have bsdinstall's zfsboot script make /var/audit its own dataset, so it is 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
2015-07-14 19:38:26 +00:00
Allan Jude
4ffa3da5f8 Fix a typo in bsdinstall
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
2015-07-13 17:40:24 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Allan Jude
dce663816a Fix a syntax error in bsdinstall/zfsboot
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.
2015-05-22 15:57:42 +00:00
Allan Jude
caa3817d4f bsdinstall/zfsboot: Skip adding swap lines to /etc/fstab if swap is 0 sized
Differential Revision:	https://reviews.freebsd.org/D2571
Reviewed by:	dim
Approved by:	eadler (mentor)
Sponsored by:	ScaleEngine Inc.
2015-05-17 00:55:44 +00:00
Allan Jude
169ff110e8 Add a sanity check to the swap size in zfsboot of bsdinstall
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.
2015-05-05 03:08:49 +00:00
Devin Teske
43d4f8c4c6 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:	imp, kmoore
Discussed on:	-current
MFC after:	3 days
X-MFC-to:	stable/10
Relnotes:	yes
2015-04-16 20:53:15 +00:00
Devin Teske
1ebd9bd41c Unbreak ZFS+GELI install option.
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
2015-04-06 19:26:45 +00:00
Devin Teske
4ef4026223 Fix permissions on ZFS root encryption key (644 -> 600).
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
Security:	CVE-2015-1415
Reported by:	Pierre Kim
2015-04-06 18:03:35 +00:00
Devin Teske
8a416b59fb Whoops! "arc commit --revision" != "arc diff --update" 2015-04-01 02:05:26 +00:00
Devin Teske
ba22fa80f2 Add "GELI Passphrase:" prompt to boot loader.
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
2015-04-01 02:01:34 +00:00
Devin Teske
febd9e9c94 Update copyright(s)
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-21 03:54:11 +00:00
Devin Teske
33112d9e9f Whitespace cleanup(s).
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-21 03:52:43 +00:00
Allan Jude
efd6e672e4 Remove a non-required unsafe condition added in the previous commit
Reviewed by:	bapt
Approved by:	dteske
Sponsored by:	ScaleEngine Inc.
2015-03-18 23:47:30 +00:00
Allan Jude
d421870917 Fix the handbook install option in bsdinstall
bsdconfig's f_package_add doesn't seem to support using the pkg repo from /etc/pkg/FreeBSD.conf, it also tries to run the commands on the installer image, not in the destination chroot

Instead, manually bootstrap pkg in the chroot, and then install the requested packages (in the chroot)

Doesn't use pkg -c, because pkg is not installed on the installer image

PR:		196250
Differential Revision:	https://reviews.freebsd.org/D2026
Approved by:	bapt
Sponsored by:	ScaleEngine Inc.
2015-03-18 23:24:38 +00:00
Steven Hartland
e751d176f3 Fix bsdinstall when working with geli boot disks
PR:		196790
Differential Revision:	https://reviews.freebsd.org/D566
Submitted by:	Michael Gmelin <grembo@FreeBSD.org>
MFC after:	2 weeks
Sponsored by:	Multiplay
2015-01-18 18:25:12 +00:00
Steven Hartland
b4843bd68b Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12
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
2014-12-21 17:21:29 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Allan Jude
1aec0f4f91 Change the /var dataset in the default ZFS layout to have the
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.
2014-09-28 21:44:23 +00:00
Dag-Erling Smørgrav
58eb9abb31 Add a line to the post-installation configuration dialog to enable the
local_unbound service.

MFC after:	3 days
2014-09-26 11:38:10 +00:00
Nathan Whitehorn
d73bf00760 ZFS support isn't actually experimental anymore, so no need to scare
people.
2014-09-14 02:31:53 +00:00
Allan Jude
1230701891 Make the root-on-zfs part of the installer warn a user who booted the 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
2014-09-14 01:57:22 +00:00
Nathan Whitehorn
7c1db22805 Rename the choices in the partitioning methods dialog to reflect current
reality. In particular, draw a connection between the auto ZFS script and
the auto UFS one, since they fulfill similar functions. I'm not sure the
auto ZFS code is actually experimental anymore, so it might be worth
changing that label still.
2014-09-13 22:14:19 +00:00
Nathan Whitehorn
44a25dd6c6 Make the default choice for the chroot shell at the end be "No". This allows
just pressing enter repeatedly to successfully install a reasonable system.
2014-09-13 22:03:51 +00:00
Nathan Whitehorn
6e15678a47 Add ZFS support to the bsdinstall partition editor and sade.
Submitted by:	Kurt Lidl (original version)
MFC after:	6 weeks
2014-09-13 18:24:54 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Andrew Thompson
7041a67eee Give a brief message as to what error was encountered to help the user along.
Reviewed by:	nwhitehorn
MFC after:	2 weeks
2014-08-07 01:51:01 +00:00
Dag-Erling Smørgrav
a382af08f8 Strip the patch level from the release name before trying to fetch the
distribution.

PR:		170264
Approved by:	nathanw
MFC after:	1 week
2014-07-24 17:43:42 +00:00
Devin Teske
47206692f2 Fix syntax error thrown at the point of creating the root pool, caused by
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
2014-05-22 19:36:29 +00:00
Ollivier Robert
695a612f67 Fix the "disks" variable reuse.
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.
2014-05-15 02:37:59 +00:00
Ollivier Robert
ed8690e36b Updates to the datasets created by zfsboot.
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.
2014-05-15 02:31:02 +00:00
Ollivier Robert
2875e59f52 Here is a patch for the bsdinstall root-on-zfs stuff that adds optional
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
2014-05-15 02:27:10 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Devin Teske
a88393ce0b Update zfsboot to coincide with r264840 to bsdconfig(8) adding
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
2014-04-23 22:06:43 +00:00
Devin Teske
751952ae37 When merging docsinstall and zfsboot updates to stable/9 it was discovered
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
2014-04-15 06:56:59 +00:00
Devin Teske
4c5d7fab2a Fix typo in debug/log statement.
Submitted by:	Rick Miller <vmiller@hostileadmin.com>
2014-04-14 05:35:01 +00:00
Warner Losh
3bdf775801 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
Bryan Drewery
7e30426f3b Revert r263638 (create /root dataset) for now as it breaks install and needs
more work in cases such as single-user mode.
2014-03-26 13:41:30 +00:00
Bryan Drewery
b116e44cb0 Create a root dataset so that /root is outside of the boot environment.
Discussed with:	dteske on sysinstall@
MFC after:	1 month
2014-03-22 15:59:26 +00:00
Devin Teske
c7684efd3a Add zfsboot to the scripted interface of bsdinstall(8); oops!
NB: If the zfsboot variables ($ZFSBOOT_*) are set, a script is
assumed to want zfsboot module instead of scriptedpart module.

Submitted by:	Loïc Brarda <loic.brarda@cern.ch>
Reviewed by:	nwhitehorn@
MFC after:	3 days
2014-02-16 06:56:44 +00:00
Devin Teske
13fba447b4 Dummy commit (whitespace changes and style nits) to show previous commit
(SVN r260866) was [in-part] Submitted-by: Christoph Mallon ...
<christoph.mallon@gmx.de>

MFC After:	3 days
X-MFC-With:	r260866
2014-01-20 03:39:08 +00:00
Devin Teske
e06674ffd2 Fix a bad comparison operator (s/==/=/), and address a use-case issue where-
in the one-line comment associated with the dumpdev setting was not present
for the case where the user deselects the dumpdev service (restoring pre-
r256348 behaviour.

MFC After:	3 days
2014-01-18 22:33:49 +00:00
Gavin Atkinson
093b9154fd Allow bsdinstall to use WPA-Enterprise networks when installing. This
only allows basic username/password config, and does not provide the
ability to set any of the other WPA options.  Regardless, this is
generally sufficient to associate.

Perhaps in the future this could allow full configuring (e.g. being able
to set "anonymous identity", and perhaps some of the more obscure WPA
options), though perhaps that will better belong in bsdconfig when that
grows wlan config ability.

MFC after:	1 week
2014-01-04 17:09:41 +00:00
Gavin Atkinson
ebffa06008 Lower the priority of the "connect to any open wireless network" network
description, so guaranteeing that any other defined network will be tried
first.

MFC after:	1 week
2014-01-04 16:44:05 +00:00
Gavin Atkinson
f051e63a59 Remove what appears to be a stray debugging printf.
MFC after:	1 week
2014-01-04 16:41:43 +00:00
Devin Teske
a36511c287 Move the installer's keymap solution introduced by SVN r259468. The new
location of /etc/rc.local on the install media is more appropriate as it
knows serial vs. non-serial and can also do the change earlier (so that
even the initial Install dialog can benefit from the change).

MFC after:	3 days
2013-12-21 16:43:40 +00:00
Devin Teske
6311cc9efe When using a bootpool, set the cachefile property so that it gets
imported automatically upon reboot to the newly installed system.

MFC after: 1 day
2013-12-19 06:43:52 +00:00
Devin Teske
4b4b90d5a8 Fix a regression that occurred with SVN revisions 259474 and 259476 where
installation to 3-4+ (depending on vdev type) vdevs would result in odd
error messages where the zpool `create' command appeared to repeat itself
(an artifact of printf when you supply too many arguments -- caused by
neglecting to properly quote the multi-word expansion of $*vdevs when
creating the pool(s)). Example error below (taken from bsdinstall_log):

DEBUG: zfs_create_boot: Creating root pool...
DEBUG: zfs_create_boot: zpool create -o altroot=/mnt -m none -f "zroot" \
ada0p3.nop ada1p3.nopzpool create ada2p3.nop "ada3p3.nop"
DEBUG: zfs_create_boot: retval=1 <output below>
cannot open 'ada1p3.nopzpool': no such GEOM provider
2013-12-19 06:41:30 +00:00
Devin Teske
2d5cf580aa In bsdinstall_log, it's rather confusing to see the following sequence:
DEBUG: Running installation step: hostname
  rm: /tmp/bsdinstall_etc/fstab: No such file or directory

The two lines are unrelated, and the rm is spurious. Let's add `-f' to
that rm(1) so it doesn't confuse us when debugging an install.

MFC after:	3 days
2013-12-18 21:16:57 +00:00
Devin Teske
31a0cf130a Fix "[: -eq: argument expected" error introduced by SVN r256343. The code
should not have used DIALOG_CANCEL because dialog.subr wasn't included to
define it. The effect of the error was that you could not cancel the
partition dialog. Discovered by checking bsdinstall_log for something else.

MFC after:	3 days
2013-12-18 21:13:50 +00:00
Devin Teske
926ec73fe2 Auto-enable 4k sector alignment when disk encryption is requested (it is
required in such a case). But don't prevent the user from pointing the
gun at his/her foot -- you can disable 4k alignment after enabling geli).

MFC after:	3 days
2013-12-16 19:54:55 +00:00
Devin Teske
cf9c3e5697 Fix a long-standing edge-case that would result in a ghosted `zroot' pool
and subsequent headaches caused by multiple pools with the same name.
Specifically, blast away any labels on the designated swap partition.
Problem was when you install to a given layout *with* swap and then turn
around and re-install the same layout *without* swap (we weren't doing a
labelclear for the swap device, so would end up with an "UNAVAIL" status
zroot pool that may only exist in the pool cache).

MFC after:	3 days
2013-12-16 19:51:11 +00:00
Devin Teske
ee482f2c28 Add kern.geom.label.disk_ident.enable="0" to loader.conf(5).
Discussed on:	-current, -stable
MFC after:	3 days
2013-12-16 19:47:04 +00:00
Devin Teske
7a434c5cc7 De-uglify the geli(8)-setup infobox by adding a newline.
MFC after:	3 days
2013-12-16 19:44:45 +00:00
Devin Teske
ca2d97c2c8 fletcher4 is currently the default.
Discussed on:	-current
MFC after:	3 days
2013-12-16 19:43:04 +00:00
Devin Teske
7cae6aab5b Improve default ZFS disk layout (tested):
+ For GPT, always provision zfs# partition after swap [for resizability]
+ For MBR, always use a boot pool to relialy place root vdevs at EOD
NB: Fixes edge-cases where MBR combination failed boot (e.g. swap-less)
+ Generalize boot pool logic so it can be used for any scheme (namely MBR)
+ Update existing comments and some whitespace fixes
+ Change some variable names to make reading/debugging the code easier
  in zfs_create_boot() (namely prepend zroot_ or bootpool_ to property)
+ Because zroot vdevs are at EOD, no longer need to calculate partsize
  (vdev consumes remaining space after allocating swap)
+ Optimize processing of disks -- no reason to loop over the disks 3-4
  separate times when we can logically use a single loop to do everything

Discussed on:	-stable
MFC after:	3 days
2013-12-16 19:37:15 +00:00
Devin Teske
a622223f01 Bug-fixes and debugging improvments:
+ De-obfuscate debugging to show actual values
+ Change graid(8) syntax; s/destroy/delete/ [destroy is not invalid syntax]
+ Log commands that were previously quiet
+ Added some new comemnts and updated some existing ones
+ Add missing local for `disk' used in zfs_create_boot()
+ Use $disks instead of multiply-expanding $* in zfs_create_boot()
+ Pedantically unset variable holding geli(8) passphrase after use
+ Pedantically add double-quotes around zpool names and zfs datasets
+ Fix quotation expansion for zpool_cache entries of loader.conf(5)
+ Some limited whitespace changes

MFC after:	3 days
2013-12-16 18:53:09 +00:00
Devin Teske
30c8ebe9b7 Accept NULL input as also meaning zero swap.
MFC after:	3 days
2013-12-16 17:11:09 +00:00
Devin Teske
a6c8532c17 As per discussions on -current, re-add /var/mail (removed in r257842) but
this time with atime=on in support of various software that requires it.

Discussed on:	-current
MFC after:	3 days
2013-12-16 17:03:44 +00:00
Devin Teske
a7fb3c62e7 Mask error from newaliases(1) when the hostname is not fully qualified.
MFC after:	3 days
2013-12-16 15:52:44 +00:00
Devin Teske
d25257776a Add a fix for Long-standing problem with VMware. Described in below links:
https://communities.vmware.com/thread/107230
https://communities.vmware.com/docs/DOC-11677

Basically, ignore the ``function 62'' and ``function 63'' interpretations
of the left/right command key when we're in the lengthiest portion of the
installation (initiated by the `auto' module).

The net effect is that you can now (once you've started the installer from
the media) escape the VM without prematurely terminating the current action
due to spurious escape sequence.

MFC after:	3 days
2013-12-16 15:50:59 +00:00
Devin Teske
9ea4ca8595 I caught the following snippet at the end of my /var/log/bsdinstall_log:
===
DEBUG: Running installation step: services
local: Not in a function
/usr/libexec/bsdinstall/services: cannot create  : Read-only file system
/usr/libexec/bsdinstall/services: /tmp/bsdinstall/etc/rc.conf.services: \
 Permission denied
===
The `local: Not in a function' is obvious, and was introduced by myself in
SVN revision 256348.

The latter two are caused by the attempt to use "\" to continue the line
after using the ">>" redirect. This appears to attempt to write a file with
the name " " in the current directory and subsequently attempts to execute
the file that was originally intended for writing (which is not executable;
hence the `Permission denied'). That was introduced in SVN r228192 about
2 years ago, apparently unnoticed until I started going over the debug
outputs very carefully.

MFC after:	3 days
2013-12-12 20:47:18 +00:00
Devin Teske
b75256cfd2 Fix a regression introduced by SVN r257842; resulting in mountroot prompt
after attempting to install to encrypted ZFS root (caused by a typo in a
variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME).

MFC after:	3 days
2013-12-09 23:58:26 +00:00
Devin Teske
886be5725f Fix a regression introduced by SVN r257842. Result was that after
successfully installing to encrypted ZFS root, the passphrase is
not accepted and a message about "incorrect key" is displayed.

MFC after:	3 days
2013-12-09 22:58:26 +00:00
Eitan Adler
5e78a56e51 sed(1): Use /i instead of /I
the i modifier was added in r259132 since POSIX recently agreed to add
	it. Switch uses of /I to /i.
2013-12-09 22:56:19 +00:00
Devin Teske
45df402e9a Fix a regression introduced by SVN r257842 that prevents Encryption from
being enabled.

MFC after:	3 days
2013-12-04 16:06:23 +00:00
Devin Teske
2925848d7c Switch default MBR bootcode from /boot/boot0 to /boot/mbr.
Reviewed by:	Allan Jude, nwhitehorn
Discussed on:	-current
2013-11-11 21:42:56 +00:00
Devin Teske
d4d729e462 Check the partition scheme before blowing away disks, instead of after.
The effects of this patch would only be noticeable if you were purposefully
setting a bad value and trying to see what happens; and leaving the disks
intact if a bad value has been set seems fair.
2013-11-11 02:13:47 +00:00
Devin Teske
cd28e9c5e0 I often forget that debugFile can begin with a + for deciding that debug
should be sent to both the file (minus the leading +) and stdout.
2013-11-08 10:19:48 +00:00
Devin Teske
66fd321403 Copy the install log to the deployed /var/log directory so that we have
post-mortem data on how the machine was configured/installed.
2013-11-08 10:14:32 +00:00
Devin Teske
9e513d3179 Semi-revert this one file out of r257842. The ttys(5) stuff, as we
discussed on -current, was not supposed to go in but get solved in
a different way -- e.g., init(8) logic).

Discussed on:   -current
2013-11-08 10:09:34 +00:00
Devin Teske
bc4a673f89 A series of changes tested together as a whole:
+ Add a `-D FILE" command-line option for overriding the path to the
  bsdinstall log file (BSDINSTALL_LOG env var).
+ Document new `-D FILE' in the man page for bsdinstall.
+ If FILE in `-D FILE' begins with a +, debug output goes to stdout
  (interleaved between dialog(1) invocations/output) as well as to FILE
  (minus the leading + of course).
+ If BSDINSTALL_LOG cannot be written, then debugging is disabled (except in
  the case of a leading + in the pathname, wherein debug will still be
  printed to stdout).
+ Update source code formatting style.
+ Fix a dangling participle ("Begun ..." -> "Began ...")
+ Rewrite the docsinstall script (was necessary to abate direct dependency
  on BSDINSTALL_LOG (instead, use fault-tolerant bsdconfig framework which
  displays appropriate errors for package management).
NB: docsinstall is still using pkg(8) after this change.
+ Add additional debug output for dhclient/rtsol/wpa_cliscan
+ Display script errors in a textbox rather than just on stdout
+ Update many coments.
+ Add new f_show_err() API call (like f_show_msg but changes the dialog
  title to "Error")(see bsdconfig's `common.subr').
+ Add new f_eval_catch() API call for executing a command via eval but not
  before logging the command to debug. Several example cases documented in
  API header for function in bsdconfig's `common.subr'.
+ Fix dialog auto-sizing when launched as an rvalue to a pipe for indirected
  scripts (previously would default to 24x80 sizing in this case, now it can
  autosize to full size even when in a pipe chain).
+ Fix bug in f_snprintf if $format argument began with "-"; printf would
  misinterpret as a flag. (this is in bsdcofig's `strings.subr').
+ Add accompanying f_sprintf() and f_vsprintf() to go along with already
  existing f_snprintf() and f_vsnprintf() (see bsdconfig's `strings.subr').
+ Remove some unnecessary default ZFS datasets from the automatic "zfsboot"
  script. Such as: /usr/ports/distfiles /usr/ports/packages /usr/obj /var/db
  /var/empty /var/mail and /var/run (these can all be created as-needed once
  the system is installed).
+ Remove setuid=off for /usr/home (as discussed from last round of CFT).
+ Fix some i18n string violations in "zfsboot".
+ Bolster debugging output in "zfsboot".
+ Fix some string quoting issues in "zfsboot".
+ Fix some variable scope issues in "zfsboot".
+ Change "Create" to "Install" in "zfsboot" main menu.
+ Increase error checking in "zfsboot" (type-check arguments and such).
+ Add call to "graid destroy" killing automatic metadata (part of the series
  of pedantic destructions we do when bootstrapping a new/naked disk).
+ Make judicious use of new f_eval_catch() in "zfsboot".
+ Fixup some variable names for consistency (zfsboot).
+ Fix an underride syntax parameter expansion folly (zfsboot).
+ Confirm layout if not explicitly chosen when blindly proceeding (no
  longer have to touch anything on the ZFS menu if it scares you, just
  choose the omnibus "Install" option at the top and you'll be prompted to
  select vdev type and disks in the layout confirmation dialog).
+ Change numbered menu items to alphabetic for more efficient navigation.
+ Consolidate vdev selection and disk selection into a single stateful
  menu which performs validation and allows backing out to each previous
  menu as you go deeper.
+ Redesign the ``Last Chance'' dialog (still using the same colors, but
  make it conform to a tolerable width and make disks appear in a block-
  quote style indented region).
+ Fix a bug wherein we used the a lowercase variable name by accident
  (actual variable name declared as all-uppercase) at the time of
  initializing fstab(5) (not believed to cause any issues though).
+ Update the geli setup infobox for each provider being initialized
  (not just at the onset -- since each ``geli init'' causes kernel messages
  to push our infobox off-screen).

Reviewed by:	Allan Jude <freebsd@allanjude.com>
Discussed on:	-current
MFC after:	3 days
2013-11-08 09:57:03 +00:00
Glen Barber
4ae21ddc1d Switch to using pkg(8) for the doc install in bsdinstall(8).
This also bootstraps the system with pkg(8) for future use.

PR:		183488
Submitted by:	Joe Ennis
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2013-11-06 15:49:31 +00:00
Devin Teske
67635c19d6 Make ZFSBOOT_BEROOT_NAME be ROOT by default. This is what sysutils/beadm
and OpenSolaris/Illumos beadm use.

Remove /usr/local and /var/db/pkg datasets.  Andriy Gapon writes:
I want to note that a good implementation of BEs should support a dependent
datasets feature.  Unfortunately, it seems that we do not have any good BE
implementation for FreeBSD right now.  If we had, personally I'd prefer to
have /usr/local in separate filesystem.

NOTE: Until then, remove these datasets.

Discussed on:	src-committers
Submitted by:	Bryan Drewery <bryan@shatow.net>
Reviewed by:	Allan Jude <freebsd@allanjude.com>
MFC after:	3 days
2013-10-15 18:06:33 +00:00
Devin Teske
abd99bbcc5 Fix SVN r256540: s/TMPETC/TMPBOOT/ for loader.conf(5) GELI entries. 2013-10-15 15:00:53 +00:00
Devin Teske
13d8e1cee5 gjb writes: when doing encrypted zfs install, loader.conf should be updated
so bootpool is imported after boot:
        zpool_cache_load="YES"
        zpool_cache_type="/boot/zfs/zpool.cache"
        zpool_cache_name="/boot/zfs/zpool.cache"
otherwise /boot is a broken symlink after the system is up.
http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017891.html
NOTE: Fix a comment while here.

Reviewed by:	gjb
2013-10-15 14:18:15 +00:00
Devin Teske
982726803d Add executable bit to docsinstall [old] and entropy [new] scripts.
Approved by:	re (gjb)
2013-10-15 02:07:29 +00:00
Simon J. Gerraty
3caf0790a8 Merge head@256284 2013-10-13 02:35:19 +00:00
Simon J. Gerraty
4fd0d10e0f New dependencies 2013-10-13 00:22:44 +00:00
Devin Teske
4da57f63b6 Remove the dumpdev configuration dialog, merge it into the regular
services configuration and enable it by default. Committed with
slight change to menu text for length and content.

Submitted by:	Allan Jude <freebsd@allanjude.com>
Approved by:	re (glebius)
2013-10-11 21:23:44 +00:00
Devin Teske
bce09b12c4 Incorporate PR bin/161547 to detect when an interface is wireless.
Patch from PR modified slightly for whitespace and style.

PR:		bin/161547
Submitted by:	Warren Block <wblock@wonkity.com>
Reviewed by:	Allan Jude <freebsd@allanjude.com>
Approved by:	re (glebius)
2013-10-11 21:12:48 +00:00
Devin Teske
133e25d3b7 Rewrite the keymap module to display an actual menu of selectable
keymaps *and* provide a mechanism for testing the selection. With
this commit, bsdinstall is no longer dependent on kbdmap(1). The
keymap test menu was originally submitted by Warren Block but was
modified).

Submitted by:	Warren Block <wblock@wonkity.com>
Reviewed by:	Allan Jude <freebsd@allanjude.com>
Approved by:	re (glebius)
2013-10-11 20:52:42 +00:00
Devin Teske
cd88b8869f Add zfsboot module as an option for automatic configuration. Default is
to run interactively but it can be scripted too (optinally completely
non-interactive). Currently supports GELI and all ZFS vdev types. Also
performs validation on selections/settings providing error messages if
necessary, explaining (in plain language) what the issue is. Currently
the auto partitioning of naked disks only supports GPT and MBR (VTOC8
pending for sparc64), so is only available for i386/amd64 install.

Submitted by:	Allan Jude <freebsd@allanjude.com>, myself
Reviewed by:	Allan Jude <freebsd@allanjude.com>
Approved by:	re (glebius)
2013-10-11 20:41:35 +00:00
Dag-Erling Smørgrav
dfc23ba54b After installation, dump 4096 bytes from /dev/random to /entropy in the
newly installed system.  This should greatly increase the amount of
entropy available when SSH host keys are generated during first boot.

Reviewed by:    markm, nathanw
Approved by:	re (gjb)
2013-10-11 20:21:44 +00:00
Gavin Atkinson
582071bd52 Remove ftp5.se.f.o, as per request to -hubs@
Approved by:	re (glebius)
MFC after:	3 days
2013-09-28 13:58:21 +00:00