Grimoire-
Command
.es

GNU+Linux command memo

Format ciphered ext4 USB key

Formater une nouvelle clé USB chiffrée, en ext4 pour Linux.

# # plug-in the storage peripheral
# cfdisk /dev/sdb (1)
# cryptsetup luksFormat /dev/sdb1 (2)
# cryptsetup open /dev/sdb1 cle (3)
# mkfs.ext4 -v -L 'Étiquette' -b 4096 -E stride=128,stripe-width=256 /dev/mapper/cle (4)
# # click in Thunar to mount the volume
# chmod -R 777 /run/media/$user/Étiquette (5)
# umount /dev/mapper/cle (6)
# cryptsetup close /dev/mapper/cle (7)
# # plug-off the storage peripheral
1 Create a partition via this text-based curses program
2 Format the partition as a LUKS container
3 Mount the LUKS container as a /dev/mapper peripheral
4 Format the container as an Ext4 filesystem
5 Lazy step : set permissions to "free for all" to share the disk with different users
6 umount the Ext4 partition
7 close the LUKS container