Auto-Mounting Secondary Drives

Attention: You may lose data on the drive(s) or result in a unbootable system if configured improperly.

Follow this guide at your own discretion and make sure to read the entire document relevant to your method, so you do not miss anything!

Note: Handheld/HTPC images will auto-mount microSD cards without any manual intervention required.


Formatting a disk

Warning: This will wipe all existing data on it

Use a disk graphical user interface like KDE Plasma or GNOME Disks to format your drive. We recommend formatting secondary drives to btrfs or ext4.

Note when formatting in KDE Partition Manager

Make sure you set permissions to everyone.

Creating a secondary drive directory and where to mount drives?

Note: Drive directories should be lowercase with no spaces for best practice.

Attention: /var/run/mnt should NOT be the path, but create a new directory in either /var/mnt or /var/run/media/.

  • /var/mnt/... for permanent drives
  • /var/media/... for removable drives

You can make a directory in /var/mnt/ by opening a host terminal and entering this command in a host terminal:

cd /var/mnt
sudo mkdir /var/mnt/games

The drive will now be mounted in a directory known as games.

Note: games can be named anything you desire that fits best practices.

Permissions for the drive

sudo chown $USER:$USER /var/mnt/games

Note: If you plan to reformat the partition, remember to edit the mount point and “Remove” the mount path before you reformat! If not you will have to manually edit /etc/fstab.

Graphical User Interface (GUI) Methods

Warning: Do not set up auto-mount, unmount then format a drive! It can confuse the software you are configuring drives with. Instead, remove the auto-mount first before formatting the drive.

KDE Partition Manager

KDE

This is pre-installed on KDE images.

Instructions

  1. Open KDE Partition Manager
  2. Locate the disk and partition you want to mount
  3. Right click on the partition and click “Edit Mount Point”
  4. Select “Identify by: UUID” (This will guarantee you mount THIS partition instead of a different one if the device nodes change for some reason)
  5. Select a mounting path:
    5a. You would want to use /var/mnt/games or something similar for permanent mounts
  6. Select “No update of file access times” and optionally select “Users can mount and unmount”
  7. Click “More…” and add extra options depending on what filesystem is on the partition
  8. Click OK on both windows to save the mount points.
  9. Open the terminal to test the mounts by running the command:
sudo systemctl daemon-reload && sudo mount -a
  1. If no errors appeared then it should be safe to reboot.

Note: If errors occur, then research the error and undo what you did and try again. Redo the previous two steps in the terminal (see CLI method down below and research how to use fstab) as KDE Partition Manager might not give a good error to search for if the test mount fails.

Display Name should be added too. Name it whatever you want it to be identified as.

Required additional options depending on filesystem

Use the below generic options depending on your filesystem (these are just good defaults)
You can copy+paste these into the “More…” dialog and they will be valid

KDE_Checks
Checks for all filesystems.

Note: “Users can mount and unmount” is an optional setting.

Filesystem arguments

Warning: If a drive is formatted, then do not remove it from /etc/fstab, so the “nofail” option is a must to avoid issues with booting.

KDE_btrfs
example: btrfs requires these additional options.

BTRFS:
noatime,lazytime,commit=120,compress-force=zstd:3,space_cache=v2,nofail,rw,exec
Ext4:
defaults,noatime,errors=remount-ro,nofail,rw,exec
NTFS:
defaults,noatime,nofail,rw,exec

Note: Do not use the NTFS filesystem for game library storage in Bazzite, and it is not supported and you will get lots of issues with it. NTFS is not intended as a game drive for Bazzite.

Advanced Options

Information about compression:

3 is a good balance, older CPUs should use 1.

Information about subvolumes:

use subvol=name as an option, KDE and GNOME Disks let you only mount 1 subvolume through the GUI, you can mount the root with subvol=/ if a default subvolume is configured in the filesystem.

Installing KDE Partition Manager on non-KDE images

If you would like to install this, then it can be layered to your system by entering in a terminal:

rpm-ostree install kde-partitionmanager

Reboot your system after it has finished installing the terminal.

GNOME Disks

GNOME

This comes pre-installed on GNOME images.

Instructions

  1. Open GNOME Disks (gnome-disk-utility)
  2. Locate the disk and partition you want to mount
  3. Click the cog icon on the partition
  4. Select “Edit Mount Options”
  5. Turn off “User Session Default”
  6. Check:
    a) Mount at system startup
    b) Show in user interface
  7. In the space where this is no label: nosuid,nodev,nofail,x-gvfs-show, (refer to the correct filesystem below for more options)
  8. /var/mnt/games (or whatever directory you made)
  9. auto
  10. Select “Take Ownership”
  11. Open the terminal to test the mounts by running the command:
sudo systemctl daemon-reload && sudo mount -a
  1. If no errors appeared then it should be safe to reboot.

Note: If errors occur, then research the error and undo what you did and try again. Redo the previous two steps in the terminal as GNOME Disks might not give a good error to search for if the test mount fails.

Display Name should be added too. Name it whatever you want it to be identified as.

Filesystem Arguments

Warning: If a drive is formatted, then do not remove it from /etc/fstab, so the “nofail” option is a must to avoid issues with booting.

BTRFS:
noatime,lazytime,commit=120,compress-force=zstd:3,space_cache=v2,nofail,rw,exec
Ext4:
defaults,noatime,errors=remount-ro,nofail,rw,exec
NTFS:
defaults,noatime,nofail,rw,exec

Note: Do not use the NTFS filesystem for game library storage in Bazzite, and it is not supported and you will get lots of issues with it. NTFS is not intended as a game drive for Bazzite.

Permissions for the drive

sudo chown $USER:$USER /mnt/games

Advanced Options

Information about compression:

3 is a good balance, older CPUs should use 1.

Information about subvolumes:

use subvol=name as an option, KDE and GNOME Disks let you only mount 1 subvolume through the GUI, you can mount the root with subvol=/ if a default subvolume is configured in the filesystem

Installing GNOME Disks on non-GNOME images

If you would like to install this, then it can be layered to your system by entering in a terminal:

rpm-ostree install gnome-disk-utility

Reboot your system after it has finished installing the terminal.

Alternative Methods (CLI)

There are also two command-line interface (CLI) methods.

  1. Using systemd.mount

  2. Editing the /etc/fstab file

CLI methods are intended for advanced users, and it is recommended to research one of the two methods elsewhere.


Documentation Contributors: HikariKnight

View all Bazzite documentation

1 Like

I think the ext4 mount options may need to be amended from errors=ro to errors=remount-ro. Just hit this issue myself.

2 Likes

Thanks, I fixed it now.

I’ve been attempting to reformat my drives(with data from windows) and when I go to remove the mount point on a partition, KDE partition manager just crashes. I tried googling it and I couldn’t finding anything.

Any help would be greatly appreciated, thank you

You can try installing gparted with rpm-ostree install gparted.

Alternatively, you can try manually editing the file system table with sudo nano -B /etc/fstab (the -B is for backup). Just put in UUID=<UUID> <mount-point> btrfs defaults 0 0 should be fine.

You can look up on ChatGPT or read the Arch Wiki for how to format and mount partitions by their UUID from terminal. Keep everything as default, just adjust the UUID and mount point.

(I personally prefer mount point at home at ~/Storage/<folder-name> but that’s just personal preference - more commonly, you mount at root’s /mnt/ as mounting in /media/ makes it treated as removable drives.)

I’m very new to Linux, and this is, more or less, my first distro. So I was wondering, what type of file is a mount point? Is it a folder? A text file?

In short, mount point is where you tell Linux is the ‘start’ of your partition. What “mounting” does is to tell the system “hey, I want folder A (mount-point) to actually access folder B”.

The mounting process is basically like plugging a flash drive, telling it to use E: instead of other letters, and then telling the PC that yes you want to be able to edit files from that flash drive.

Details

In detail: in Linux, we don’t have C: or D: drive/partition - everything starts from / which is why it’s called ‘root’. And, in a way, everything is a folder or a file in Linux, we just need it translated into something we can use.

In this case, the system actually already have all your drives and partitions in /dev folder. It’s just that, without the right settings and configuration, the system never bothers exposing it to the user or even allowing the user to read/write the partition.

Now, you can do a mount command to manually make it usable, but we also have the /etc/fstab file which automates the process at boot*. In addition to where it’s pointed at, you can also define other behaviors for the device (say, you don’t want user to be able to have write access, or for it to not update file access records).

*be aware that misconfiguring the file will prevent the system to boot to your graphical session - this can be fixed pressing Ctrl + D (or whatever it tells you to do) to become root user (Admin, Super User) and then doing nano /etc/fstab to edit the file. You can then reboot.

If you DO want to edit fstab manually, read up the Arch wiki link I gave, and make sure you can unmount & remount the partition in FIle Manager before you reboot.

All this is to say that: since you’re very very new, ignore my advice about editing /etc/fstab; just follow the guide and:

  1. Make a folder either at /mnt, or somewhere in /home/$USER.
  2. Use gparted or KDE partition manager. If one doesn’t work, you can install the other.
  3. Right click partition, choose mount point or mount options (or something to that effect - forgot the exact name).
  4. After you’ve put in the the folder to mount it at, right click the partition, choose mount
  5. Open file manager, go to the mount folder. You can check if it’s mounted by:
    a.) the icon in the left sidebar showing mounted folders;
    b.) look at bottom right for free space - it should automatically adjust when you’re in a mounted folder
  6. If it’s mounted right, then do a sudo chown -Rv $USER:$USER /path/to/mount-point to make sure you have ownership of all its files and folders.

I appreciate these instructions, I followed the kde partition manager instructions, ran

sudo systemctl daemon-reload && sudo mount -a

Then I got the output of

mount: /var/mnt/1tbsata: fsconfig system call failed: ext4: Unexpected value for ‘discard’.
dmesg(1) may have more information after failed mount system call.

So what now? Where do I find dmesg(1)

Update: I’m seeing the issue may be with the discard=async that was one of the “more” commands?

Yeah that is removed from the docs. Thanks for pointing that out.

What should I put instead?

I edited the btrfs arguments. everything but that discard=async portion.