Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have acquired a linux commercial penetration test appliance which runs a debian based operating system. I am trying to create an image of the system so I can place it on other identical appliances but it looks like the OS is encrypted. I have asked the manufacturers for support but they said they do not provide any documentation or help for what I am trying to do. I have already tried to run clonezilla Live CD on the appliance but it appears clonezilla does not see the disk and I could try dd but I know that tool can be pretty dangerous so my question is does anyone have any suggestions or advice for me?
How can the OS be encrypted? This would mean a custom bootloader?
I've written this a few ways. Basically you can "try" to copy using the dd command, but you'd need to be able to copy "to" a place, such as an added secondary storage medium, be that microSD, SD, USB stick, etc. If you have no secondary storage capability, then really you won't be able to do this.
I first started with you'd have to boot off a secondary media. That started to fall apart because you'd need a comparable Linux to run on that system, likely a non-standard processor situation. So that's problem #1.
If you manage to copy the OS to a secondary medium, you could then try to boot using that secondary medium on a target system. If that works, great, you then would need to copy the entire image from a secondary medium to the internal flash of the target, to make the target a duplicate.
There's a ton of pitfalls. This is the general gist of what to do, however it's not going to be easy because the manufacturer didn't intend it to be easy. And if it's illegal, then don't do it at all.
(..) so my question is does anyone have any suggestions or advice for me?
Yes: don't. That may not be the answer that you are looking for but AFAIK this is about you honoring commercially licensing agreement, which I am pretty sure says something about reverse engineering and similar activities, and anything that reeks of circumvention is not a topic for LQ. Please see the LQ Rules.
Thanks for your reply. I have contacted the manufacturer and confirmed they are OK with me doing this just to let everyone know. The processor is a 1.8GHZ Intel i3 with 32GB SSD.
I have done additional research and it seems what I am trying to do should not be that hard. Running
Code:
fdisk -l
Disk /dev/sda: 32.0 GB, 32017047552 bytes
255 heads, 63 sectors/track, 3892 cylinders, total 62533296 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001f807
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 62531583 31264768 83 Linux
So, I am not exactly sure what .ecryptfsrc means but the more I look into this it seems like this device might not be encrypted at all so I think I will try what rtmistler said and try to use dd and put the img onto an external USB drive unless anyone out there sees something I am missing? Thanks for your help again in advance.
Just to close this thread out the procedure we used was:
1. Boot into Live Ubuntu CD disto
4. ssh into the device by ifconfig for the ip and then get into it from host computer
5. type fdisk -l to make sure sdc is external with the device folder and sda is the device image
6. Ensure Proper Drives are Connected
7. Perform dd operation
dd "if=source" "of=destination"
To create an image of sda,
-
Code:
dd if=/dev/sda of=/media/location/backup.img
To restore a backup image you already have,
-
Code:
dd if=/media/location/backup.img of=/dev/sda
I still don't understand why clonezilla did not see the proper drives. We might yet still try to get that tool to work for image creating and restoration but now dd works fine as always.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.