I've got a second hard drive in my laptop. However, it only mounts itself when I load the GUI and click on the device in Nemo. What I'd like is for it to automount on boot.
sudo lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sdb ├─sdb2 ntfs BIOS_RVY F61C92C71C9281F3 └─sdb1 crypto_LUKS 3df2999e-9b64-46ec-b634-7986877c57f5 └─luks-3df2999e-9b64-46ec-b634-7986877c57f5 ext4 32c29f17-28fd-4288-8680-2fc62027586a /run/media/bill/32c29f17-28fd-4288-8680-2fc62027586a sr0 sda ├─sda4 ntfs WinRE tools 0CDA8AEEDA8AD2FE ├─sda2 ├─sda5 crypto_LUKS 28c449da-d8ba-42be-8a4e-17822270b7bd │ └─luks-28c449da-d8ba-42be-8a4e-17822270b7bd LVM2_member LQR013-0T1K-E5QL-8sVa-94rN-C8cE-Agfbtn │ ├─fedora-root ext4 047ddca4-cfb8-4307-9c86-a8de31c0bc68 / │ ├─fedora-swap swap 18e032b2-eb2c-485c-97ce-b500c675dfda [SWAP] │ └─fedora-home ext4 19caa2b4-d5a3-4c0d-bd76-c11ec303dd0c /home ├─sda3 ext4 f11b0191-49b9-41c2-a8f2-f26851442b17 /boot └─sda1 vfat SYSTEM 1288-7285 /boot/efi (Ignore the NTFS partitions, these are the recovery partitions from the original OEM WIndows setup, just in case I ever want to restore it to factory.)
My fstab is:
/dev/mapper/fedora-root / ext4 defaults,x-systemd.device-timeout=0 1 1 UUID=f11b0191-49b9-41c2-a8f2-f26851442b17 /boot ext4 defaults 1 2 UUID=1288-7285 /boot/efi vfat umask=0077,shortname=winnt 0 2 /dev/mapper/fedora-home /home ext4 defaults,x-systemd.device-timeout=0 1 2 /dev/mapper/fedora-swap swap swap defaults,x-systemd.device-timeout=0 0 0 /extraswap none swap sw 0 0 and crypttab is
luks-28c449da-d8ba-42be-8a4e-17822270b7bd UUID=28c449da-d8ba-42be-8a4e-17822270b7bd none discard luks-3df2999e-9b64-46ec-b634-7986877c57f5 UUID=3df2999e-9b64-46ec-b634-7986877c57f5 none luks Both drives are encrypted with the same passphrase, and I only have to enter it once during boot. I tried adding the following to fstab
/dev/mapper/luks-3df2999e-9b64-46ec-b634-7986877c57f5 /run/media/bill/32c29f17-28fd-4288-8680-2fc62027586a ext4 defaults 0 2 However, it got an error on boot. My guess is that it's something to do with LVM and I need to add a reference in there?
/var/runshouldn't be used for static mounts. Create a directory beneath/mntbymkdir -p /mnt/mydiskand replace/run/media/bill/32c29f17-28fd-4288-8680-2fc62027586aby/mnt/mydiskin the/etc/fstab.