LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-03-2014, 04:41 AM   #1
yooden
Member
 
Registered: Dec 2013
Distribution: Debian Wheezy/Jessie # XFCE
Posts: 53

Rep: Reputation: Disabled
Chicken and Egg: Mounting an encrypted FS from a full-disk Image


I created a full-disk HD image with dd:
Code:
dd if=/dev/sda of=/path/file.img
Now I want to mount the filesystems out of this image. I used parted to get the offset and run mount:
Code:
mount -o loop,ro,offset=12345 file.img /mnt/note/root
That works fine. However, one of the FS is encrypted, and I don't see a way to mount that. Mount says:
Code:
mount: unknown filesystem type 'crypto_LUKS'
It seems that mount needs some crypto, but cryptsetup only works on devices, which I don't have yet. So where do I have to look to get this running?

Thanks!
 
Old 03-03-2014, 05:23 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Loop mount the filesystem as well, then issue the luksOpen, then the mount.
Have a look at partx.
 
1 members found this post helpful.
Old 03-03-2014, 05:25 AM   #3
yooden
Member
 
Registered: Dec 2013
Distribution: Debian Wheezy/Jessie # XFCE
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Loop mount the filesystem as well, then issue the luksOpen, then the mount.
Have a look at partx.
I cannot loop mount it, mount gives me back the error I quoted above:
Code:
# mount -o loop,ro,offset=12345 file.img /mnt/note/home
mount: unknown filesystem type 'crypto_LUKS'
Edit: I think I don't understand you. What do you mean with "the filesystem"?

Edit: This works:
Code:
# losetup /dev/loop3 file.img -o 12345
# cryptsetup luksOpen /dev/loop3 notehome
# mount /dev/mapper/notehome /mnt/note/home
I had a look at losetup before, but I missed the offset.

Thanks for the pointer!

Last edited by yooden; 03-03-2014 at 05:39 AM.
 
  


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
Mounting an encrypted disk image ismail_ridge_view Linux - Newbie 1 01-25-2012 07:47 AM
[SOLVED] The Chicken and the Egg... ButterflyMelissa Linux - Software 6 09-04-2011 02:20 PM
The chicken, or the egg...... ErrorBound General 9 06-19-2007 05:56 AM
compiler chicken and egg problem novasoy Linux - Newbie 4 06-24-2004 01:18 PM
Which came first...the chicken of the egg? ugenn Linux - Newbie 3 04-13-2002 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:33 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