Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
In your case even being able to mount the partition with password may or may not help in the copy process.
It may be possible to use a tool like clonezilla/redobackup to copy it if it can open the file. Otherwise it would do a bit by bit. That alone may need to have some edits later. In fact any distro may need edits before or after clone when using any tool.
It may be that you can use partimage or gparted to copy the partition and then fix boot issues. Many distro's use grub and other entries to name stuff by ID or name instead of simple /dev/sda1.
You may be able to tar, cpio or such most of it over or maybe rsync even.
There are some live state apps but they are for pay.
Is it possible to decrypt hard drive and than clone it, extend partition and encrypt again..??
That's most likely to be the best option.
For the actual copy process after the de-crypt you could go with dd and enlarge the partitions to your needs (fdisk, resize2fs etc.) after the copy and before you re-encrypt.
Since the sizes of your drives are quite different you want to have an extra eye on block sizes etc
If I'm understanding correctly, you installed Ubuntu, and checked the box to encrypt your home folder?
And both the / and /home folders are both on the same partition, on the 160GB drive?
If this is the case, then you needn't take any more precautions than for an unencrypted drive upgrade. Make sure you back up your documents first, (you should ALWAYS do this frequently, and especially right before any operation with the hard drive), and then do the clone. Clonezilla is a decent choice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.