Professional Documents
Culture Documents
Mount Drive in Linux and Set Auto-Mount at Boot - Tech Knowledge Base - Jaytaala - Com Confluence
Mount Drive in Linux and Set Auto-Mount at Boot - Tech Knowledge Base - Jaytaala - Com Confluence
What do you think? Discuss, post comments, or ask questions at the end of this article [More
about me]
!"
#$%
&'(
)*(
$+(
$#,-
$&.
*%-
#%"
/0"
#$%
-%1
""%
Created by Jay Ta'ala, last modified on Nov 02, 2021
Mount drive
Make a folder (will be mount point)
Auto-mount at boot
We want the drive to auto-mount at boot. This usually means editing /etc/fstab.
Firstly, it's always best to use the drives UUID. To find the drive's UUID do
ls -al /dev/disk/by-uuid/
Copy the resultant UUID (for your disk) and then open fstab for editing (note I'm using vim here but use whatever editor
you prefer):
You want to add an entry for the UUID and mount point. Below is an example of an fstab file with an entry added for the
mount above:
1 de 4 15/11/21 13:05
Mount drive in linux and set auto-mount at boot - Tech Knowledge Base -... https://confluence.jaytaala.com/display/TKB/Mount+drive+in+linux+an...
Test fstab
We always want to test the fstab before rebooting (an incorrect fstab can render a disk unbootable). To test do:
findmnt --verify
check the last line for errors. Warnings can help in improving your fstab.
Related articles
Mount drive in linux and set auto-mount at boot
Logging remote ip address when using reverse proxy
Give password-less sudo to a user
Setup SSH with OpenSSH
GoAccess for apache log statistics
ubuntu kb-how-to-article
12 Comments
Type Comment Here (at least 3 chars)
2 de 4 15/11/21 13:05
Mount drive in linux and set auto-mount at boot - Tech Knowledge Base -... https://confluence.jaytaala.com/display/TKB/Mount+drive+in+linux+an...
| Reply
Replace xxx with the UUD for the drive. See this post on stackexchange for more info.
| Reply
| Reply
| Reply
Note that it is a bad practice to use mount -a for fstab checking. The recommended solution is findmnt --verify
| Reply
| Reply
After reboot partition getting lost and failing with below error
3 de 4 15/11/21 13:05
Mount drive in linux and set auto-mount at boot - Tech Knowledge Base -... https://confluence.jaytaala.com/display/TKB/Mount+drive+in+linux+an...
] Dependency failed for /rooot/boot. [DEPEND] Dependency failed for Local File Systems. [DEPEND] Dependency failed
for Mark the need to relabel after reboot.
I am wondering how rooot is populating here, could you please help here to proceed further.Thanks in advance !
| Reply
| Reply
4 de 4 15/11/21 13:05