LinuxQuestions.org
Help answer threads with 0 replies.
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, 05: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, 06:23 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286

Rep: Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165
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, 06: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 06:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:47 AM
[SOLVED] The Chicken and the Egg... ButterflyMelissa Linux - Software 6 09-04-2011 03:20 PM
The chicken, or the egg...... ErrorBound General 9 06-19-2007 06:56 AM
compiler chicken and egg problem novasoy Linux - Newbie 4 06-24-2004 02:18 PM
Which came first...the chicken of the egg? ugenn Linux - Newbie 3 04-13-2002 10:17 AM

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

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