I have an unique situation where I need to change UUID of usb flash drive to previous UUID. I formatted it and obviously number changed...
I've ubuntu server setup with 1TB hdd, and 4GB usb flash drive to boot from. Grub on hdd is configured for UUID which changed when I formated usb drive and reinstalled ubuntu server. I've no external monitor, so I attach usb to laptop and install server there... than I move it to server hardware.
As I mentioned my problem is that I need usb to go back to previous UUID, otherwise server won't boot. And I cannot get external monitor till monday! :)
I know I need these files changed afterwards:
The files for which UUID is most critical:
/boot/grub/menu.lst
/etc/fstab
/etc/initramfs-tools/conf.d/resume
But I cannot find anywhere on the net info about customizing UUID.
Anyone?
tune2fs -U
will kill the filesystem and trying to recover it withe2fsck -y
results in an empty filesystem with a bit of stuff left in lost+found. This seems to be caused by UUID being wired into the checksums on ext4, but I haven't really looked into it. – Grumbel Sep 30 '17 at 16:28