1
0
mirror of https://github.com/systemd/systemd synced 2026-04-12 10:04:50 +02:00

Compare commits

..

13 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
5f02870a74 seccomp: move arch_prctl to @default
It was reported as used by the linker:

> [It is] called in the setup of ld-linux-x86-64.so.2 from _dl_sysdep_start.
> My local call stack (with LTO):
>
> #0 init_cpu_features.constprop.0 (/usr/lib64/ld-linux-x86-64.so.2)
> #1 _dl_sysdep_start (/usr/lib64/ld-linux-x86-64.so.2)
> #2 _dl_start (/usr/lib64/ld-linux-x86-64.so.2)
> #3 _start (/usr/lib64/ld-linux-x86-64.so.2)
>
> Looking through the source, I think it's this (links for glibc 2.34):
> - First dl_platform_init calls _dl_x86_init_cpu_features, a wrapper for init_cpu_features.
> - Then init_cpu_features calls get_cet_status.
> - At last, get_cet_status invokes arch_prctl.

Fixes #22033.
2022-01-07 17:34:17 +01:00
Morten Linderud
921e1bae16 man: correct minor mistakes in systemd-creds
Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-01-07 16:07:28 +01:00
Zbigniew Jędrzejewski-Szmek
7f6c2dd0a7
Merge pull request #22013 from yuwata/fstab-generator-skip-nfsroot
fstab-generator: skip root directory handling when nfsroot is requested
2022-01-07 16:02:19 +01:00
Adam Williamson
a5307e173b kernel-install: prefer /boot over /boot/efi for $BOOT_ROOT
This restores the preference order from before 9e82a74. The code
previous to that change 'preferred' /boot over /boot/efi; that
commit changed it to check /boot/efi before checking /boot.
Changing this precedence could (and did, for me) have unexpected
effects - it seems safer to leave it how it was.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-01-07 15:15:04 +01:00
Markus Weippert
e00a25a7b4 homed: stop before stopping dbus
Otherwise, systemd-homed-active.service will fail to deactivate all
homes because homectl can no longer talk to homed if dbus stops first.
As a result, /home cannot be umounted.

Doing this on systemd-homed-active.service instead works as well, but
systemd-homed will exit 1 if dbus is already shut down.
2022-01-07 14:33:35 +01:00
Zbigniew Jędrzejewski-Szmek
7359e3d35a
Merge pull request #22006 from yuwata/on-ac-power
udev-util: ignore USB-C ports in power source mode
2022-01-07 14:28:19 +01:00
Yu Watanabe
8cc8a073a8 test: add test cases for fstab-generator 2022-01-07 00:58:50 +09:00
Yu Watanabe
b322e683ac meson: install test-network-generator-conversion.sh even if networkd is not enabled
Follow-up for 987dd89c775815831ae21736fe60aef59cb7a6fa.
2022-01-06 20:14:39 +09:00
Yu Watanabe
155e1bb4e7 fstab-generator: also skip other network filesystems and live image 2022-01-06 20:14:35 +09:00
Yu Watanabe
77b8e92de8 fstab-generator: skip root directory handling when nfsroot is requested
Fixes RHBZ#2037233 (https://bugzilla.redhat.com/show_bug.cgi?id=2037233).
2022-01-06 20:14:16 +09:00
Yu Watanabe
795e86b4f1 udev-util: ignore USB-C ports in power source mode when detecting system is running on AC power
Fixes #21988.
2022-01-06 18:28:56 +09:00
Yu Watanabe
01d4ad3bde udev-util: re-implement on_ac_power() with sd-device 2022-01-06 18:28:50 +09:00
Yu Watanabe
06795b02e3 util: move on_ac_power() from util.c -> udev-util.c 2022-01-06 18:06:22 +09:00
66 changed files with 469 additions and 78 deletions

View File

@ -240,7 +240,7 @@
<listitem><para>When specified with the <command>encrypt</command> command controls the timestamp to <listitem><para>When specified with the <command>encrypt</command> command controls the timestamp to
embed into the encrypted credential. Defaults to the current time. Takes a timestamp specification in embed into the encrypted credential. Defaults to the current time. Takes a timestamp specification in
the format described in the format described in
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
<para>When specified with the <command>decrypt</command> command controls the timestamp to use to <para>When specified with the <command>decrypt</command> command controls the timestamp to use to
validate the "not-after" timestamp that was configured with <option>--not-after=</option> during validate the "not-after" timestamp that was configured with <option>--not-after=</option> during
@ -255,7 +255,7 @@
credential. During decryption the timestamp is checked against the current system clock, and if the credential. During decryption the timestamp is checked against the current system clock, and if the
timestamp is in the past the decryption will fail. By default no such timestamp is set. Takes a timestamp is in the past the decryption will fail. By default no such timestamp is set. Takes a
timestamp specification in the format described in timestamp specification in the format described in
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -275,7 +275,7 @@
media, encryption will fail.</para> media, encryption will fail.</para>
<para>The <option>-H</option> switch is a shortcut for <option>--with-key=host</option>. Similar, <para>The <option>-H</option> switch is a shortcut for <option>--with-key=host</option>. Similar,
<option>-T</option> is a shortcut for <option>-with-key=tpm2</option>.</para> <option>-T</option> is a shortcut for <option>--with-key=tpm2</option>.</para>
<para>When encrypting credentials that shall be used in the initial RAM disk (initrd) where <para>When encrypting credentials that shall be used in the initial RAM disk (initrd) where
<filename>/var/lib/systemd/</filename> is typically not available make sure to use <filename>/var/lib/systemd/</filename> is typically not available make sure to use

View File

@ -2149,7 +2149,7 @@ executable(
install : true, install : true,
install_dir : systemgeneratordir) install_dir : systemgeneratordir)
executable( exe = executable(
'systemd-fstab-generator', 'systemd-fstab-generator',
'src/fstab-generator/fstab-generator.c', 'src/fstab-generator/fstab-generator.c',
include_directories : includes, include_directories : includes,
@ -2158,6 +2158,13 @@ executable(
install : true, install : true,
install_dir : systemgeneratordir) install_dir : systemgeneratordir)
if want_tests != 'false'
test('test-fstab-generator',
test_fstab_generator_sh,
# https://github.com/mesonbuild/meson/issues/2681
args : exe.full_path())
endif
if conf.get('ENABLE_ENVIRONMENT_D') == 1 if conf.get('ENABLE_ENVIRONMENT_D') == 1
executable( executable(
'30-systemd-environment-d-generator', '30-systemd-environment-d-generator',

View File

@ -3,7 +3,7 @@
#include <getopt.h> #include <getopt.h>
#include "main-func.h" #include "main-func.h"
#include "util.h" #include "udev-util.h"
static bool arg_verbose = false; static bool arg_verbose = false;

View File

@ -6,7 +6,6 @@
#include "alloc-util.h" #include "alloc-util.h"
#include "build.h" #include "build.h"
#include "dirent-util.h"
#include "env-file.h" #include "env-file.h"
#include "env-util.h" #include "env-util.h"
#include "fd-util.h" #include "fd-util.h"
@ -115,65 +114,6 @@ void in_initrd_force(bool value) {
saved_in_initrd = value; saved_in_initrd = value;
} }
int on_ac_power(void) {
bool found_offline = false, found_online = false;
_cleanup_closedir_ DIR *d = NULL;
int r;
d = opendir("/sys/class/power_supply");
if (!d)
return errno == ENOENT ? true : -errno;
FOREACH_DIRENT(de, d, return -errno) {
_cleanup_close_ int device_fd = -1;
_cleanup_free_ char *contents = NULL;
unsigned v;
device_fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY|O_CLOEXEC);
if (device_fd < 0) {
if (IN_SET(errno, ENOENT, ENOTDIR))
continue;
return -errno;
}
r = read_virtual_file_at(device_fd, "type", SIZE_MAX, &contents, NULL);
if (r == -ENOENT)
continue;
if (r < 0)
return r;
delete_trailing_chars(contents, NEWLINE);
/* We assume every power source is AC, except for batteries. See
* https://github.com/torvalds/linux/blob/4eef766b7d4d88f0b984781bc1bcb574a6eafdc7/include/linux/power_supply.h#L176
* for defined power source types. Also see:
* https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power */
if (streq(contents, "Battery"))
continue;
contents = mfree(contents);
r = read_virtual_file_at(device_fd, "online", SIZE_MAX, &contents, NULL);
if (r == -ENOENT)
continue;
if (r < 0)
return r;
delete_trailing_chars(contents, NEWLINE);
r = safe_atou(contents, &v);
if (r < 0)
return r;
if (v > 0) /* At least 1 and 2 are defined as different types of 'online' */
found_online = true;
else
found_offline = true;
}
return found_online || !found_offline;
}
int container_get_leader(const char *machine, pid_t *pid) { int container_get_leader(const char *machine, pid_t *pid) {
_cleanup_free_ char *s = NULL, *class = NULL; _cleanup_free_ char *s = NULL, *class = NULL;
const char *p; const char *p;

View File

@ -20,8 +20,6 @@ int prot_from_flags(int flags) _const_;
bool in_initrd(void); bool in_initrd(void);
void in_initrd_force(bool value); void in_initrd_force(bool value);
int on_ac_power(void);
/* Note: log2(0) == log2(1) == 0 here and below. */ /* Note: log2(0) == log2(1) == 0 here and below. */
#define CONST_LOG2ULL(x) ((x) > 1 ? (unsigned) __builtin_clzll(x) ^ 63U : 0) #define CONST_LOG2ULL(x) ((x) > 1 ? (unsigned) __builtin_clzll(x) ^ 63U : 0)

View File

@ -10,6 +10,7 @@
#include "fileio.h" #include "fileio.h"
#include "fstab-util.h" #include "fstab-util.h"
#include "generator.h" #include "generator.h"
#include "in-addr-util.h"
#include "log.h" #include "log.h"
#include "main-func.h" #include "main-func.h"
#include "mkdir.h" #include "mkdir.h"
@ -691,6 +692,57 @@ static int parse_fstab(bool initrd) {
return r; return r;
} }
static int sysroot_is_nfsroot(void) {
union in_addr_union u;
const char *sep, *a;
int r;
assert(arg_root_what);
/* From dracut.cmdline(7).
*
* root=[<server-ip>:]<root-dir>[:<nfs-options>]
* root=nfs:[<server-ip>:]<root-dir>[:<nfs-options>],
* root=nfs4:[<server-ip>:]<root-dir>[:<nfs-options>],
* root={dhcp|dhcp6}
*
* mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use dhcp next_server.
* If server-ip is an IPv6 address it has to be put in brackets, e.g. [2001:DB8::1]. NFS options
* can be appended with the prefix ":" or "," and are separated by ",". */
if (path_equal(arg_root_what, "/dev/nfs") ||
STR_IN_SET(arg_root_what, "dhcp", "dhcp6") ||
STARTSWITH_SET(arg_root_what, "nfs:", "nfs4:"))
return true;
/* IPv6 address */
if (arg_root_what[0] == '[') {
sep = strchr(arg_root_what + 1, ']');
if (!sep)
return -EINVAL;
a = strndupa(arg_root_what + 1, sep - arg_root_what - 1);
r = in_addr_from_string(AF_INET6, a, &u);
if (r < 0)
return r;
return true;
}
/* IPv4 address */
sep = strchr(arg_root_what, ':');
if (sep) {
a = strndupa(arg_root_what, sep - arg_root_what);
if (in_addr_from_string(AF_INET, a, &u) >= 0)
return true;
}
/* root directory without address */
return path_is_absolute(arg_root_what) && !path_startswith(arg_root_what, "/dev");
}
static int add_sysroot_mount(void) { static int add_sysroot_mount(void) {
_cleanup_free_ char *what = NULL; _cleanup_free_ char *what = NULL;
const char *opts, *fstype; const char *opts, *fstype;
@ -708,9 +760,27 @@ static int add_sysroot_mount(void) {
return 0; return 0;
} }
if (path_equal(arg_root_what, "/dev/nfs")) { r = sysroot_is_nfsroot();
if (r < 0)
log_debug_errno(r, "Failed to determine if the root directory is on NFS, assuming not: %m");
else if (r > 0) {
/* This is handled by the kernel or the initrd */ /* This is handled by the kernel or the initrd */
log_debug("Skipping root directory handling, as /dev/nfs was requested."); log_debug("Skipping root directory handling, as root on NFS was requested.");
return 0;
}
if (startswith(arg_root_what, "cifs://")) {
log_debug("Skipping root directory handling, as root on CIFS was requested.");
return 0;
}
if (startswith(arg_root_what, "iscsi:")) {
log_debug("Skipping root directory handling, as root on iSCSI was requested.");
return 0;
}
if (startswith(arg_root_what, "live:")) {
log_debug("Skipping root directory handling, as root on live image was requested.");
return 0; return 0;
} }

View File

@ -108,7 +108,7 @@ fi
[ -z "$MACHINE_ID" ] && MACHINE_ID="Default" [ -z "$MACHINE_ID" ] && MACHINE_ID="Default"
[ -z "$BOOT_ROOT" ] && for suff in "$MACHINE_ID" "loader/entries"; do [ -z "$BOOT_ROOT" ] && for suff in "$MACHINE_ID" "loader/entries"; do
for pref in "/efi" "/boot/efi" "/boot"; do for pref in "/efi" "/boot" "/boot/efi" ; do
if [ -d "$pref/$suff" ]; then if [ -d "$pref/$suff" ]; then
BOOT_ROOT="$pref" BOOT_ROOT="$pref"
break 2 break 2

View File

@ -50,9 +50,9 @@
#include "string-table.h" #include "string-table.h"
#include "string-util.h" #include "string-util.h"
#include "tomoyo-util.h" #include "tomoyo-util.h"
#include "udev-util.h"
#include "uid-alloc-range.h" #include "uid-alloc-range.h"
#include "user-util.h" #include "user-util.h"
#include "util.h"
#include "virt.h" #include "virt.h"
Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) { Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) {

View File

@ -286,6 +286,7 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
.name = "@default", .name = "@default",
.help = "System calls that are always permitted", .help = "System calls that are always permitted",
.value = .value =
"arch_prctl\0" /* Used during platform-specific initialization by ld-linux.so. */
"brk\0" "brk\0"
"cacheflush\0" "cacheflush\0"
"clock_getres\0" "clock_getres\0"
@ -715,7 +716,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
.name = "@process", .name = "@process",
.help = "Process control, execution, namespacing operations", .help = "Process control, execution, namespacing operations",
.value = .value =
"arch_prctl\0"
"capget\0" /* Able to query arbitrary processes */ "capget\0" /* Able to query arbitrary processes */
"clone\0" "clone\0"
"clone3\0" "clone3\0"

View File

@ -579,3 +579,142 @@ int udev_queue_init(void) {
return TAKE_FD(fd); return TAKE_FD(fd);
} }
static int device_is_power_sink(sd_device *device) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
bool found_source = false, found_sink = false;
sd_device *parent, *d;
int r;
assert(device);
/* USB-C power supply device has two power roles: source or sink. See,
* https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-typec */
r = sd_device_enumerator_new(&e);
if (r < 0)
return r;
r = sd_device_enumerator_allow_uninitialized(e);
if (r < 0)
return r;
r = sd_device_enumerator_add_match_subsystem(e, "typec", true);
if (r < 0)
return r;
r = sd_device_get_parent(device, &parent);
if (r < 0)
return r;
r = sd_device_enumerator_add_match_parent(e, parent);
if (r < 0)
return r;
FOREACH_DEVICE(e, d) {
const char *val;
r = sd_device_get_sysattr_value(d, "power_role", &val);
if (r < 0) {
if (r != -ENOENT)
log_device_debug_errno(d, r, "Failed to read 'power_role' sysfs attribute, ignoring: %m");
continue;
}
if (strstr(val, "[source]")) {
found_source = true;
log_device_debug(d, "The USB type-C port is in power source mode.");
} else if (strstr(val, "[sink]")) {
found_sink = true;
log_device_debug(d, "The USB type-C port is in power sink mode.");
}
}
if (found_sink)
log_device_debug(device, "The USB type-C device has at least one port in power sink mode.");
else if (!found_source)
log_device_debug(device, "The USB type-C device has no port in power source mode, assuming the device is in power sink mode.");
else
log_device_debug(device, "All USB type-C ports are in power source mode.");
return found_sink || !found_source;
}
int on_ac_power(void) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
bool found_offline = false, found_online = false;
sd_device *d;
int r;
r = sd_device_enumerator_new(&e);
if (r < 0)
return r;
r = sd_device_enumerator_allow_uninitialized(e);
if (r < 0)
return r;
r = sd_device_enumerator_add_match_subsystem(e, "power_supply", true);
if (r < 0)
return r;
FOREACH_DEVICE(e, d) {
const char *val;
unsigned v;
r = sd_device_get_sysattr_value(d, "type", &val);
if (r < 0) {
log_device_debug_errno(d, r, "Failed to read 'type' sysfs attribute, ignoring: %m");
continue;
}
/* We assume every power source is AC, except for batteries. See
* https://github.com/torvalds/linux/blob/4eef766b7d4d88f0b984781bc1bcb574a6eafdc7/include/linux/power_supply.h#L176
* for defined power source types. Also see:
* https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power */
if (streq(val, "Battery")) {
log_device_debug(d, "The power supply is battery, ignoring.");
continue;
}
/* Ignore USB-C power supply in source mode. See issue #21988. */
if (streq(val, "USB")) {
r = device_is_power_sink(d);
if (r <= 0) {
if (r < 0)
log_device_debug_errno(d, r, "Failed to determine the current power role, ignoring: %m");
else
log_device_debug(d, "USB power supply is in source mode, ignoring.");
continue;
}
}
r = sd_device_get_sysattr_value(d, "online", &val);
if (r < 0) {
log_device_debug_errno(d, r, "Failed to read 'online' sysfs attribute, ignoring: %m");
continue;
}
r = safe_atou(val, &v);
if (r < 0) {
log_device_debug_errno(d, r, "Failed to parse 'online' attribute, ignoring: %m");
continue;
}
if (v > 0) /* At least 1 and 2 are defined as different types of 'online' */
found_online = true;
else
found_offline = true;
log_device_debug(d, "The power supply is currently %s.", v > 0 ? "online" : "offline");
}
if (found_online)
log_debug("Found at least one online non-battery power supply, system is running on AC power.");
else if (!found_offline)
log_debug("Found no offline non-battery power supply, assuming system is running on AC power.");
else
log_debug("All non-battery power supplies are offline, assuming system is running with battery.");
return found_online || !found_offline;
}

View File

@ -53,6 +53,8 @@ int udev_resolve_subsys_kernel(const char *string, char *result, size_t maxsize,
int udev_queue_is_empty(void); int udev_queue_is_empty(void);
int udev_queue_init(void); int udev_queue_init(void);
int on_ac_power(void);
#if HAVE_SYS_SDT_H #if HAVE_SYS_SDT_H
/* Each trace point can have different number of additional arguments. Note that when the macro is used only /* Each trace point can have different number of additional arguments. Note that when the macro is used only

View File

@ -33,6 +33,7 @@
#include "strv.h" #include "strv.h"
#include "tests.h" #include "tests.h"
#include "tomoyo-util.h" #include "tomoyo-util.h"
#include "udev-util.h"
#include "uid-alloc-range.h" #include "uid-alloc-range.h"
#include "user-util.h" #include "user-util.h"
#include "virt.h" #include "virt.h"

View File

@ -12,6 +12,9 @@ if install_tests
install_subdir('test-execute', install_subdir('test-execute',
exclude_files : '.gitattributes', exclude_files : '.gitattributes',
install_dir : testdata_dir) install_dir : testdata_dir)
install_subdir('test-fstab-generator',
exclude_files : '.gitattributes',
install_dir : testdata_dir)
install_subdir('test-path', install_subdir('test-path',
exclude_files : '.gitattributes', exclude_files : '.gitattributes',
install_dir : testdata_dir) install_dir : testdata_dir)
@ -83,6 +86,7 @@ if install_tests
install_dir : testdata_dir) install_dir : testdata_dir)
endif endif
test_fstab_generator_sh = find_program('test-fstab-generator.sh')
test_network_generator_conversion_sh = find_program('test-network-generator-conversion.sh') test_network_generator_conversion_sh = find_program('test-network-generator-conversion.sh')
test_systemd_tmpfiles_py = find_program('test-systemd-tmpfiles.py') test_systemd_tmpfiles_py = find_program('test-systemd-tmpfiles.py')
hwdb_test_sh = find_program('hwdb-test.sh') hwdb_test_sh = find_program('hwdb-test.sh')
@ -127,11 +131,13 @@ if install_tests
install_mode : 'rwxr-xr-x', install_mode : 'rwxr-xr-x',
install_dir : testsdir) install_dir : testsdir)
if conf.get('ENABLE_NETWORKD') == 1 install_data('test-fstab-generator.sh',
install_data('test-network-generator-conversion.sh', install_mode : 'rwxr-xr-x',
install_mode : 'rwxr-xr-x', install_dir : testsdir)
install_dir : testsdir)
endif install_data('test-network-generator-conversion.sh',
install_mode : 'rwxr-xr-x',
install_dir : testsdir)
endif endif
############################################################ ############################################################

38
test/test-fstab-generator.sh Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -ex
if [[ -n "$1" ]]; then
generator=$1
elif [[ -x /usr/lib/systemd/system-generators/systemd-fstab-generator ]]; then
generator=/usr/lib/systemd/system-generators/systemd-fstab-generator
elif [[ -x /lib/systemd/system-generators/systemd-fstab-generator ]]; then
generator=/lib/systemd/system-generators/systemd-fstab-generator
else
exit 1
fi
src="$(dirname "$0")/testdata/test-fstab-generator"
for f in "$src"/test-*.input; do
echo "*** Running $f"
(
out=$(mktemp --tmpdir --directory "test-fstab-generator.XXXXXXXXXX")
# shellcheck disable=SC2064
trap "rm -rf '$out'" EXIT INT QUIT PIPE
# shellcheck disable=SC2046
SYSTEMD_LOG_LEVEL=debug SYSTEMD_IN_INITRD=yes SYSTEMD_PROC_CMDLINE="fstab=no $(cat "$f")" $generator "$out" "$out" "$out"
if [[ -f "$out"/systemd-fsck-root.service ]]; then
# For split-usr system
sed -i -e 's:ExecStart=/lib/systemd/systemd-fsck:ExecStart=/usr/lib/systemd/systemd-fsck:' "$out"/systemd-fsck-root.service
fi
if ! diff -u "$out" "${f%.input}.expected"; then
echo "**** Unexpected output for $f"
exit 1
fi
) || exit 1
done

View File

@ -0,0 +1 @@
* generated

View File

@ -0,0 +1 @@
root=/dev/nfs nfsroot=192.168.0.1:/nfsroot/root1:rw

View File

@ -0,0 +1 @@
root=dhcp

View File

@ -0,0 +1 @@
root=dhcp6

View File

@ -0,0 +1 @@
root=nfs:/nfsroot/root1:rw

View File

@ -0,0 +1 @@
root=nfs4:/nfsroot/root1:rw

View File

@ -0,0 +1 @@
root=192.168.0.1:/nfsroot/root1:rw

View File

@ -0,0 +1 @@
root=[2001:db8::1]:/nfsroot/root1:rw

View File

@ -0,0 +1 @@
root=/nfsroot/root1:rw

View File

@ -0,0 +1 @@
root=cifs://username:password@192.168.0.1:/cifsroot

View File

@ -0,0 +1 @@
root=iscsi:username:password@servername::::tgt

View File

@ -0,0 +1 @@
root=live:http://example.com/liveboot.img

View File

@ -0,0 +1,5 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Requires=dev-sdx1.device
After=dev-sdx1.device

View File

@ -0,0 +1,14 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/proc/cmdline
Before=initrd-root-fs.target
Requires=systemd-fsck-root.service
After=systemd-fsck-root.service
After=blockdev@dev-sdx1.target
[Mount]
What=/dev/sdx1
Where=/sysroot
Options=ro

View File

@ -0,0 +1,16 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Description=File System Check on /dev/sdx1
Documentation=man:systemd-fsck-root.service(8)
DefaultDependencies=no
BindsTo=dev-sdx1.device
Conflicts=shutdown.target
After=initrd-root-device.target local-fs-pre.target dev-sdx1.device
Before=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-fsck /dev/sdx1
TimeoutSec=0

View File

@ -0,0 +1 @@
root=/dev/sdx1

View File

@ -0,0 +1,5 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Requires=dev-disk-by\x2dlabel-Root.device
After=dev-disk-by\x2dlabel-Root.device

View File

@ -0,0 +1,14 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/proc/cmdline
Before=initrd-root-fs.target
Requires=systemd-fsck-root.service
After=systemd-fsck-root.service
After=blockdev@dev-disk-by\x2dlabel-Root.target
[Mount]
What=/dev/disk/by-label/Root
Where=/sysroot
Options=ro

View File

@ -0,0 +1,16 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Description=File System Check on /dev/disk/by-label/Root
Documentation=man:systemd-fsck-root.service(8)
DefaultDependencies=no
BindsTo=dev-disk-by\x2dlabel-Root.device
Conflicts=shutdown.target
After=initrd-root-device.target local-fs-pre.target dev-disk-by\x2dlabel-Root.device
Before=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-fsck /dev/disk/by-label/Root
TimeoutSec=0

View File

@ -0,0 +1 @@
root=LABEL=Root

View File

@ -0,0 +1,5 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Requires=dev-disk-by\x2duuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device
After=dev-disk-by\x2duuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device

View File

@ -0,0 +1,14 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/proc/cmdline
Before=initrd-root-fs.target
Requires=systemd-fsck-root.service
After=systemd-fsck-root.service
After=blockdev@dev-disk-by\x2duuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.target
[Mount]
What=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
Where=/sysroot
Options=ro

View File

@ -0,0 +1,16 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Description=File System Check on /dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
Documentation=man:systemd-fsck-root.service(8)
DefaultDependencies=no
BindsTo=dev-disk-by\x2duuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device
Conflicts=shutdown.target
After=initrd-root-device.target local-fs-pre.target dev-disk-by\x2duuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device
Before=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-fsck /dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
TimeoutSec=0

View File

@ -0,0 +1 @@
root=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7

View File

@ -0,0 +1,5 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Requires=dev-disk-by\x2dpartuuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device
After=dev-disk-by\x2dpartuuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device

View File

@ -0,0 +1,14 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/proc/cmdline
Before=initrd-root-fs.target
Requires=systemd-fsck-root.service
After=systemd-fsck-root.service
After=blockdev@dev-disk-by\x2dpartuuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.target
[Mount]
What=/dev/disk/by-partuuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
Where=/sysroot
Options=ro

View File

@ -0,0 +1,16 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Description=File System Check on /dev/disk/by-partuuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
Documentation=man:systemd-fsck-root.service(8)
DefaultDependencies=no
BindsTo=dev-disk-by\x2dpartuuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device
Conflicts=shutdown.target
After=initrd-root-device.target local-fs-pre.target dev-disk-by\x2dpartuuid-3f5ad593\x2d4546\x2d4a94\x2da374\x2dbcfb68aa11f7.device
Before=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-fsck /dev/disk/by-partuuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
TimeoutSec=0

View File

@ -0,0 +1 @@
root=PARTUUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7

View File

@ -0,0 +1,12 @@
# Automatically generated by systemd-fstab-generator
[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/proc/cmdline
Before=initrd-root-fs.target
[Mount]
What=rootfs
Where=/sysroot
Type=tmpfs
Options=rw

View File

@ -0,0 +1 @@
root=tmpfs

View File

@ -12,7 +12,7 @@ Description=Home Area Manager
Documentation=man:systemd-homed.service(8) Documentation=man:systemd-homed.service(8)
Documentation=man:org.freedesktop.home1(5) Documentation=man:org.freedesktop.home1(5)
After=home.mount After=home.mount dbus.service
[Service] [Service]
BusName=org.freedesktop.home1 BusName=org.freedesktop.home1