Reinstall grub2

This is an old revision of the document!


Reinstall grub2

On Software RAID

Prepare chroot

mount /dev/md2 /mnt
mount /dev/md1 /mnt/boot
mount -t dev -o bind /dev /mnt/dev
mount -t proc -o bind /proc /mnt/proc
mount -t sys -o bind /sys /mnt/sys
chroot /mnt

Install grub2

grub2-install /dev/sda

Check if Grub was written in MBR

dd bs=512 count=1 if=/dev/sda 2>/dev/null | strings|grep GRUB

Check Grub 2 for the kernel line

egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'

Set new kernel as default boot entry

grub2-set-default 1

Check current boot entry

grub2-editenv list

/home/www/sites/esgr.in/wiki/data/attic/systems/grub2.1515673599.txt.gz · Last modified: 2018/01/11 12:26 by eServices Greece