| 1 |
'\" t |
| 2 |
.TH "SYSTEMD\-VALIDATEFS@\&.SERVICE" "8" "" "systemd 261~rc3" "[email protected]" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
[email protected] \- Validate File System Mount Constraint Data |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.PP |
| 26 |
systemd\-validatefs@\&.service |
| 27 |
.PP |
| 28 |
/usr/lib/systemd/systemd\-validatefs |
| 29 |
[\fIDEVICE\fR] |
| 30 |
.SH "DESCRIPTION" |
| 31 |
.PP |
| 32 |
systemd\-validatefs@\&.service |
| 33 |
is a system service template that can be instantiated for newly established mount points\&. It reads file system mount constraint data from the file system, and ensures the mount runtime setup matches it\&. If it doesn\*(Aqt the service fails, which effects an immediate reboot\&. |
| 34 |
.PP |
| 35 |
This functionality is supposed to ensure that trusted file systems cannot be used in a different context then what they were intended for\&. More specifically: in an |
| 36 |
\fBsystemd-gpt-auto-generator\fR(8) |
| 37 |
based environment the file systems to mount are largely auto\-discovered based on (unprotected) GPT partition table data\&. The mount constraint information can be used to validate the GPT partition data, based on the (protected) file system contents\&. |
| 38 |
.PP |
| 39 |
Specifically, the mount constraints are encoded in the following extended attributes on the root inode of the file systems: |
| 40 |
.sp |
| 41 |
.RS 4 |
| 42 |
.ie n \{\ |
| 43 |
\h'-04' 1.\h'+01'\c |
| 44 |
.\} |
| 45 |
.el \{\ |
| 46 |
.sp -1 |
| 47 |
.IP " 1." 4.2 |
| 48 |
.\} |
| 49 |
\fIuser\&.validatefs\&.mount_point\fR: this extended attribute shall contain one or more absolute, normalized paths, separated by NUL bytes\&. If set and the specified file system is mounted to a location not matching any of the listed paths the validation check will fail\&. |
| 50 |
.RE |
| 51 |
.sp |
| 52 |
.RS 4 |
| 53 |
.ie n \{\ |
| 54 |
\h'-04' 2.\h'+01'\c |
| 55 |
.\} |
| 56 |
.el \{\ |
| 57 |
.sp -1 |
| 58 |
.IP " 2." 4.2 |
| 59 |
.\} |
| 60 |
\fIuser\&.validatefs\&.gpt_label\fR: this extended attribute may contain one or more free\-form strings, separated by NUL bytes\&. If set, all backing partitions of the file system are checked against this list, and if any backing partition\*(Aqs label is not listed, the validation will fail\&. Note that there may be multiple backing partition in case of Verity setups, which combines a data and a hash partition\&. |
| 61 |
.RE |
| 62 |
.sp |
| 63 |
.RS 4 |
| 64 |
.ie n \{\ |
| 65 |
\h'-04' 3.\h'+01'\c |
| 66 |
.\} |
| 67 |
.el \{\ |
| 68 |
.sp -1 |
| 69 |
.IP " 3." 4.2 |
| 70 |
.\} |
| 71 |
\fIuser\&.validatefs\&.gpt_type_uuid\fR: this extended attribute may contain one or more GPT partition type UUIDs, formatted as string, separated by NUL bytes\&. As above, all backing partitions of the file system are checked against this list, and if none is matching the validation will fail\&. |
| 72 |
.RE |
| 73 |
.PP |
| 74 |
The |
| 75 |
systemd\-validatefs@\&.service |
| 76 |
unit is automatically pulled into the initial transaction by |
| 77 |
\fBsystemd-gpt-auto-generator\fR(8) |
| 78 |
for all file systems it discovers and generates mounts for\&. |
| 79 |
\fBsystemd-fstab-generator\fR(8) |
| 80 |
will do this for all mounts with the |
| 81 |
\fBx\-systemd\&.validatefs\fR |
| 82 |
mount option in |
| 83 |
/etc/fstab\&. |
| 84 |
.PP |
| 85 |
The |
| 86 |
\fBsystemd-repart\fR(8) |
| 87 |
tool generates these extended attributes automatically for the file systems it puts together, which may be controlled with the |
| 88 |
\fIAddValidateFS=\fR |
| 89 |
configuration option\&. |
| 90 |
.SH "OPTIONS" |
| 91 |
.PP |
| 92 |
The |
| 93 |
/usr/lib/systemd/systemd\-validatefs |
| 94 |
executable may also be invoked from the command line, where it expects a path to a mount and the following options: |
| 95 |
.PP |
| 96 |
\fB\-\-root=\fR |
| 97 |
.RS 4 |
| 98 |
Takes an absolute path or the special string |
| 99 |
"auto"\&. The specified path is removed as prefix from the specified mount point argument before the validation\&. If set to |
| 100 |
"auto" |
| 101 |
defaults to unspecified on the host and |
| 102 |
/sysroot/ |
| 103 |
when run in initrd context, in order to validate the mount constraint data relative to the future file system root\&. |
| 104 |
.sp |
| 105 |
Added in version 258\&. |
| 106 |
.RE |
| 107 |
.PP |
| 108 |
\fB\-h\fR, \fB\-\-help\fR |
| 109 |
.RS 4 |
| 110 |
Print a short help text and exit\&. |
| 111 |
.RE |
| 112 |
.PP |
| 113 |
\fB\-\-version\fR |
| 114 |
.RS 4 |
| 115 |
Print a short version string and exit\&. |
| 116 |
.RE |
| 117 |
.SH "SEE ALSO" |
| 118 |
.PP |
| 119 |
\fBsystemd\fR(1), \fBsystemd-gpt-auto-generator\fR(8), \fBsystemd-fstab-generator\fR(8), \fBsystemd-repart\fR(8) |