Root UUID change

I had a similar question about changing the UUID of /boot. Now I want to change the UUID for / (root). Why? Because of a legacy thing.

I have tried using a live image since I would think I’d have to because unmounting the root would not work since the OS resides here. Using the live image I just can’t get it to work.

I mount both the etc and boot partitions then chroot but when I go to build the default grub it fails, saying it can’t get device map. There should be no device map since when I check the system out before I try this there isn’t one and reading says with new grub this is possible. Also when I rad the default grub there is no entry for root UUID I think that also can be normal? I assume I have to add my own?

I’ve also tried not chroot with no luck, I do see the UUID changes but it won’t boot. I hope this makes sense?

Anyone have any insight here? I know this can be done, I have seen it done on CentOS7.

Thanks

I only can answer R9.
You have to edit the UUID for root in each of the following places:
/etc/fstab
/etc/kernel/cmdline # if it exists
then for each file in
/boot/loader/entries/

nowhere else that I can remember.

Thank you I will give it a try

Those files did work for me thanks