blob: 88521a66d9084d004b5539e4875c9bd78e616564 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
.Dd September 27, 2026
.Dt GENFSTAB 8
.Os
.Sh NAME
.Nm genfstab
.Nd write an fstab for what is mounted
.Sh SYNOPSIS
.Nm
.Op Fl d
.Ar mountpoint
.Sh DESCRIPTION
.Nm
prints an
.Xr fstab 5
for the file systems mounted at and below
.Ar mountpoint ,
with paths relative to it.
Pseudo file systems and loop devices are left out.
Every swap partition the running system can see is added, and so are
fixed lines for
.Pa /dev/pts ,
.Pa /dev/shm
and the EFI variables.
.Pp
File systems are named by UUID, so the table keeps working when disks
are renamed.
.Pa /boot/efi
is mounted
.Cm nodev , noexec
and
.Pa /tmp
.Cm nosuid , nodev ;
everything is
.Cm noatime .
.Bl -tag -width Ds
.It Fl d
Name file systems by device path, such as
.Pa /dev/nvme0n1p2 ,
instead of UUID.
.El
.Sh EXAMPLES
In the installer:
.Dl # genfstab /mnt > /mnt/etc/fstab
.Pp
On a running system, to copy lines from:
.Dl # genfstab / > /etc/fstab.new
.Sh SEE ALSO
.Xr fstab 5 ,
.Xr installation 7
.Sh CAVEATS
Run from a system that has swap of its own, the swap lines include it.
|