LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2019, 11:44 PM   #1
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Rep: Reputation: Disabled
Will cloning one hdd (not ssd) to another encrypted hdd work on a cloning device?


Does something need to be done first to the encrypted device? The encrypted device "IS" the destination.
 
Old 09-03-2019, 03:12 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Assuming the two disks have the same size and the cloning device makes a bit-by-bit copy, it doesn't matter whether the destination disk is encrypted. After cloning, you have two disks with identical data.
 
Old 09-03-2019, 04:04 AM   #3
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Assuming the two disks have the same size and the cloning device makes a bit-by-bit copy, it doesn't matter whether the destination disk is encrypted. After cloning, you have two disks with identical data.
Thanks. How can I tell if the device is 'bit-by-bit'? It doesn't say on the box; I can call the manufacturer.
 
Old 09-03-2019, 04:36 AM   #4
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
maybe I have miss understood

but if a none-encytped is cloned 'bit-by-bit' to an encypted drive the result would be un-encrypted ( bit-by-bit of original ).

or is the encryption at hardware level?


edit im guessing
if encrytion is at device , and not filesystem then yes it should be encrypted

but I honestly don't know where the encryption is happening

Last edited by Firerat; 09-03-2019 at 04:42 AM.
 
Old 09-03-2019, 05:17 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hddfsck View Post
Thanks. How can I tell if the device is 'bit-by-bit'? It doesn't say on the box; I can call the manufacturer.
Since I don't know your cloning device, I don't know what it does. Chances are it just copies each bit from the source to the destination disk without worrying about any structures that might already exist on the destination.

If so, the two disks will be identical after the cloning operation, and as Firerat says, your encryption will go away. I hope that this is your expectation.

Last edited by berndbausch; 09-03-2019 at 05:18 AM.
 
Old 09-03-2019, 05:27 AM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
I assumed they wanted encryption

but that was something I leapt to

if the unencryted and the encrypted devices were both mounted, and the files were simply copied. then the files in the destination would be encrypted.

if unencrypted is a root fs, then more work would need to be done to allow booting
if we are talking about home, again more work required but not as much

if it is just data, less work ( but obviously you need to know how to access the encrypted data )


hddfsck, please provide detail of what you want to achieve
 
Old 09-03-2019, 05:54 AM   #7
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Firerat View Post
I assumed they wanted encryption

but that was something I leapt to

if the unencryted and the encrypted devices were both mounted, and the files were simply copied. then the files in the destination would be encrypted.

if unencrypted is a root fs, then more work would need to be done to allow booting
if we are talking about home, again more work required but not as much

if it is just data, less work ( but obviously you need to know how to access the encrypted data )


hddfsck, please provide detail of what you want to achieve
If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.
 
Old 09-03-2019, 06:05 AM   #8
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by hddfsck View Post
If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.
So, cloning a device and moving all files are two completely different things.

What tool(s) do you plan to use will define if the process will be successful or not.

But, first, you need to determine what exactly do you want:
- "clone a device" (aka, copy OS, config files, applications, your data)
- "move all files" (aka, your data but not OS or applications)
 
Old 09-03-2019, 06:12 AM   #9
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by hddfsck View Post
If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.
if you clone the drive yes, but it will not be encrypted.

if you mount the encrypted filesystem and copy files to it they will be encrypted.

when I said provide detail
I should have said provide full details

I can give you correct answers to your poor questions, but the answers will be poor even if they are correct.
garbage in garbage out.

The original files:
are they just documents?

or are they files which an operating system requires to operate?

what do you want/need to do with the files after they are encrypted?

Last edited by Firerat; 09-03-2019 at 06:13 AM.
 
Old 09-03-2019, 06:13 AM   #10
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
Quote:
Originally Posted by dc.901 View Post
So, cloning a device and moving all files are two completely different things.
Indeed. If you clone an unencrypted device to an encrypted one, you will finish up with two copies of the original. That's what cloning does - whether it's dolly the sheep or your data.
 
Old 09-03-2019, 07:41 AM   #11
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hddfsck View Post
If the destination drive is encrypted, will the cloning still take place? Goal: move all files TO encrypted device. Thanks.
Encrypted devices (or encrypting devices) might exist, but I am certain they are rare, only used in very special situations and expensive. A usual hard disk is not encrypted.

You can encrypt the data on a hard disk using encryption software. If encryption software is used, when you write "Linux", what is actually written is "&#fh346%".

Cloning means making an identical copy. When you clone disk A to disk B, any encrypted data that might be on disk B is overwritten. You end up with two identical disks. After cloning, if the data on disk A is encrypted, so is the data on disk B. If the data on disk A is clear, so is the data on disk B.

There might be cloning devices that honour the encryption format on disk B. Most probably, your device doesn't.
 
Old 09-05-2019, 04:04 AM   #12
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Encrypted devices (or encrypting devices) might exist, but I am certain they are rare, only used in very special situations and expensive. A usual hard disk is not encrypted.

You can encrypt the data on a hard disk using encryption software. If encryption software is used, when you write "Linux", what is actually written is "&#fh346%".

Cloning means making an identical copy. When you clone disk A to disk B, any encrypted data that might be on disk B is overwritten. You end up with two identical disks. After cloning, if the data on disk A is encrypted, so is the data on disk B. If the data on disk A is clear, so is the data on disk B.

There might be cloning devices that honour the encryption format on disk B. Most probably, your device doesn't.
You are correct. Cloning from a non-encrypted device to an encrypted device, erased the encryption on the destination device, unfortunately. Also, the size of the destination device is half of its max potential since the host device was half.

In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)? Thanks.
 
Old 09-05-2019, 04:06 AM   #13
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Firerat View Post
if you clone the drive yes, but it will not be encrypted.

if you mount the encrypted filesystem and copy files to it they will be encrypted.

when I said provide detail
I should have said provide full details

I can give you correct answers to your poor questions, but the answers will be poor even if they are correct.
garbage in garbage out.

The original files:
are they just documents?

or are they files which an operating system requires to operate?

what do you want/need to do with the files after they are encrypted?
Just documents, no os on hdd; storage hdd after encrypted and transferred; read files afterwards.

In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)?
Thanks.

Last edited by hddfsck; 09-05-2019 at 04:07 AM.
 
Old 09-05-2019, 04:07 AM   #14
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dc.901 View Post
So, cloning a device and moving all files are two completely different things.

What tool(s) do you plan to use will define if the process will be successful or not.

But, first, you need to determine what exactly do you want:
- "clone a device" (aka, copy OS, config files, applications, your data)
- "move all files" (aka, your data but not OS or applications)
Just moving all files.

In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)?

Thanks.

Last edited by hddfsck; 09-05-2019 at 04:08 AM.
 
Old 09-05-2019, 06:43 AM   #15
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hddfsck View Post
In order to be able to access/ use the other half of the destination device, would I have to start over and delete the cloned contents, and then copy and paste instead of clone (to the destination device)?
So your source disk was half the size of your destination?

Depending on how the disk is structured, there are several options. Tools like gparted allow you to create new partitions or extend existing partitions. You probably need to know, however, how the disk is partitioned, whether it contains a volume manager and what filesystem types are used.

I would start by attaching the disk to a running Linux system that has gparted, and use that tool to analyze the disk structure. Since you still have the source disk, you can even take risks and explore the tool's features and capabilities.
 
  


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
[SOLVED] Tips/warnings for cloning OS disk from HDD to SSD? penyuan Linux - Hardware 11 08-13-2017 08:00 PM
Cloning SSD vs HDD with DD replica9000 Linux - Software 13 12-16-2016 08:08 PM
Access To Encrypted SSD Partition With Native Password in SSD>SATA Enclosure skidvicious Linux - Hardware 5 12-03-2015 04:40 PM
Cloning HDD install to SSD Condemn Slackware 1 02-14-2014 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:49 PM.

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