LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-28-2008, 11:06 AM   #1
hansv
LQ Newbie
 
Registered: Apr 2007
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
Encrypted filesystem won't mount because of different version of losetup


Do my learned fellow linux enthousiasts know if there are different versions of losetup which are incompatible with each other?

I encounter the following:

I have two Linux distro's on my laptop.
1) Slackware 12.0, my main distro for use every day, all day
2) Ubuntu 7.10, to see if it is really user friendly.

I have a partition on my laptop on which I have created a encrypted (loopback) filesystem.

On slackware I can mount this with:
# losetup -e aes /dev/loop0 /dev/hda2
# mount .....

when I follow the exact same procedure on Ubuntu the mount fails with "unknown file system"
  • I have tried specifying different key lengths using the -k parameter (none work)
  • I can setup a new encrypted loopback filesystem on Ubuntu (which I then cannot read in Slackware).
  • The 'losetup' commands are different (accept different parameters)
  • when I mount my Slackware partition and use /slackpart/sbin/losetup I can mount the partition correctly. (So cryptoloop module and crypto subsystems are compatible between Slackware and Ubuntu.

Does anyone know if there are, in fact, different and incompatible versions of losetup and why these incompatibilities exist giving that in the end, they use the same cryptoloop and crypto modules.


Regards,
Hans Voss.
 
Old 01-28-2008, 12:10 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by hansv View Post

when I follow the exact same procedure on Ubuntu the mount fails with "unknown file system"

Does anyone know if there are, in fact, different and incompatible versions of losetup and why these incompatibilities exist giving that in the end, they use the same cryptoloop and crypto modules.
I don't think that you have incompatible versions of losetup. The problem is most likely that you are using the wrong file system type in your mount command.

--------------------
Steve Stites
 
Old 01-29-2008, 02:14 AM   #3
hansv
LQ Newbie
 
Registered: Apr 2007
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
No, its not the mount command or the file system type.

I have used the mount command with and without specifying the proper file system (ext3).
And like I said, if I use the other version of losetup, everything just works. (without fs specification).
 
Old 01-30-2008, 08:18 PM   #4
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
The (text) file

http://loop-aes.sourceforge.net/ciphers.README

mentions some compatibility issues between different implementations of loop encryption and involving different parameters for losetup. Not sure if this is relevant for you.
 
Old 01-31-2008, 04:06 AM   #5
hansv
LQ Newbie
 
Registered: Apr 2007
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Ha, solved it.

Indeed "maroonbaboon", the text file in the link was not relevant for me. However, in looking up what parameters the Ubuntu (Debian based!) version of losetup understood I found what I was looking for (and missed completely, several times before).

The Debian (so also Ubuntu) version of losetup doesn't just use the provided password, it runs a hash over it first. (So between slackware and Ubuntu, even though I correctly typed the password, the password offered to the encryption system was quite different. Fortunately Ubuntu (debian) losetup has the '-N' parameter which suppresses the additional password hash.

so:
Slackware: losetup -e aes /dev/loop0 /dev/hda2
Ubuntu : losetup -e aes -N /dev/loop0 /dev/hda2
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat Version 9 unable to mount filesystem after OS reload bobgregorich Linux - Hardware 4 06-20-2006 02:41 PM
mount encrypted filesystem fails on boot blackcompany SUSE / openSUSE 0 06-12-2006 09:26 AM
Using losetup to create an encrypted image. drminix Linux - Security 2 06-20-2005 02:17 AM
sharing losetup encrypted filesystem with windows EdoardoC Linux - Security 0 03-02-2005 06:25 AM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration