Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 21st January 2009, 03:35 AM
AnimeFreak Offline
Registered User
 
Join Date: Jan 2009
Posts: 267
How to Image luks system encrypted logical HDD

I need a FREE solution that can image an entire Luks system encrypted volume and the rest of the used HDD, the MBR and /boot partition.

Note: MBR and /boot are not encrypted.

Note 2: I want to be able to restore entire drive from image with only a couple of steps.

Note 3: Destination HDD space is a factor. Image file must be compressed and the image file must be around 40 to 50 GB or less. The smaller the image the better.

-----------------------------------------------------------------------------------------------------------------------------------

I have used clonezilla live cd before but not for encrypted volumes.


I know you can install it in Linux. But, I don't know how to configure it after installation.

I would be very happy if someone could tell me how to configure clonezilla in Fedora. How to guides are also welcome.



I have one more question.


If I image the encrypted volumes and all the stuff I mentioned above while logged in to Fedora, and I restore the drive from the image, will the recovered drive still be encrypted?
Reply With Quote
  #2  
Old 21st January 2009, 07:29 AM
jedsen Offline
Registered User
 
Join Date: Jan 2008
Posts: 14
Use dd.
Code:
man dd
Reply With Quote
  #3  
Old 21st January 2009, 02:36 PM
AnimeFreak Offline
Registered User
 
Join Date: Jan 2009
Posts: 267
I am a noob and I don't know how to use dd properly. Any how to guides would be appreciated.

Last edited by AnimeFreak; 21st January 2009 at 02:48 PM.
Reply With Quote
  #4  
Old 21st January 2009, 03:10 PM
jedsen Offline
Registered User
 
Join Date: Jan 2008
Posts: 14
The man page should help you learn how to use it. "man" is short for "manual"
Reply With Quote
  #5  
Old 21st January 2009, 03:35 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Quote:
Originally Posted by AnimeFreak View Post
I am a noob and I don't know how to use dd properly. Any how to guides would be appreciated.
There are no ways to do what you are asking in a not wasteful way.
It's because encrypted data cannot be compressed very well, as it purpose is to appear as random as possible. This is the reason why you had to fill with random bytes your disk before encrypt and format it.
You you can achieve better results if you compress the files on your encrypted partition at first into a single archive, and you encrypt that archive-file later!!!
You can play with 'dd' (that's good!) but if you pipe its output to a compression handler, you won't get a 40 to 50 GB or less image file (well, if your hard disk is of 30GB, you'll get it for sure but don't expect wonderful compression ratios... )

bye!!!!!!!!
Reply With Quote
  #6  
Old 21st January 2009, 03:51 PM
AnimeFreak Offline
Registered User
 
Join Date: Jan 2009
Posts: 267
My internal hdd is 80 GB.


My external is 1 TB but only has about 100 to 120 GB left.



I record a lot of TV Shows. I was planning on deleting a bunch of recorded TV from my 1TB drive.


Oh well, bye charmed (TV Show In USA)


I might as well try clonezilla livecd with bzip2 compression. I will let you know when it finishes in 2042


Thanks,

Anime Freak
Reply With Quote
  #7  
Old 21st January 2009, 10:22 PM
AnimeFreak Offline
Registered User
 
Join Date: Jan 2009
Posts: 267
clonezilla failed.



I want to use dd to create a bzip2 compressed image of my entire sda drive, MBR, and boot partition.



Can someone please tell me the command to use.



Please don't say man dd. I also, don't know how to pipe stuff.



I realize that the compression won't be that good, but to me alittle is better than none.





Thanks,

AnimeFreak
Reply With Quote
  #8  
Old 25th January 2009, 04:50 PM
AnimeFreak Offline
Registered User
 
Join Date: Jan 2009
Posts: 267
Ok, I found the dd code I need.

The only thing is I want to use p7zip's LZMA and Ultra Compression instead of gzip


dd if=/dev/sda ibs=4096 | gzip > partition.image.gz conv=noerror




Also, what is the ibs 4096 for?



PS: Do I need to know the exact drive size?
Reply With Quote
  #9  
Old 17th June 2009, 02:32 PM
nikbarron Offline
Registered User
 
Join Date: Jun 2009
Posts: 1
Hi,

The ibs parameter specifies the input block size; depending on the disks in question different values may give you better or worse performance. 4096 is a sensible starting point.

You can use whatever compression command you like; the "|" (pipe) symbol basically means "take the output from the thing on the left and give it to the thing on the right". So just substitute the appropriate compression command for gzip in the command line. Note that some commands don't automatically pull data from stdin so you may need to do something like "dd if=/dev/sda ibs=4096 | mycompressor - > mycompressedfile" (the "-" means "read from stdin")

You don't need to know the exact drive size; by default dd will keep going until it gets to the end of file, which in this case will be the end of /dev/sda.

One thing I would advise is to check that you can actually restore from your backup. You need a separate disk to do this of course!

BTW you'll get pretty poor compression from encrypted data so should budget for the full size of the disk for the backup image.

Hope this helps; do yourself a favour and grab a copy of something like Unix Power Tools or Linux in a Nutshell from O'Reilly, they'll help with the command line basics and pay off in no time
Reply With Quote
Reply

Tags
encrypted, hdd, image, logical, luks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting encrypted luks partition with keyfile gnapp Using Fedora 0 27th March 2009 08:27 AM
Mount luks encrypted volumes from a livecd AnimeFreak Using Fedora 0 13th March 2009 10:01 PM
Mounting luks encrypted external HD sentry Hardware & Laptops 6 28th February 2009 03:14 PM
LUKS encrypted drive nash crash LinuxTom Security and Privacy 2 22nd November 2008 08:40 PM
Automounting of LUKS encrypted drive fails crosewarne Hardware & Laptops 3 8th November 2006 01:06 PM


Current GMT-time: 01:39 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat