Linux - NewbieThis 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
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'm almost done making with my tutorial about how to install and re-install Debian with an encrypted LVM without losing your data, but I'm stuck at one little challenge: after doing 'dd' on /dev/sda1 (a 1 GB partition that will be used as /boot) it changes it's UUID. I'm intending to keep the UUID the same because I'm afraid some software that riquire activation (such as my Boeing 757 Pro for X-Plane) will ask for activation after the /boot/ partition changes UUID, as one of the 757's developers stated to me in a private message on X-Plane's forums.
The UUID's of the following partitions didn't change:
/dev/sda2 (the partition that holds the physical volume for the LVM)
/dev/mapper/debian-root stayed the same even after 'dd' was done into it
/dev/mapper/debian-swap
/dev/mapper/debian-home
Only '/dev/sda1' changed.
How can I erase it with 'dd' without it losing it's UUID?
How can I erase it with 'dd' without it losing it's UUID?
You can't.
In a non-gpt environment, partitions don't have UUIDs, filesystems do - when you run a mkfs, a new UUID is assigned. For ext? filesystems you can enforce a specific UUID on the mkfs so it looks the same. May not be true of all filesystems.
You can't.
In a non-gpt environment, partitions don't have UUIDs, filesystems do - when you run a mkfs, a new UUID is assigned. For ext? filesystems you can enforce a specific UUID on the mkfs so it looks the same. May not be true of all filesystems.
But 'mkfs' was already done in the first install, then 'dd' was done before the re-install.
Does 'dd' make it necessary to redo 'mkfs'? I'm not sure. And how did the other partitions stay with their UUID's?
Surely dd will destroy any file system, so you would need to recreate one.
You can specify your own UUID on a tune2fs command - ext2/3/4 filesystems only.
Surely dd will destroy any file system, so you would need to recreate one.
You can specify your own UUID on a tune2fs command - ext2/3/4 filesystems only.
Or I could make a backup of sda1 (with dd) and restore it when I want to reinstall the system?
If you are taking an existing install, backing it up with dd, then restoring that install with dd into the encrypted LVM, the UUID should remain the same for the filesystem. The UUID of the partition will change, since it will no longer show the UUID of the filesystem, but the encrypted container.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.