History log of /src/libexec/rc/rc.initdiskless (Results 1 – 25 of 75)
Revision Date Author Comments
# 3c61bbeb 27-Oct-2024 Keve Müller <kevemueller@users.noreply.github.com>

Update rc.initdiskless, fix error handling of remount_optional

chkerr() ignores the exit code of a preceding mount command in case a
file ```remount_optional``` exists. The check is performed and a

Update rc.initdiskless, fix error handling of remount_optional

chkerr() ignores the exit code of a preceding mount command in case a
file ```remount_optional``` exists. The check is performed and a
subshell is launched to log the informational message and return. The
return is executed in the context of the subshell, not the context of
the chkerr() function, hence is a NOP. The remount_optional check is
hence ineffective.

Change the code to if/then/fi, so the return is evaluated in the context
of the chkerr function, to make the check effective.

Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1497

show more ...


# 088cc7d2 08-Jun-2024 Alexander Ziaee <concussious@runbox.com>

man filesystems: fix more xrefs after move to s4

Fixes: 1a720cbec513
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1282


# bb411657 20-Mar-2024 Jose Luis Duran <jlduran@gmail.com>

rc.initdiskless: Disable soft-updates in mdmfs (again)

Re-apply the -S switch to disable soft-updates in memory disks (commit
8b1292ac5219). This might be beneficial when tmpfs(5) is not present in

rc.initdiskless: Disable soft-updates in mdmfs (again)

Re-apply the -S switch to disable soft-updates in memory disks (commit
8b1292ac5219). This might be beneficial when tmpfs(5) is not present in
the kernel, as this can cause mdmfs(8)'s auto keyword to fallback to
using md(4).

PR: 85558
MFC after: 1 week
Reviewed by: imp, emaste, brooks
Differential Revision: https://reviews.freebsd.org/D43242

show more ...


# a04ca1c2 31-Dec-2023 Jose Luis Duran <jlduran@gmail.com>

rc.initdiskless: Remove bogus plus sign

Reviewed by: imp, dab
Fixes: Fixes: 93b7818226cf ("libexec/rc/rc.initdiskless: make tar's path flexible")
Differential Revision: https://reviews.freebsd.org/

rc.initdiskless: Remove bogus plus sign

Reviewed by: imp, dab
Fixes: Fixes: 93b7818226cf ("libexec/rc/rc.initdiskless: make tar's path flexible")
Differential Revision: https://reviews.freebsd.org/D43241

show more ...


# 93b78182 24-Nov-2023 Cheng Cui <cc@FreeBSD.org>

libexec/rc/rc.initdiskless: make tar's path flexible

Summary:
PR: 274977
Reviewed by: rgrimes,imp
Approved by: rgrimes
MFC after: 1 month


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

Remove $FreeBSD$: one-line sh pattern

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


# 30985d19 19-Jan-2023 Gordon Bergling <gbe@FreeBSD.org>

rc.initdiskless: Fix a typo in a comment

- s/attemping/attempting/

MFC after:5 days


# 26e8ed62 26-Apr-2019 Lev A. Serebryakov <lev@FreeBSD.org>

Make mdmfs verbose if diskless boot is verbose.

Approved by: ian@
Differential Revision: D17104


# 707a657c 20-Oct-2018 Eugene Grosbein <eugen@FreeBSD.org>

rc.initdiskless: fix commentary grammar after r339465

MFC after: 1 month


# b4d24263 20-Oct-2018 Eugene Grosbein <eugen@FreeBSD.org>

rc.initdiskless: add support for auxiliary NVRAM.

Currently, rc.inidiskless assumes that local system configuration
changes are kept in some mountable file system. For example,
nanobsd uses dedicate

rc.initdiskless: add support for auxiliary NVRAM.

Currently, rc.inidiskless assumes that local system configuration
changes are kept in some mountable file system. For example,
nanobsd uses dedicated partition mounted as /cfg for this.

However, small embedded devices like MIPS routers may have no enough flash
space to keep full-blown file system but have only one or couple
small flash blocks to keep persistent local configuration overrides.

This change extends rc.initdiskless and introduces ability to run auxiliary
command /conf/T/M/extract that is supposed to extract configuration overrides
from such local storage.

For example, the command /conf/default/etc/extract may contain something like:

cd "$1" && bsdcpio --quiet -idu < /dev/map/cfg

bsdcpio command extracts compressed archive from the storage to /etc
assuming the storage is exposed by the kernel as /dev/map/cfg to userland.

PR: 204215
MFC after: 1 month

show more ...


# 0696600c 17-Oct-2018 Bjoern A. Zeeb <bz@FreeBSD.org>

Move the rc framework out of sbin/init into libexec/rc.

The reasons for this are forward looking to pkgbase:
* /sbin/init is a special binary; try not to replace it with
every package update bec

Move the rc framework out of sbin/init into libexec/rc.

The reasons for this are forward looking to pkgbase:
* /sbin/init is a special binary; try not to replace it with
every package update because an rc script was touched.
(a follow-up commit will make init its own package)
* having rc in its own place will allow more easy replacement
of the rc framework with alternatives, such as openrc.

Discussed with: brd (during BSDCam), kmoore
Requested by: cem, bz
PR: 231522
Approved by: re (gjb)

show more ...


# df89e317 28-Jul-2018 Brad Davis <brd@FreeBSD.org>

Opps, I missed moving a couple of files in r336845.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D16466


# dae3a64f 27-Dec-2017 Eitan Adler <eadler@FreeBSD.org>

userland: Fix several typos and minor errors

- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by: imp, benno


# e8b437ef 29-Sep-2017 Ian Lepore <ian@FreeBSD.org>

Remove spurious $flags; it's a paste-o from copying the line from rc.subr.
Also, add a comment documenting the args passed to mount_md().


# 50e3590c 29-Sep-2017 Ian Lepore <ian@FreeBSD.org>

Enhance mdmfs(8) to work with tmpfs(5).

Existing scripts and associated config such as rc.initdiskless, rc.d/var,
and others, use mdmfs to create memory filesystems. That program accepts a
size argu

Enhance mdmfs(8) to work with tmpfs(5).

Existing scripts and associated config such as rc.initdiskless, rc.d/var,
and others, use mdmfs to create memory filesystems. That program accepts a
size argument which allows SI suffixes and treats an unsuffixed number as a
count of 512 byte sectors. That makes it difficult to convert existing
scripts to use tmpfs instead of mdmfs, because tmpfs treats unsuffixed
numbers as a count of bytes. The script logic to deal with existing user
config that might include suffixed and unsuffixed numbers is... unpleasant.

Also, there is no g'tee that tmpfs will be available. It is sometimes
configured out of small-resource embedded systems to save memory and flash
storage space.

These changes enhance mdmfs(8) so that it accepts two new values for the
'md-device' arg: 'tmpfs' and 'auto'. With tmpfs, the program always uses
tmpfs(5) (and fails if it's not available). With 'auto' the program prefers
tmpfs, but falls back to using md(4) if tmpfs isn't available. It also
handles the -s <size> argument so that the mdconfig interpetation of
unsuffixed numbers applies when tmpfs is used as well, so that existing user
config keeps working after a switch to tmpfs.

A new rc setting, mfs_type, is added to etc/defaults/rc.conf to let users
force the use of tmpfs or md; the default value is "auto".

Differential Revision: https://reviews.freebsd.org/D12301

show more ...


# dd8a25a7 15-Jun-2017 Stephen J. Kiernan <stevek@FreeBSD.org>

Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5).
Need to multiply the size of the disk passed to mount_md by 512 as mdmfs
expects number of 512-byte blocks while tmpfs size op

Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5).
Need to multiply the size of the disk passed to mount_md by 512 as mdmfs
expects number of 512-byte blocks while tmpfs size option wants number of
bytes.

Reviewed by: brooks
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D11106

show more ...


# f2730d1d 01-May-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

etc: minor spelling fixes.

Mostly comments but these tend to be user-visible.

MFC after: 2 weeks


# 611a7990 21-Nov-2012 Chris Rees <crees@FreeBSD.org>

Revert r243228. This commit appears to cause more trouble than
it was designed to avoid; the issue described in the PR was no
longer an issue anyway.


# 0a1285e7 18-Nov-2012 Chris Rees <crees@FreeBSD.org>

cp -R misses out dotfiles; use pax instead to copy file hierarchies

PR: conf/99721 (based on)
Submitted by: Florian Zavatzki <f_zavatzki@blue-network.org>
Approved by: hrs
MFC after: 1 month


# 081dc987 07-Jan-2012 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for etc/


# 2557f5bf 14-May-2010 Doug Barton <dougb@FreeBSD.org>

Remove trailing white space. No functional changes.


# 1f7f2991 09-Sep-2008 Bruce M Simpson <bms@FreeBSD.org>

Add support to rc.initdiskless for /conf/T/M/remount_subdir.
This allows the location of the configuration data to be relocated
within the filesystem containing it. A nullfs mount is used in order
to

Add support to rc.initdiskless for /conf/T/M/remount_subdir.
This allows the location of the configuration data to be relocated
within the filesystem containing it. A nullfs mount is used in order
to achieve this.

Obtained from: XORP, Inc.

show more ...


# 7e54279b 15-May-2008 Bruce M Simpson <bms@FreeBSD.org>

Add support for /conf/T/M/remount_optional.

The rc.initdiskless functionality is used by NanoBSD to allow configuration
files to live on a separate configuration slice, which acts as NVRAM, whilst
t

Add support for /conf/T/M/remount_optional.

The rc.initdiskless functionality is used by NanoBSD to allow configuration
files to live on a separate configuration slice, which acts as NVRAM, whilst
the system image is mounted read-only.

Normally, if the remount command fails during boot, this is regarded as
a fatal error. If /conf/T/M/remount_optional is present, this error is
non-fatal. If the file is not present, the default behaviour is unchanged.

This is very useful for people building live CD images using FreeBSD,
where the NVRAM lives somewhere completely differently from the system image,
and may be present on removable media which is not present during the
initial boot.

show more ...


# 9b96fa2d 03-Dec-2006 Luigi Rizzo <luigi@FreeBSD.org>

- put some common code in a function handle_remount();
- add better checks on non-existing directories to prevent error
messages at run time;
- introduce a function log() to help debugging diskless

- put some common code in a function handle_remount();
- add better checks on non-existing directories to prevent error
messages at run time;
- introduce a function log() to help debugging diskless booting
when things don't work;
- modify the parsing of diskless_remount so you can add mount_nfs
options after the pathname. You could use 'remount' to do something
similar, but this way is more convenient because you don't have to
hardwire the server name in the command.
- document the above.

I have been running the above in a diskless lab since february on RELENG_6.

MFC after: 1 week

show more ...


# 401bae3d 01-Sep-2006 Brooks Davis <brooks@FreeBSD.org>

- Document /conf/diskless_remount in the list of special files.
- Note that diskless_remount files may use ".." to support mounts above
the root path.
- Copy dot files when populating directories f

- Document /conf/diskless_remount in the list of special files.
- Note that diskless_remount files may use ".." to support mounts above
the root path.
- Copy dot files when populating directories from /conf. [1]

PR: misc/102724 [1]
Submitted by: Attila Nagy <bra at fsn.hu> [1]

show more ...


123