genfstab(1)

genfstab1

Script to generate an fstab file based on mounted partitions

Usage

genfstab [options] root

Options

-f FILTER

Restrict output to mountpoints matching the prefix FILTER

-L

Use labels for source identifiers (shortcut for -t LABEL)

-p

Exclude pseudofs mounts (default behavior)

-P

Include pseudofs mounts

-t TAG

Use TAG for source identifiers. Common options for TAG include: LABEL, UUID, PARTLABEL, PARTUUID

-U

Use UUIDs for source identifiers (shortcut for -t UUID)

-h

Print the help message

Overview

One can use genfstab to generate fstab entries for mounted partitions given a filesystem root. This can be useful when installing or chrooting into a broken installation.

Examples

To generate an fstab file using UUIDs as identifiers, run:

genfstab -U /media/testing >> /media/testing/etc/fstab

From arch-install-scripts 21-1 in Debian 10 (Buster). Parsed by carta from the page's man source.