summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall
Commit message (Collapse)AuthorAgeFilesLines
* MFC r321226: bsdinstall: improve checksum mismatch error for snapshotsemaste2017-09-141-2/+10
| | | | | | | | | | | The usual case of a mismatched checksum for installer snapshots (e.g., -CURRENT, -ALPHA*) is that a newer snapshot has been built and the old install sets have been replaced. Provide a specific error message for checksum mismatches there that suggests looking for a newer snapshot. Submitted by: Guangyuan Yang <yzgyyang@outlook.com> Sponsored by: The FreeBSD Foundation
* MFC r316802 (cem): bsdinstall(8): Sprinkle a snprintf to fixed size bufferemaste2017-09-141-1/+1
| | | | | | | | | Use a snprintf to write an environment variable to a fixed-size buffer to avoid stack overflow. Reported by: Coverity (CWE-120) CID: 1238926 Sponsored by: The FreeBSD Foundation
* MFC r323448: bsdinstall: Ignore error return from newaliases(1)emaste2017-09-141-1/+1
| | | | | | | | This was originally added as "exit $SUCCESS" but with nothing to set the SUCCESS variable. Thus it became an exit with no argument, which just exits with the status of the preceding command. Sponsored by: The FreeBSD Foundation
* MFC r322374: bsdinstall: record DHCP config after obtaining leaseemaste2017-09-091-2/+1
| | | | | | | | Previously we added an ifconfig_$INTERFACE line to rc.conf for each unsuccessful DCHP attempt. PR: 219515 Sponsored by: The FreeBSD Foundation
* MFC r321734: bsdinstall: default to UEFI-only boot on arm64emaste2017-08-081-9/+19
| | | | Sponsored by: The FreeBSD Foundation
* MFC r318723:ngie2017-07-191-45/+65
| | | | | | | | bsdinstall(8): fix manpage issues - Start new sentences on new lines. - Separate e.g. (more of an igor thing) with commas, and rewrite some examples not to be enclosed in parentheses.
* MFC r318722:ngie2017-07-181-1/+2
| | | | sade(8): start new sentence on new line
* MFC r318693,r318694:ngie2017-07-181-13/+14
| | | | | | | | | | | | | | | r318693: Some minor style(9) fixes - Wrap at <80 columns. - Sort by type r318694: style(9): sort headers MFC with: r318693
* bsdinstall: use consistent EFI configuration across platformsemaste2017-06-193-6/+10
| | | | | | | | | | | | | | MFC r320007: - increase arm64 EFI partition to 200M, as x86 - use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86 - increase ZFS EFI partition to 200M MFC r320008: bsdinstall: correct comment after r320007 PR: 201898 Approved by: re (kib) Relnotes: Yes Sponsored by: The FreeBSD Foundation
* MFC: r319863allanjude2017-06-152-1/+7
| | | | | | | | | bsdinstall: Make ZFS min_auto_ashift adjustment persistent MFC: r319864 bsdinstall: support Auto ZFS mode for ARM64 Approved by: re (gjb)
* MFC r318632, r318633:royger2017-05-291-5/+22
| | | | | bsdinstall: mount is not needed for the ZFS install case bsdinstall: do not use distextract in scripted mode
* MFC r314833rgrimes2017-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Convert absolute links to relative links. Style.Makefile(9) has been ignored to produce minimal diffs. MFC r314837 The relative symlink fix causes downstream issues for EMC DELL Isilon so revert the relative symlink fix pending a better solution. Reported by: ngie MFC r315091 Revert r314833 until the problem with INSTALL_RSYMLINKS can be found as it appears to break arm release builds. PR: 217705 Reported by: cyclaero@gmail.com Approved by: grehan (mentor)
* MFC r317743:araujo2017-05-171-9/+9
| | | | | | | Use nitems() from sys/param.h. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9942
* MFC r313448:garga2017-02-151-3/+4
| | | | | | | | | | | | | | | bsdinstall: Make sure chroot filesystems are umounted after use * DISTDIR_IS_UNIONFS is set every time BSDINSTALL_DISTDIR is mounted inside BSDINSTALL_CHROOT. Use this flag to decide if it needs to be umounted * BSDINSTALL_CHROOT/dev is mounted when 'bsdinstall mount' is called, there is no need to mount it again when user goes to shell after installation Reviewed by: allanjude Obtained from: pfSense MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D8573
* MFC improvements to bsdinstall's wlanconfig moduledteske2017-01-081-246/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC [85] revisions 309719-309720, 309901-309902, 309904-309911, 309913-309920, 309922-309924, 309926, 309928, 309930, 309932, 309934, 309937-309942, 309944-309952, 309958-309998, and 310038 (described below) r309719: Remove unnecessary trailing backslashes r309720: Functions in their own section r309901: Comments r309902: Use $( ... ) instead of `...` r309904: Change "[ ! -z ... ]" => "[ ... ]" and "[ -z ... ]" => "[ ! ... ]" r309905: Remove unnecessary local initializers r309906: Consolidate locals r309907: Replace funny block with something easy to digest r309908: Collapse tiny if statements r309909: Change "[ ! ... ] && ..." to "[ ... ] || ..." r309910: Remove unnecessary quotes around number in test r309911: Group fallbacks together r309913: Allow $BSDINSTALL_TMPETC to contain whitespace or special chars r309914: Add missing `-e' parameter to sed invocations r309915: "echo | sed | sed | awk" is silly (changed to "echo | awk") r309916: Be internally consistent (": > ..." is used elsewhere in this file) r309917: awk(1) match() takes a regex, use /.../ to remind ourselves of this r309918: Remove unnecessary `-n' parameter to head/tail r309919: Whitespace r309920: Use provided API instead of hard-coded status integers r309922: Centralize backtitle string r309923: There is zero harm in always passing --default-item to dialog r309924: Always pass --default-item parameter to dialog r309926: Change the name of a variable from $def_item_... to $default_... r309928: Use ~ instead of match() r309930: Use ternary operator r309932: Remove an unnecessary "return $?" at end of function r309934: Consolidate redirects into here documents r309937: Whitespace (dialog options separated to minimize diffs) r309938: Use provided API (change "dialog" to "$DIALOG") r309939: Fix incorrect use of provided API r309940: Reorder dialog parameters based on commonality for readability r309941: Use provided API to centralize dialog title strings r309942: Allow the script path to contain whitespace and special characters r309944: Fix invalid parameter expansion (change $@ to "$@") r309945: 1 is the default descriptor for redirects without an fd prefix r309946: Use more succinct awk syntax r309947: Remove unnecessary semi-colons r309948: Remove incomplete and unnecessary creation of fd3 r309949: Utilize provided i18n strings r309950: Whitespace r309951: Remove an unnecessary call to f_dialog_title_restore() r309952: Move the secondary condition into the action clause r309958: Quote WLAN_IFACE (pedantic) r309959: Use oft-neglected syntax "startcondition, stopcondition { ... }" r309960: Add missing backslash r309961: Stop repeating strings (centralize prompt string) r309962: More efficiently make use of the exit status r309963: Avoid non-standard options r309964: Sort the domains r309965: Whitespace alignment r309966: Sanitize dialog output for portability/compatibility requirements r309967: Use more generic f_yesno() from provided API r309968: Properly quote variable r309969: Send stderr to the same place as stdout r309970: Remove completely unnecesary parentheses r309971: Start deconstructing a conveluted hunk of code r309972: If the first ping succeeded, why on Earth should we ping it again? r309973: Why use $? when you can use the command itself r309974: These two error messages have always been backwards since inception r309975: Continued resolution of conveluted statement r309976: You don't need parentheses for awk's printf r309977: Whitespace and alignment r309978: Neither printf nor print need parens in awk r309979: This statement has too many backslashes r309980: Just use print r309981: Add missing quotes r309982: Remove unnecessary quotes r309983: Use the provided API for calculating the appropriate size of menus r309984: Whitespace alignment r309985: Comment r309986: There's an API function for displaying errors r309987: There's an API function for displaying yes/no dialogs r309988: There's an API function for displaying pauses r309989: There's an API function for catching errors r309990: Calculate proper size of menu list dialog r309991: Simplify bringup of interface after changes and catch errors r309992: Restore previous comment r309993: Why test $? when you can test the command r309994: Wordsmithing r309995: Simplify loop by moving predicate to clause r309996: Simplify single-line if statements r309997: The flags of a WLAN need to be quoted r309998: It's completely pointless to replace newlines with space r310038: Revert r309918 -- modern POSIX has deprecated -<#>/+<#> syntax PR: bin/214933
* MFC r309716: Add support for "hidden" Wi-Fi networksdteske2017-01-081-2/+19
| | | | | | PR: bin/214933 Submitted by: Maxim Filimonov <che@bein.link> Reviewed by: dteske, allanjude, adrian
* MFC r303877:skreuzer2016-08-271-2/+3
| | | | | | Write kern.randompid to /etc/sysctl.conf Approved by: allanjude
* MFH (r304142): ensure stripe size is non-zero multiple of 4096des2016-08-191-6/+20
| | | | PR: 211361
* MFC r303631:dim2016-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Fix non-functional bsdinstall services dialog. The most recent version of bsdinstall does not seem to respect any of the checkboxes in the "Choose the services you would like to be started at boot" dialog. None of the chosen services end up in the rc.conf file that is installed onto the target system. This is caused by the bsdinstall/scripts/hardening script, which implements the new hardening options dialog. The script starts by overwriting the previously written rc.conf.services file: echo -n > $BSDINSTALL_TMPETC/rc.conf.services which is obviously incorrect. It should clear out rc.conf.hardening instead. Approved by: re (kib) Reviewed by: allanjude PR: 211506 Differential Revision: https://reviews.freebsd.org/D7387
* MFC r302897:robak2016-07-284-1/+89
| | | | | | | | | | | | | | | Add new System Hardening menu and options to bsdinstall. This patch add new 'hardening' file responsible for new bsdinstall 'System Hardening' menu allowing users to set some sane and carefully picked system security options (like random process id's, hiding other users/groups processes and others). All options are OFF by default in this patch due to POLA principle with intention to turn change some of them to ON by default in future. Reviewed by: adrian, allanjude, bdrewery, nwhitehorn Approved by: re@, adrian, allanjude
* MFC: r302790, r302795allanjude2016-07-261-0/+38
| | | | | | | | Add new menu to bsdinstall to allow user to set date and time after selecting timezone. The 'skip' button is the default selection. Submitted by: des Approved by: re (gjb)
* MFC: r302940allanjude2016-07-261-1/+2
| | | | | | | | Fix error in bsdinstall triggered when doing a GELI encrypted install to an MBR formatted disk Approved by: re (gjb) Sponsored by: ScaleEngine Inc.
* MFC: r302941allanjude2016-07-261-0/+9
| | | | | | | | At the start of the installation process, all ZFS pools are exported and all GELI instances are detached, to allow a restarted install to proceed. PR: 210814 Approved by: re (gjb)
* Add more machines to the bsdinstall workaround blacklistallanjude2016-07-031-2/+2
| | | | | | | | | | | 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.
* Fix an error in bsdinstall when ZFS installation uses a bootpoolallanjude2016-07-031-8/+11
| | | | | | | | | | | | | | 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.
* bsdinstall: increase EFI partition size to 200MBemaste2016-06-231-1/+1
| | | | | | | | | | | | | | | | | A larger EFI file system size will facilitate multi-boot configurations and the installation other EFI applications like firmware update tools. 200MB matches OS X. Note that this changes only the partition size, not the file system that bsdinstall places there. We need to do both, but as the partition size is difficult to adjust later make this change for now so that at least systems installed with FreeBSD 11.0 have a partition layout with room to grow. Reviewed by: allanjude, imp Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6935
* ARM64: bsdinstall support for creating EFI partitionswma2016-06-202-1/+105
| | | | | | | | | | | This patch enables bsdinstall to create EFI partition during installation and uploading it's contents, making the ARM64 FreeBSD installation bootable. Obtained from: Semihalf Sponsored by: Cavium Approved by: re Reviewed by: allanjude, emaste, nwhitehorn, wma Differential Revision: https://reviews.freebsd.org/D6853
* Fix bsdinstall for root-on-zfs with MBR partitioningallanjude2016-06-101-9/+5
| | | | | | | | | | | | 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
* bsdinstall: add country/regulatory domain configuration dialog.avos2016-06-081-32/+183
| | | | | | | | | 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
* bsdinstall: unbreak static address assignment for wired networks.avos2016-05-261-1/+5
| | | | | | | This fixes regression introduced in r298946 (fixes static address assignment for wireless networks). Reported & submitted by: allanjude
* Only set kern.geom.part.mbr.enforce_chs=0 once, instead of once per diskallanjude2016-05-241-1/+1
| | | | Sponsored by: ScaleEngine Inc.
* Add support for RAID 1+0 (striped mirrors) to bsdinstall/zfsbootallanjude2016-05-241-5/+40
| | | | Sponsored by: ScaleEngine Inc.
* Only export and re-import the root pool if installing on MBRallanjude2016-05-231-22/+26
| | | | | | This step is required in order to dd the boot2 bits into the ZFS partition Sponsored by: ScaleEngine Inc.
* Fix missing pool name in zfs set commandallanjude2016-05-231-1/+1
|
* Fix error in bsdinstall where additional filesystems cannot be mountedallanjude2016-05-231-1/+5
| | | | | | | | | | | 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.
* bsdinstall/zfsboot GPT+BIOS+GELI installs now make use of GELIBOOTallanjude2016-05-221-60/+84
| | | | | | | | | | | | 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
* Fix default ZFS layout to work better by default with sysutils/beadmallanjude2016-05-221-1/+1
| | | | | | | | | 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.
* Fix typo in comments for the zfsboot scriptbapt2016-05-221-1/+1
| | | | Submitted by: Colby Swandale <colby@taplaboratories.com.au> (via github)
* bsdinstall/zfsboot: Do not mirror swap when swapsize is 0allanjude2016-05-101-1/+1
| | | | | | PR: 209415 Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks
* bsdinstall: fix static address assignment for protected wireless networks.avos2016-05-021-1/+1
| | | | | | | Filter out IFCONFIG_PREFIX variable (which may contain WPA keyword) from ifconfig parameters. PR: 169199
* usr.sbin/bsdconfig: minor spelling fixes on comments.pfg2016-05-011-1/+1
| | | | No functional change.
* Remove unportable calls to basename().ed2016-04-261-10/+11
| | | | | | | | | | | The POSIX version of basename() doesn't use a 'const char *' argument; the function may overwrite its input buffer. Instead of copying the input string, let's just simplify this code by using our getprogname() function that already returns the name of the application in the right format. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D6094
* Add a new installation type to bsdinstall/zfsboot: BIOS+UEFIallanjude2016-04-191-16/+52
| | | | | | | | | | | 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)
* MFHgjb2016-04-111-2/+4
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * bsdinstall/zfsboot should create /tmp and /var/tmp if they do not existallanjude2016-04-081-0/+2
| | | | | | | | | | | | | | PR: 208629 PR: 208568 Submitted by: Galael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks
| * Do not add swap to fstab when swapsize is 0allanjude2016-04-081-2/+2
| | | | | | | | | | | | | | | | | | 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.
* | MFHgjb2016-04-041-5/+5
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Remove 50% ZFS conditional from bsdinstall/zfsbootallanjude2016-03-171-5/+5
| | | | | | | | | | | | | | | | Remove the requirement that the resulting partition table be atleast 50% ZFS PR: 208094 Requested by: brooks Sponsored by: ScaleEngine Inc.
* | MFHgjb2016-02-021-68/+47
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * The zfsboot automated part of bsdinstall now supports UEFIallanjude2016-01-301-68/+47
| | | | | | | | | | | | MFC after: 3 days Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4960
OpenPOWER on IntegriCloud