Edit : I changed the title to be more explicit. I am grateful to this forum that gets my login right and allows me to edit posts when I want to . Its not done on a lot of other sites and its a PITA if you can't edit.
First I'm using xenialpup64-7.5 for this
I plugged in the USB stick and used gparted to clean it and put a new ext4 partition on it with no flags
I then set up an encrypted partition on sde1 like so
Code: Select all
root# dd bs=4K if=/dev/urandom of=/dev/sde1...................to overwrite random stuff.
^Z
[1]+ Stopped dd bs=4K if=/dev/urandom of=/dev/sde1...................could not be bothered waiting
root# cryptsetup -h sha256 -c aes-xts-plain -s 256 luksFormat /dev/sde1
WARNING!
========
This will overwrite data on /dev/sde1 irrevocably.
Are you sure? (Type uppercase yes): YES
Enter passphrase:
Verify passphrase:
root# cryptsetup luksOpen /dev/sde1 myprivate
Enter passphrase for /dev/sde1:
root# mkfs.ext4 /dev/mapper/myprivate
mke2fs 1.44.1 (24-Mar-2018)
Creating filesystem with 3909888 4k blocks and 979200 inodes
Filesystem UUID: e6c73a9c-f406-4766-bdf6-adce5a8432e4
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
root# mkdir /mnt/myprivate
root# mount /dev/mapper/myprivate /mnt/myprivate
root# chown -R root.root /mnt/myprivate.......didn't check may be root already
root#
Now going in Rox to /mnt/myprivate I can add and remove files as I wish. All good.
However if I try to access the usb stick from the lock icon representing sde1 it will not open the partition at all. It wants to keep loading PMount and thats it ?
Now if I close properly as I should
Code: Select all
root# umount /mnt/myprivate
root# cryptsetup luksClose /dev/mapper/myprivate
root#
Then click on the locked icon and enter the passphrase it works and opens that myprivate directory.
Clicking on the little green icon inside does not unmount it . In fact it opens another instance of rox filer.
If I pull the USB stick out it seems to remove the drive icon but the /mnt/myprivate directory is still free and available un-encrypted but there is nothing in it ?
I'm wondering why I cannot unmount from the icon?
I've put up all the other code because perhaps its something I have done wrong .
I am following this page .https://linuxconfig.org/usb-stick-encry ... sing-linux