DEV Community

Asif Zubayer Palak
Asif Zubayer Palak

Posted on

2

How to mount a drive at boot in Arch Linux

If you have a removable drive and you don't want to manually mount every time you boot your PC, you can easily set it up to automatically mount every time your PC boots up.

Gathering the required info

In order to set up the auto mount, you need to know several things such as:

  • the drive partition directory
  • mount point
  • UUID
  • File System or FS
  1. To find these information, run
lsblk -f
Enter fullscreen mode Exit fullscreen mode

on your terminal.

You will get something like this:
Image description

  1. Look for your desired partition directory such as sdc1 or sdb1 and take note of the FSTYPE and copy the UUID.

  2. Next, you will need to create a mount point by running this command:

sudo mkdir /run/media/user/directory_name
Enter fullscreen mode Exit fullscreen mode

where user is your username and directory_name is what you want the partition to be called.

  1. Once done, use vim/nano or any other text editor to open /etc/ftsab

  2. It will look something like this:

Image description

  1. Create a new line and add the following entry
# /dev/your_partition_directory

UUID=(copied UUID here)  mount_point(eg: /run/media/user/partition) filetype(eg: ntfs or ext4) rw,relatime
Enter fullscreen mode Exit fullscreen mode
  1. Match the format with the example image above and then save and exit.

  2. Reboot your pc and check if the partitions are automatically mounted.

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

Best practices for optimal infrastructure performance with Magento

Running a Magento store? Struggling with performance bottlenecks? Join us and get actionable insights and real-world strategies to keep your store fast and reliable.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️