History log of /freebsd/usr.sbin/bsdinstall/scripts/script (Results 1 – 25 of 42)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 731704f5 06-Jan-2024 Michael Gmelin <grembo@FreeBSD.org>

bsdinstall: Fix installation script splitting

This allows writing setup scripts that contain lines starting with
"#!", e.g., a shebang when creating a shell script using cat:

#!/bin/sh
echo

bsdinstall: Fix installation script splitting

This allows writing setup scripts that contain lines starting with
"#!", e.g., a shebang when creating a shell script using cat:

#!/bin/sh
echo "Populate rc.local"
cat >/etc/rc.local<<EOF
#!/bin/sh
echo booted | logger -s -t 'example'
EOF

Prevent accidentally running a setup script left behind by a
previous invocation of bsdinstall.

Reviewed by: imp, jrtc27
Differential Revision: https://reviews.freebsd.org/D43350

show more ...


Revision tags: release/14.0.0
# c0e249d3 15-Aug-2023 Lars Kellogg-Stedman <lars@oddbit.com>

bsdinstall: avoid conflicts with fd 3

Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). In several places in the bsdinstalls scripts,
we use fd 3 to

bsdinstall: avoid conflicts with fd 3

Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). In several places in the bsdinstalls scripts,
we use fd 3 to juggle stdout when calling out to other tools, which can
cause the installer to fail with a "Bad file descriptor" error when
f_dprintf attempts to use it.

This commit replaces all constructs like this:

exec 3>&1
SOME_VARIABLE=$(some command 2>&1 1>&3)
exec 3>&-

With:

exec 5>&1
SOME_VARIABLE=$(some command 2>&1 1>&5)
exec 5>&-

PR: 273148
Reviewed by: corvink
Fixes: 1f7746d81f53447ac15cc99395bb714d4dd0a4da ("bsdinstall: stop messing with file descriptors")
MFC after: 1 week

show more ...


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 450b4ac2 03-May-2022 Corvin Köhne <CorvinK@beckhoff.com>

bsdinstall/script: umount before zpool export

When running zpool export first, boot/efi and dev is still mounted so
zpool export fails. By running bsdinstall umount first the pool can be
cleanly exp

bsdinstall/script: umount before zpool export

When running zpool export first, boot/efi and dev is still mounted so
zpool export fails. By running bsdinstall umount first the pool can be
cleanly exported.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D35114
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC After: 3 days

show more ...


# 1f7746d8 03-May-2022 Corvin Köhne <CorvinK@beckhoff.com>

bsdinstall: stop messing with file descriptors

Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). By closing file descriptor 3 here, the
final f_dpri

bsdinstall: stop messing with file descriptors

Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). By closing file descriptor 3 here, the
final f_dprintf "Installation Completed ... does not work anymore.

By putting the code into a subshell, file descriptors can be edited
without interference with the calling script.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D35113
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 3 days

show more ...


Revision tags: release/12.3.0
# b50db44f 23-Jun-2021 Ryan Moeller <freqlabs@FreeBSD.org>

bsdinstall: Avoid double-mounting /dev

After 34766aa8cb514472c571f8b0e90e833833acef51 we are mounting and
unmounting devfs elsewhere already.

Reviewed by: nwhitehorn
MFC after: 1 week
Sponsored by:

bsdinstall: Avoid double-mounting /dev

After 34766aa8cb514472c571f8b0e90e833833acef51 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

show more ...


# 5104dfbe 03-Jun-2021 Navdeep Parhar <np@FreeBSD.org>

bsdinstall: Fix typo (Instalation -> Installation).


# 40923b0c 28-May-2021 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

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 d

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

show more ...


# 34766aa8 14-May-2021 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

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 th

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

show more ...


Revision tags: release/13.0.0
# c2f16c59 23-Mar-2021 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

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

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

show more ...


Revision tags: release/12.2.0, release/11.4.0
# a107ddbb 15-Jan-2020 Rebecca Cran <bcran@FreeBSD.org>

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/


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0
# 4b49587c 06-Jan-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r327341 through r327623.


# 8befcf7b 02-Jan-2018 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

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 f

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

show more ...


Revision tags: release/10.4.0, release/11.1.0
# 27c24068 22-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r318560 through r318657.


# d7640440 22-May-2017 Roger Pau Monné <royger@FreeBSD.org>

bsdinstall: do not use distextract in scripted mode

It requires a tty, which might not be available in scripted installs. Instead
extract the sets manually using tar.

Reviewed by: tsoome
Sponsored

bsdinstall: do not use distextract in scripted mode

It requires a tty, which might not be available in scripted installs. Instead
extract the sets manually using tar.

Reviewed by: tsoome
Sponsored by: Citrix Systems R&D
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D10736

show more ...


# 2f34d6c3 22-May-2017 Roger Pau Monné <royger@FreeBSD.org>

bsdinstall: mount is not needed for the ZFS install case

Because the datasets are already mounted by zfsboot, and the mount script
doesn't know anything about ZFS. Also do not execute the "umount" s

bsdinstall: mount is not needed for the ZFS install case

Because the datasets are already mounted by zfsboot, and the mount script
doesn't know anything about ZFS. Also do not execute the "umount" script for
ZFS for the same reasons.

Reviewed by: dteske, tsoome
Sponsored by: Citrix Systems R&D
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D10738

show more ...


Revision tags: release/11.0.1, release/11.0.0, release/10.3.0
# 11d38a57 28-Oct-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head

Sponsored by: Gandi.net


# becbad1f 13-Oct-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# 0f405ee7 28-Sep-2015 Navdeep Parhar <np@FreeBSD.org>

Sync up with head (up to r288341).


# a1cb6af1 17-Sep-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r287680 through r287877.


# f94594b3 12-Sep-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Finish merging from head, messed up in previous attempt


# e5a24129 11-Sep-2015 Devin Teske <dteske@FreeBSD.org>

Update copyright

MFC after: 3 days
X-MFC-to: stable/10


# 96eeaba5 11-Sep-2015 Devin Teske <dteske@FreeBSD.org>

Better to reset trap and explicitly exit success

MFC after: 3 days
X-MFC-to: stable/10


Revision tags: release/10.2.0, release/10.1.0, release/9.3.0
# 6cec9cad 03-Jun-2014 Peter Grehan <grehan@FreeBSD.org>

MFC @ r266724

An SVM update will follow this.


# 3b8f0845 28-Apr-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge head


12