need help as to why I am not able to change the UUID for my encrypted partition and others
by hscast from LinuxQuestions.org on (#5A46J)
I have an 8 TB HDD as my main boot drive that is divided up as;
Partition Start End # Bytes Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 2521087 2516992 1.2G Linux file system
/dev/sda3 2521088 15628052479 15625531392 7.3T Linux file system
/dev/sda3 is encrypted and then is subdivided by LVM
My old backup drive took a suicide dive of about 4 feet and of course died. My new backup drive is a 10 TB HDD. I decided that I wanted to make it as full copy of my main drive so in the event something happens to the main one I can just swap drives and keep on trucking. I ran dd if=/dev/urandom of=/dev/sd? to just populate from first byte to last byte random characters. I then did dd if=/dev/sda of=/dev/sdb status=progress. Once done I removed sda from the system and tested the boot ability of the backup hdd. (I forgot to mention the actual step of cloning the drive was done booted from a LiveCD). I then rebooted from the LiveCD and I changed the UUID of sda2 and sda3 but was unable to change the UUID of the encrypted partition even after opening it with;
"cryptsetup luksOpen /dev/sda3 NCC1701_BU" and I did use the appropriate command for that PARTUUID. I was able to change the UUID of the logical partitions no trouble except for one. My LP's are;
/dev/mapper/NCC1701--01-root:
/dev/mapper/NCC1701--01-swap:
/dev/mapper/NCC1701--01-home:
/dev/mapper/NCC1701--01-pub:
The one that failed was the swap LP.I also could not change the UUID for /dev/sda1. Below are the results of "blkid | grep UUID=
This is the 10TB HDD backup drive;
/dev/sda1: PARTUUID="8b6aa4df-8192-452d-b1b7-295ba7dee3f5"
/dev/sda2; LABEL="F28" UUID="8c788f5d-c88d-48c7-a3a0-a7d46fcf4782" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4bfe4929-91c7-49d4-a3af-f6c7ddd52ee7"
/dev/sda3: UUID="745509a3-a229-4a32-a016-807408d18200" TYPE="crypto_LUKS" PARTUUID="e3f64102-37d5-4de1-8bfd-c6c5f214c3ae"
/dev/mapper/NCC1701_BU: UUID="kmQzLw-NvB0-CTfI-uwak-BvsP-o2Qn-VbssmR" TYPE="LVM2_member"
/dev/mapper/NCC1701--01-root: LABEL="Root" UUID="ebcd27b1-1221-462b-8add-8a35e76a183c" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/NCC1701--01-swap: LABEL="Swap" UUID="d22e3bd9-6a6c-4356-886f-c599a25ef1a2" TYPE="swap"
/dev/mapper/NCC1701--01-home: LABEL="Home" UUID="99644e15-483e-4fec-920c-9bdf279194a4" BLOCK_SIZE="4096" Type="ext4"
/dev/mapper/NCC1701--01-pub: LABEL="Pub" UUID="7aa47613-c257-4368-b19f-38a9e57c6022" BLOCK_SIZE="4096" TYPE="ext4"
This is the 8TB HDD main boot drive;
/dev/sda1: PARTUUID="8b6aa4df-8192-452d-b1b7-295ba7dee3f5"
/dev/sda2; LABEL="F28" UUID="97382b63-1a20-480c-bf42-7165f3cc6ee6" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4bfe4929-91c7-49d4-a3af-f6c7ddd52ee7"
/dev/sda3: UUID="8df203c1-3823-44be-808d-56282b620ca2" TYPE="crypto_LUKS" PARTUUID="e3f64102-37d5-4de1-8bfd-c6c5f214c3ae"
/dev/mapper/NCC1701_BU: UUID="kmQzLw-NvB0-CTfI-uwak-BvsP-o2Qn-VbssmR" TYPE="LVM2_member"
/dev/mapper/NCC1701--01-root: LABEL="Root" UUID="e3ebc556-e69c-4355-ae5e-f78436363ced" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/NCC1701--01-swap: LABEL="Swap" UUID="d22e3bd9-6a6c-4356-886f-c599a25ef1a2" TYPE="swap"
/dev/mapper/NCC1701--01-home: LABEL="Home" UUID="b3726248-b39e-4511-b987-c738b73c42fb" BLOCK_SIZE="4096" Type="ext4"
/dev/mapper/NCC1701--01-pub: LABEL="Pub" UUID="5f3f90e3-ae2e-4b11-b5ac-dac22109f866" BLOCK_SIZE="4096" TYPE="ext4"
As you can see I was able to change some of the UUIDs but others would come back with errors and not change. I did not mount any partitions in my attempts just opened and closed the encrypted partition. Also the error that came back when I attempted to do sda1 sounded like it had issues with a non-Linux partition. Also if you could guide me in the correct way to change labels as I would like to change the ones on the backup drive to contain _BU on each one. My intent is that the backup drive would not normally be connected. I would connect it when I'm going to do my full backup and I would be booting from probably a LiveCD therefore mounting the partitions of both drives to 2 different mount points and be using a script for rsysnc.


Partition Start End # Bytes Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 2521087 2516992 1.2G Linux file system
/dev/sda3 2521088 15628052479 15625531392 7.3T Linux file system
/dev/sda3 is encrypted and then is subdivided by LVM
My old backup drive took a suicide dive of about 4 feet and of course died. My new backup drive is a 10 TB HDD. I decided that I wanted to make it as full copy of my main drive so in the event something happens to the main one I can just swap drives and keep on trucking. I ran dd if=/dev/urandom of=/dev/sd? to just populate from first byte to last byte random characters. I then did dd if=/dev/sda of=/dev/sdb status=progress. Once done I removed sda from the system and tested the boot ability of the backup hdd. (I forgot to mention the actual step of cloning the drive was done booted from a LiveCD). I then rebooted from the LiveCD and I changed the UUID of sda2 and sda3 but was unable to change the UUID of the encrypted partition even after opening it with;
"cryptsetup luksOpen /dev/sda3 NCC1701_BU" and I did use the appropriate command for that PARTUUID. I was able to change the UUID of the logical partitions no trouble except for one. My LP's are;
/dev/mapper/NCC1701--01-root:
/dev/mapper/NCC1701--01-swap:
/dev/mapper/NCC1701--01-home:
/dev/mapper/NCC1701--01-pub:
The one that failed was the swap LP.I also could not change the UUID for /dev/sda1. Below are the results of "blkid | grep UUID=
This is the 10TB HDD backup drive;
/dev/sda1: PARTUUID="8b6aa4df-8192-452d-b1b7-295ba7dee3f5"
/dev/sda2; LABEL="F28" UUID="8c788f5d-c88d-48c7-a3a0-a7d46fcf4782" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4bfe4929-91c7-49d4-a3af-f6c7ddd52ee7"
/dev/sda3: UUID="745509a3-a229-4a32-a016-807408d18200" TYPE="crypto_LUKS" PARTUUID="e3f64102-37d5-4de1-8bfd-c6c5f214c3ae"
/dev/mapper/NCC1701_BU: UUID="kmQzLw-NvB0-CTfI-uwak-BvsP-o2Qn-VbssmR" TYPE="LVM2_member"
/dev/mapper/NCC1701--01-root: LABEL="Root" UUID="ebcd27b1-1221-462b-8add-8a35e76a183c" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/NCC1701--01-swap: LABEL="Swap" UUID="d22e3bd9-6a6c-4356-886f-c599a25ef1a2" TYPE="swap"
/dev/mapper/NCC1701--01-home: LABEL="Home" UUID="99644e15-483e-4fec-920c-9bdf279194a4" BLOCK_SIZE="4096" Type="ext4"
/dev/mapper/NCC1701--01-pub: LABEL="Pub" UUID="7aa47613-c257-4368-b19f-38a9e57c6022" BLOCK_SIZE="4096" TYPE="ext4"
This is the 8TB HDD main boot drive;
/dev/sda1: PARTUUID="8b6aa4df-8192-452d-b1b7-295ba7dee3f5"
/dev/sda2; LABEL="F28" UUID="97382b63-1a20-480c-bf42-7165f3cc6ee6" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4bfe4929-91c7-49d4-a3af-f6c7ddd52ee7"
/dev/sda3: UUID="8df203c1-3823-44be-808d-56282b620ca2" TYPE="crypto_LUKS" PARTUUID="e3f64102-37d5-4de1-8bfd-c6c5f214c3ae"
/dev/mapper/NCC1701_BU: UUID="kmQzLw-NvB0-CTfI-uwak-BvsP-o2Qn-VbssmR" TYPE="LVM2_member"
/dev/mapper/NCC1701--01-root: LABEL="Root" UUID="e3ebc556-e69c-4355-ae5e-f78436363ced" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/NCC1701--01-swap: LABEL="Swap" UUID="d22e3bd9-6a6c-4356-886f-c599a25ef1a2" TYPE="swap"
/dev/mapper/NCC1701--01-home: LABEL="Home" UUID="b3726248-b39e-4511-b987-c738b73c42fb" BLOCK_SIZE="4096" Type="ext4"
/dev/mapper/NCC1701--01-pub: LABEL="Pub" UUID="5f3f90e3-ae2e-4b11-b5ac-dac22109f866" BLOCK_SIZE="4096" TYPE="ext4"
As you can see I was able to change some of the UUIDs but others would come back with errors and not change. I did not mount any partitions in my attempts just opened and closed the encrypted partition. Also the error that came back when I attempted to do sda1 sounded like it had issues with a non-Linux partition. Also if you could guide me in the correct way to change labels as I would like to change the ones on the backup drive to contain _BU on each one. My intent is that the backup drive would not normally be connected. I would connect it when I'm going to do my full backup and I would be booting from probably a LiveCD therefore mounting the partitions of both drives to 2 different mount points and be using a script for rsysnc.