1

I am building a Fedora 26 server. It has two 320G SATA drives. I have them partitioned the same (fdisk output below). The 2nd partition on each are joined together in a standard md RAID1 configuration, upon which is built LVM structures for the bulk of the OS install.

What I am trying to do is to replicate the MBR and /boot from the first partition on the first drive to the first partition on the 2nd drive, so if the first drive fails I would still be able to boot the server.

After a lot of googling and reading various answers, nothing seemed to apply to my case...they were either very outdated (grub commands that don't work under grub2) or were dealing with the first partition also being md RAID1 setup. My first attempt following bits from several pages ended up with an unbootable and uninstallable system until I used a drive wiper to blank the drives out and then I could start over.

fdisk -l /dev/sda
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x970c1c99

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048   2099199   2097152     1G 83 Linux
/dev/sda2       2099200 625141759 623042560 297.1G fd Linux raid autodetect


fdisk -l /dev/sdb
Disk /dev/sdb: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x86d47373

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sdb1          2048   2099199   2097152     1G 83 Linux
/dev/sdb2       2099200 625141759 623042560 297.1G fd Linux raid autodetect

I figure I can mount /dev/sdb1 on an alternate mount point and use rsync to copy that info, but getting the MBR correctly copied and having GRUB2 understand it is eluding me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.