Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
systems:grub2 [2018/01/08 16:11]
eServices Greece created
systems:grub2 [2018/03/05 05:28] (current)
eServices Greece
Line 1: Line 1:
 +{{tag>centos grub}}
 ====== Reinstall grub2 ====== ====== Reinstall grub2 ======
 ===== On Software RAID ===== ===== On Software RAID =====
Line 11: Line 12:
 </sxh> </sxh>
  
-==== Install grub2 ====+=== Install grub2 ===
 <sxh bash> <sxh bash>
 grub2-install /dev/sda grub2-install /dev/sda
 +</sxh>
 +
 +=== Check if Grub was written in MBR ===
 +<sxh bash>
 +dd bs=512 count=1 if=/dev/sda 2>/dev/null | strings|grep GRUB
 +</sxh>
 +
 +=== Check Grub 2 for the kernel line ===
 +<sxh bash>
 +egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
 +</sxh>
 +
 +=== Set new kernel as default boot entry ===
 +<sxh bash>
 +grub2-set-default 1
 +</sxh>
 +
 +=== Check current boot entry ===
 +<sxh bash>
 +grub2-editenv list
 </sxh> </sxh>