FreeBSD src
Go to file
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
.github/workflows GitHub actions: unbreak macOS build 2021-01-08 15:36:38 +01:00
bin bin/pkill: Fix {pgrep,pkill}-j_test.sh 2021-02-13 13:53:51 +00:00
cddl pkgbase: Move libicp in utilities 2021-03-16 07:12:40 +01:00
contrib Fix build post a040967612. 2021-03-22 08:42:18 -07:00
crypto openssh: document two changes that are now upstream 2021-02-22 14:03:28 -05:00
etc base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
gnu dialog: fix macro redefinition 2021-03-01 16:01:44 +01:00
include libucl: import latest snapshot from 2021-03-14 2021-03-22 15:07:18 +01:00
kerberos5 kerberos5: fix the WITH_OPENLDAP build 2021-01-30 00:07:50 -06:00
lib Silence unused parameter warnings in the RISC-V fenv.h 2021-03-22 17:49:24 +00:00
libexec Fix the 'linux' rc script on aarch64. 2021-03-18 20:30:21 +00:00
release release: sync 'git count' logic with newvers.sh 2021-03-17 10:57:32 -04:00
rescue ping: add a ping6 hard link for backwards compatibility 2020-11-26 18:33:04 +00:00
sbin pfilctl: improve formatting of "hooks" and "heads" command output. 2021-03-19 11:18:05 -07:00
secure OpenSSL: Regen manual page for the previous commit 2021-02-17 18:19:13 -05:00
share retire obsolete mn(4) sync serial driver 2021-03-22 15:06:51 -04:00
stand loader: insert spaces around menu title 2021-03-23 09:31:36 +02:00
sys gpioc_detach: fix freeing of wrong pointers 2021-03-23 12:45:18 +02:00
targets ndis(4): remove as previous announced 2021-01-25 21:45:03 +00:00
tests libucl: import latest snapshot from 2021-03-14 2021-03-22 15:07:18 +01:00
tools Don't add -Winline for WARNS=6 2021-03-22 11:55:45 +00:00
usr.bin ls(1): Refine the HISTORY within the manual page. 2021-03-13 19:28:26 +01:00
usr.sbin Fix scripted installs on EFI systems after default mounting of the ESP. 2021-03-23 09:29:54 -04:00
.arcconfig arcconfig: add callsign again 2020-11-23 04:39:29 +00:00
.arclint
.cirrus.yml Cirrus-CI: Add more information to help track down disk full issues 2021-03-03 11:51:08 -05:00
.clang-format clang-format: Avoid breaking after the opening paren of function definitions 2020-10-28 11:54:00 +00:00
.gitattributes
.gitignore gitignore: expand list of ignored files 2021-01-14 17:03:57 +01:00
COPYRIGHT copyrights: Happy New Year 2021 2020-12-31 10:29:44 -05:00
LOCKS
MAINTAINERS
Makefile libedit: vendor import snapshot 20200710 2021-03-22 15:29:33 +01:00
Makefile.inc1 Revert "bootstrap: add tic to the bootstrap tools" 2021-03-18 16:05:20 +01:00
Makefile.libcompat libcompat: remove redundant path for ncurses 2021-01-07 15:14:52 +01:00
Makefile.sys.inc
ObsoleteFiles.inc retire obsolete mn(4) sync serial driver 2021-03-22 15:06:51 -04:00
README.md libucl: import latest snapshot from 2021-03-14 2021-03-22 15:07:18 +01:00
RELNOTES Bump CURRENT to 14.0 2021-01-21 19:10:07 -05:00
UPDATING Add UPDATING entry for PIE default 2021-02-25 11:02:09 -05:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Various commands and libraries under the GNU Public License. Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources.
sys/arch/conf Kernel configuration files. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries.
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.