I have 2 disks in my system partitioned identically.
My current OpenSuSE Leap 15.0 root partition is /dev/sda7 and is ext4.
Also, the grub2 that boots this partition is installed only in that partition’s boot record (During boot, I chain to that with another MBR boot loader).
What I want to do is mirror my Leap 15.0 root partition (/dev/sda7) to /dev/sdb7, and to make it similarly bootable (from the partition boot record of /dev/sdb7).
I know how to format /dev/sdb7 as ext4 (OpenSuSE’s partitioner makes this easy).
I also know how to mirror the content of the /dev/sda7 file system to /dev/sdb7 (rsync to the rescue. I know better than to use dd / UUIDs must be unique.).
I’m pretty sure I can modify the /etc/fstab on the copy to point to the new partition UUIDs for /dev/sdb7 (and similarly for swap).
Q: What I am very fuzzy on is the process for modifying the grub2 config to re-install grub2 in the /dev/sdb7 partition boot record so that it is independently bootable.
Since I can do a lot of damage if I foul this up, I thought I’d first ask…
Does anyone know of a good FAQ that describes how to do this? What’s the easiest/safest way to do this?
[noparse](Ancient history:)[/noparse]
When I did this “root partition mirroring” long ago (with grub1 and pre-UUIDs)…
I vaguely recollect that I had a hard time re-running grub to install it on the 2nd hard disk from a Rescue Mode shell booted off the install DVD, because the kernels were different between the DVD/rescue shell and the target root partition on the 2nd disk. Does this sound right? Should I expect any problems trying to do this from a DVD Rescue Mode shell? Or is it reasonable to try and fix the grub install on /dev/sdb7 (the copy of my root partition on the 2nd hard disk) when booted into /dev/sda7 (my primary Leap 15.0 install on my 1st disk).
Also, I recall having to edit the /etc/fstab to get the copy to mount the proper partitions, though then they were identified by /dev/hda# and /dev/hdb#. I’m assuming a similar edit but with partition UUIDs is what’s required now.