16.04 - How to find UUID for setting up LUKS with keyfile protection for external drive - Ask Ubuntu
i have external drives setup luks + password. increase security password + keyfile. internal storage seems trivial i'm not sure how approach external drive. /dev/sdx
seems poor choice external drives , can't find uuid usb-drive.
i've tried:
blkid
- gives uuid local luks drives e.g. `/dev/sdc1' not of external drives luks- the
sudo dmsetup deps -o devname
returns drives e.g.(sde)
,(sdc1)
no uuid. cat /proc/mounts
gives me luks mappers mounted not more detailed.- i've tried unmounting drive didn't , drive seems still mapped in
/dev/mapper
using lsblk suggested alexp
the lsbslk
output give uuid isn't trivial interpret:
name maj:min rm size ro type mountpoint name mountpoint uuid sda 8:0 0 477g 0 disk sda ├─sda1 8:1 0 512m 0 part /boot/efi ├─sda1 /boot/efi f2bb-f970 ├─sda2 8:2 0 412,5g 0 part / ├─sda2 / 4d1c2b61-d9eb-4a3f-b4cf-fae15479670c └─sda3 8:3 0 63,9g 0 part └─sda3 31b267cb-c89f-4662-a68b-74667fb26b48 └─cryptswap1 252:0 0 63,9g 0 crypt [swap] └─cryptswap1 [swap] b854bc4f-e822-4917-9373-18eba9b2eb35 ... sde 1a3d7d94-373e-4087-aadd-0b3ce09078b5 └─luks-1a3d7d94-373e-4087-aadd-0b3ce09078b5 252:4 0 16,4t 0 crypt /media/musr/ext_icy └─luks-1a3d7d94-373e-4087-aadd-0b3ce09078b5 /media/musr/ext_icy 42d1104f-3a51-4950-ac70-f3ea1148760c
it looks there 2 uuid's reported sde
- 1 drive , 1 mounted luks
sudo lsblk -o +name,mountpoint,uuid
the sudo
important show unmounted partitions.
disks don't have uuids, partitions do. uuids metadata need stored on partition in format understood system. system understands uuid of partitions formatted ext3, ext4, swap, luks, fat, lvm , on. on disks use relatively new gpt partition table, partitions have partuuid
stored in partition table, , can access them entries in /dev/disk/by-partuuid/
.
Comments
Post a Comment