GRUB recovery after disk replacement

install grub

If server loaded in Recovery Rescue (or from live cd):

  1. mount root filesystem 
    cd
    /mnt

    mkdir md127
    mount /dev/md127 /mnt
    /md127
  2. Mount boot
     
    mount /dev/md126 /mnt/md127/boot
  3. Mount 
    /dev
    /proc
     и 
    /sys

    mount --bind /dev /mnt/md127/dev<br>mount --bind /proc /mnt/md127/proc<br>mount --bind /sys /mnt/md127/sys
  4. mount efi partition
    mount /dev/nvme0n1p3 /mnt/md127/boot/efi
  5. modprobe efivarfs
    modprobe efivarfs
  6.  
    chroot
     to mounted filesystem
    chroot /mnt
    /md126

  7. mount -t efivarfs efivarfs /sys/firmware/efi/efivars
  8. Install Grub
    grub-install /dev/nvme0n1

    grub-install /dev/nvme1n1
  9. Reboot

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>