Grub2

From Do you speak Drupalish? Featured Drupal wiki-like documentation
Jump to: navigation, search

Info

  • grub2- and tab to get all options

anaconda

Boths disks

To install GRUB2 to the MBR:
grub2-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
[root@localhost default]# grub2-install /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.
[root@localhost default]# grub2-install /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.
[root@localhost default]#

Installation finished. No error reported.

  • This will rewrite the MBR information to point to the current installation and rewrite some GRUB 2 files (which are already working). Since it isn't done during execution of the previous command, running sudo update-grub after the install will ensure GRUB 2's menu is up-to-date.'' via https://help.ubuntu.com/community/Grub2/Installing

check grub2 is installed on all disks

dd bs=512 count=1 if=/dev/sda 2>/dev/null | strings
dd bs=512 count=1 if=/dev/sdb 2>/dev/null | strings
  • Disclaimer
    • dd command is extremely dangerous . Should be used with caution . Use it at your own risk. Below command uses dd, is tested by me, and will not harm your system. Do not change the format of the command , the only thing you can change are the letters of the device eg: /dev/sda , /dev/sdb, /dev/sdc ...etc
  • You can examine the first 512 bytes of the device with dd command through strings via http://askubuntu.com/questions/205273/how-to-find-out-where-the-grub-is-installed
For /dev/sda

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

The results in my device

ZRr=
`|f 
\|f1
GRUB
Geom
Hard Disk
Read
 Error
as you can see , GRUB is there.

errors

grub2-install: warning: File system ‘ext2’ doesn't support embedding.
grub2-install: error: embedding is not possible, but this is required for RAID and LVM install.

Manual configuration

uname -r\

  • check booting
  • grub2-set-default "Red Hat Enterprise Linux Server (3.10.0-327.10.1.el7.x86_64) 7.2 (Maipo)"

from vi /boot/grub2/grub.cfg

  • grub2-mkconfig -o /boot/grub2/grub.cfg

during boot

See also

Facts about "Grub2"
Redhat7 +