The commands I invoke are the following
- Create image file
dd if=/dev/zero of=benj.luks bs=1k count=666000
- Set up LUKS container
cryptsetup luksFormat benj.luks
- Set up loop device and open the LUKS container
cryptsetup luksOpen benj.luks benjImage
- Check that the loop device has been set up and mapped
lsblk
Output
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 650.4M 0 loop
└─benjImage 254:1 0 634.4M 0 crypt
- Create file system ext4 on benjImage
sudo mkfs.ext4 -b 2048 -F -F /dev/mapper/benjImage
Command fails
mke2fs 1.46.5 (30-Dec-2021)
mkfs.ext4: Invalid argument while setting blocksize; too small for device