Skip to content

Commit

Permalink
installation/guides/chroot: improve the fstab section
Browse files Browse the repository at this point in the history
- explain how to change mount options
- align examples to what the installer does
- minor wording and order changes
  • Loading branch information
r-ricci committed Jun 22, 2023
1 parent 6de5639 commit bef318c
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/installation/guides/chroot.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ generated from currently mounted filesystems by copying the file `/proc/mounts`:

Remove lines in `/etc/fstab` that refer to `proc`, `sys`, `devtmpfs` and `pts`.

The partition scheme used throughout previous examples yields the following
`fstab`:

```
/dev/sda1 /boot/efi vfat rw,relatime,[...] 0 0
/dev/sda2 / ext4 rw,relatime,[...] 0 0
```

Note: The output of `/proc/mounts` will have a single space between each field.
The columns are aligned here for readability.

Replace references to `/dev/sdXX`, `/dev/nvmeXnYpZ`, etc. with their respective
UUID, which can be found by running
[blkid(8)](https://man.voidlinux.org/blkid.8). Referring to filesystems by their
Expand All @@ -211,28 +222,21 @@ essential. In other situations, disks will always have the same name unless
drives are physically added or removed. Therefore, this step may not be strictly
necessary, but is almost always recommended.

Customize the mount options if desired. A list of available options can be found
in [mount(8)](https://man.voidlinux.org/mount.8) and in filesystem-specific
manual pages.

Change the last zero of the entry for `/` to `1`, and the last zero of every
other line to `2`. These values configure the behaviour of
[fsck(8)](https://man.voidlinux.org/fsck.8).

For example, the partition scheme used throughout previous examples yields the
following `fstab`:

```
/dev/sda1 /boot/efi vfat rw,relatime,[...] 0 0
/dev/sda2 / ext4 rw,relatime 0 0
```

The information from `blkid` results in the following `/etc/fstab`:
For example:

```
UUID=6914[...] /boot/efi vfat rw,relatime,[...] 0 2
UUID=dc1b[...] / ext4 rw,relatime 0 1
UUID=6914[...] /boot/efi vfat defaults 0 2
UUID=dc1b[...] / ext4 defaults 0 1
```

Note: The output of `/proc/mounts` will have a single space between each field.
The columns are aligned here for readability.

Add an entry to mount `/tmp` in RAM:

```
Expand All @@ -242,7 +246,7 @@ tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
If using swap space, add an entry for any swap partitions:

```
UUID=1cb4[...] swap swap rw,noatime,discard 0 0
UUID=1cb4[...] none swap defaults 0 0
```

## Installing GRUB
Expand Down

0 comments on commit bef318c

Please sign in to comment.