0

I have a small ubuntu system disk. After initial install of ubuntu, I used dd to clone every byte of my system disk to a second (mirror) disk of the same size. Every night a script using rsync is run to keep the mirror disk updated. Both disks are permanently mounted in hot-swap bays. The idea is that if the system disk fails, I only need to swap the mirror disk into the system bay and reboot to have the system running again. Then (at my leisure) re-initialise a new mirror disk in the second bay.

The only trouble is that the initial install created the EFI/ubuntu/grub.cfg file (copied to the mirror disk) with its first line instructing grub to look for the uuid of the failed system disk.

I need to edit /EFI/ubuntu/grub.cfg so that will not use UUIDs.

BTW. I have uncommented that line in /etc/default/grub which eliminated the use of UUIDs elsewhere but it doesn't seem to to have done what I need.

1 Answers1

0

1> created a new, empty MBR using fdisk on /dev/sda ( it's a 'small' drive 1TB ) this eliminates the GPT IDs but creates a simpler MBR ID 2> created a new 200MB EFI partitition 1 (type EF ) 3> created a new 500GB linux partition 2 (type 83 ) Formatted partition 1 FAT32 Formatted Partition 2 ext4 clean installed Ubuntu server 22.04 LTE ran "e2label /dev/sda2 ROOT_SYSTEM" mounted /dev/sda1 in /mnt/sda1 edited /mnt/sda1/EFI/ubuntu/grub.cfg to have the first line "search.fs_label ROOT_SYSTEM root hd0,msdos2"

clone the root disk using "dd if=/dev/sda of=/dev/sdb" use "e2label /dev/sdb2 ROOT_MIRROR" to differentiate the root and mirror drives. Use DiskEditor to change the ID number of /dev/sdb All done, all works except the root system drive has not yet failed.