Auto mount second HD on boot

The new HD you got online finally arrived. After you open your computer and install it (and after looking for badblocks), you’ll need to mount it automatically on boot.

Type lsblk or mount to find the device (or dmesg if you’re brave). In my case, it was /dev/sdb1

/dev/sdb1 on /media/dth/HD2 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)

Now get the device’s UUID and type with blkid

/dev/sdb1: LABEL="HD2" UUID="0d256b26-1782-4f3f-b192-468464DjhdS7" TYPE="ext4" PARTUUID="290cdbb5-01"

Read more “Auto mount second HD on boot”

USB device encrypted LVM on LUKS

Let’s encrypt an external USB hard disk drive. Get root already and type lsblk. Then insert the USB key and check its name by typing lsblk again. In my case, it was sdb1, but yours might be different. Get yours right, or bad things can happen to your other devices.

[root@slayer dth]# lsblk
NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
...
sdb                       8:16   0   1.8T  0 disk  
└─sdb1                    8:17   0   1.8T  0 part  
...

Read more “USB device encrypted LVM on LUKS”