Accessing a LUKS-encrypted USB drive

Booting, installing, newbie
Post Reply
Message
Author
Belham

Accessing a LUKS-encrypted USB drive

#1 Post by Belham »

Hi all,

I use Linux completely on my various machines, mainly Ubuntu & derivatives across desktops and laptops. I also use, via a USB liveboot stick, both the latest Slacko Puppy and also Barry's Precise Puppy 5.7.1 when I want security accessing my bank, credit card, etc sites.

My question is this: I had another USB stick lying around, so I recently formatted it (this is a separate USB stick from the live Puppy USB stick) in Ubuntu, and used LUKS to encrypt it. I can access this LUKS USB stick in every one of my systems except in both Slacko Puppy and Precise Puppy 5.7.1. Neither will mount the LUKS USB stick. Why?? I figure it must be something stupid simple that I am not doing, but I cannot figure it out.

I tried this approach in Slacko Puppy, I installed cryptsetup vis the terminal entry: sudo apt-get install cryptsetup. Everything went well, and it installed. I then plugged the LUKS encrypted USB stick back and ran the terminal command: sudo cryptsetup luksOpen /dev/sda1 my_encrypted_volume. I hit ENTER, and it seemed to decrypt it, but then I realized it didn't because I am fairly sure Slacko did not even mount this LUKS stick when I first plugged it in. In the Slacko automount utility, it does not see the LUKS stick either. Yet via command line in the terminal, Slacko is showing the LUKS stick is at least there, just not mounted. I could not even make a new directory in Slacko to get it mounted as the command: sudo mkdir /media/my_device is not an acceptable command in Puppy versions like it is overall Ubuntu & derivative versions.

Is there anyway I can get Slacko (or Precise) to mount this LUKS-encrypted USB stick? In Slacko Puppy again, I even tried to install Logical Volume Manager via: sudo apt-get install lvm2, thinking I could go that route, but neither Slacko nor Precise were having anything to do with installing lvm2 and that sudo command.

What am I doing wrong?? Thank you for any help.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#2 Post by Mike Walsh »

Hi, Belham. Welcome to the 'kennels'.

For starters, there's a few differences between Puppy and the 'buntus. No 'sudo'!

Puppy, in case you weren't aware, runs as root all the time under normal conditions. See this link for a more detailed explanation:-

http://barryk.org/puppylinux/technical/root.htm

I know it sounds dreadfully unsafe, but there is method in the 'madness'! If I try to enter 'sudo' anything in any of my Pups, I get something along the lines of '# bash: command not recognized'. I'll be honest, I can't understand how you managed to get it to work at all, since 'sudo' is not in Puppy's 'vocabulary'..!

The only Pups this would work in are the DebianDogs. These are not true Puppies in the normal sense, but rather Debian 'Live' sessions that have been customized to look like Pups. Accordingly, they have full access to the Debian repositories, and the use of 'sudo' is most definitely required.


Mike. :wink:

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#3 Post by SFR »

I can't understand how you managed to get it to work at all, since 'sudo' is not in Puppy's 'vocabulary'..!
As well as 'apt-get' for that matter. Cryptsetup is available via Puppy Package Manager, though.

Ok, assuming you have cryptsetup installed and working:

Code: Select all

cryptsetup luksOpen /dev/sda1 my_encrypted_volume
mkdir /mnt/my_enc_vol
mount /dev/mapper/my_encrypted_volume /mnt/my_enc_vol
That should work, under the condition that your USB drive isn't encrypted with 'twofish' cipher, which (for unknown reason) isn't compiled into Slacko-6.3.0's kernel.
IIRC Precise-5.7.1 doesn't have the necessary modules at all.
You may also want to try Fatdog64, which provides cryptsetup, lvm2 and all the modules OOTB.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Belham

Sorry about the "suod" thing, just habit...

#4 Post by Belham »

Hi Mike and SFR,

Yeah, I know not to use sudo with the puppies, sorry, I just get in the habit after all these years of writing sudo when I write down the commands I used.

SFR, I got the cryptsetup through the package manager, and all seemed to go well (no errors or anything on its install). Also, no twofish here. Where the terminal didn't respond is when I enter the "mkdir /mnt/my_enc_vol" command. The terminal (in the latest Slacko Puppy) did nothing when I entered this, and just went straight back to itself (on a new line) like its waiting for another command.

I'm gonna remove cryptsetup, reinstall it, and give the three commands you wrote a go again. My only purpose in wanting to use that extra USB as a LUKS USB was to store account statements and copies of bills & such. Thus that was the only reason I thought I'd give encryption a go, otherwise I never have reason to mess with encryption.

I'll give it all another go and report back.

Thank you both again for the replies!

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#5 Post by SFR »

Where the terminal didn't respond is when I enter the "mkdir /mnt/my_enc_vol" command. The terminal (in the latest Slacko Puppy) did nothing when I entered this, and just went straight back to itself (on a new line) like its waiting for another command.
This is expected behaviour - lack of any message in this case means that everything went well.
Now you should execute:

Code: Select all

mount /dev/mapper/my_encrypted_volume /mnt/my_enc_vol
and if no errors, all your encrypted stuff should be available at /mnt/my_enc_vol:

Code: Select all

ls /mnt/my_enc_vol
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Post Reply