Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 23 Aug 2019, 00:22
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Accessing a LUKS-encrypted USB drive
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
Belham

Joined: 07 Jan 2016
Posts: 133

PostPosted: Tue 19 Jan 2016, 07:49    Post subject:  Accessing a LUKS-encrypted USB drive  

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.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5274
Location: King's Lynn, UK.

PostPosted: Tue 19 Jan 2016, 11:16    Post subject:  

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

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1727

PostPosted: Tue 19 Jan 2016, 11:50    Post subject:  

Quote:
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:
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!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Belham

Joined: 07 Jan 2016
Posts: 133

PostPosted: Tue 19 Jan 2016, 13:21    Post subject: Sorry about the "suod" thing, just habit...  

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!
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1727

PostPosted: Tue 19 Jan 2016, 13:48    Post subject:  

Quote:
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:
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:
ls /mnt/my_enc_vol

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0674s ][ Queries: 12 (0.0323s) ][ GZIP on ]