Last active
October 1, 2021 12:17
-
-
Save alishir/b760359fa6583899a8256d43bf8a908c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clear MBR | |
dd if=/dev/sdOld of=/dev/sdNew bs=512 count=1 | |
# replicate sdOld partition table | |
sfdisk -d /dev/sdOld | sfdisk /dev/sdNew | |
# add new disk to RAID | |
mdadm --manage /dev/md12X --add /dev/sdNewX | |
mount /dev/centos/root /mnt/custom | |
for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt/custom$i; done | |
chroot /mnt/custom /bin/bash | |
# reinstall kernel | |
yum reinstall kernel | |
grub2-install /dev/sda | |
grub2-install /dev/sdb | |
grub2-mkconfig -o /boot/grub2/grub.cfg | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment