Welcome to Centmin Mod Community
Become a Member

Sysadmin Grub Help?

Discussion in 'System Administration' started by Jimmy, Sep 15, 2017.

  1. rdan

    rdan Well-Known Member

    4,672
    1,122
    113
    May 25, 2014
    Ratings:
    +1,664
    Local Time:
    5:01 AM
    Mainline
    10.2
    Different server with same specs.
    First reboot since August 2017.
     
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    41,754
    9,400
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,445
    Local Time:
    7:01 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Ah I see :)
     
  3. rdan

    rdan Well-Known Member

    4,672
    1,122
    113
    May 25, 2014
    Ratings:
    +1,664
    Local Time:
    5:01 AM
    Mainline
    10.2
    Do you guys have any idea about this?
    upload_2019-1-21_3-56-55.png


    Grub is missing :/
    upload_2019-1-21_3-58-39.png
     
  4. rdan

    rdan Well-Known Member

    4,672
    1,122
    113
    May 25, 2014
    Ratings:
    +1,664
    Local Time:
    5:01 AM
    Mainline
    10.2
    Will it be fix by copying all files from
    /usr/lib/grub/x86_64-efi/ to
    /boot/grub2 ?

    But I can't CP though on grub console.
     
  5. rdan

    rdan Well-Known Member

    4,672
    1,122
    113
    May 25, 2014
    Ratings:
    +1,664
    Local Time:
    5:01 AM
    Mainline
    10.2
    I boot on rescue mode, then mounted
    mount /dev/md3 to /mnt/
    I can now copy files on this console?

    /mnt/usr/lib/grub/x86_64-efi/
    to
    /mnt/boot/grub2 ?
     
  6. rdan

    rdan Well-Known Member

    4,672
    1,122
    113
    May 25, 2014
    Ratings:
    +1,664
    Local Time:
    5:01 AM
    Mainline
    10.2
    Done this, I did successfully executed this command:
    But still after reboot, stuck on grub console.

    Not sure what else I need to do :/
     
  7. rdan

    rdan Well-Known Member

    4,672
    1,122
    113
    May 25, 2014
    Ratings:
    +1,664
    Local Time:
    5:01 AM
    Mainline
    10.2
    [email protected]:~# sudo mount /dev/md3 /mnt
    [email protected]:~# sudo grub-install --boot-directory=/mnt /dev/md
    md/ md2 md3
    [email protected]:~# sudo grub-install --boot-directory=/mnt /dev/md3
    Installing for x86_64-efi platform.
    grub-install: error: cannot find EFI directory.
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    3,481
    335
    83
    May 31, 2014
    Ratings:
    +642
    Local Time:
    12:01 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    From grub run:

    Code:
    ls
    you will see something like this:

    (md/md3) (md/md2) (hd0)

    then run:

    Code:
    ls (md/md2)
    or
    ls (md/md2)/
    just to veryify that md2 is the main disk by finding the folder /home

    If md2 is the main disk then run:

    Code:
    set prefix=(md/md2)/boot/grub2
    set root=(md/md2)
    insmod linux
    normal
    reboot the server after that

    Then it should boot...

    And then run:

    Code:
    yum reinstall grub2-efi shim
    grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
    reboot
     
  9. rdan

    rdan Well-Known Member

    4,672
    1,122
    113
    May 25, 2014
    Ratings:
    +1,664
    Local Time:
    5:01 AM
    Mainline
    10.2
    That is not working with me.
    For some reason /boot/ is empty :/
     
  10. eva2000

    eva2000 Administrator Staff Member

    41,754
    9,400
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,445
    Local Time:
    7:01 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    I am testing 3 dedicated servers with 1.2TB NVMe SSD on CentOS 7 and looking at additional checks for this potential grub issue. So can folks who are using NVMe ssd based centos 7 servers run these commands on the NVMe based servers and post the output you get
    Code (Text):
    yum -q -y install efibootmgr
    efibootmgr
    ls -lah /boot/efi/EFI/centos
    ls -lah /sys/firmware/efi
    dmesg | grep -i efi
    egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/grub2/grub.cfg
    egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/efi/EFI/centos/grub.cfg
    df -hT
    

    mention the web host the server is with too
     
  11. Matt

    Matt Moderator Staff Member

    848
    372
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +579
    Local Time:
    10:01 PM
    1.5.15
    MariaDB 10.2
    Code:
    [17:40][[email protected]*]# efibootmgr
    BootCurrent: 0003
    Timeout: 0 seconds
    BootOrder: 0003,0009,0008,0006,0004,0005,0007,0000,0001,0002
    Boot0000* Enter Setup
    Boot0001  Boot Device List
    Boot0002  Network Boot
    Boot0003* UEFI IPv4: Intel I210 Network 00 at Baseboard
    Boot0004* UEFI IPv6: Intel I210 Network 00 at Baseboard
    Boot0005* Launch EFI Shell
    Boot0006* UEFI IPv4: Intel I210 Network 00 at Baseboard 2
    Boot0007* UEFI IPv6: Intel I210 Network 00 at Baseboard 2
    Boot0008* centos
    Boot0009* centos7_64 (GRUB) (first drive nvme0n1)
    Boot000A* UEFI Misc Device
    [17:41][[email protected]*]# ls -lah /boot/efi/EFI/centos
    total 152K
    drwxr-xr-x. 3 root root 4.0K Jun  5 06:30 .
    drwxr-xr-x. 3 root root 4.0K Jun  5 06:30 ..
    drwxr-xr-x. 2 root root 4.0K Jun  5 06:30 fonts
    -rwxr-xr-x. 1 root root 1.0K Aug  2 10:37 grubenv
    -rwxr-xr-x. 1 root root 136K Jun  5 06:30 grubx64.efi
    [17:41][[email protected]*]# ls -lah /sys/firmware/efi
    total 0
    drwxr-xr-x.  5 root root    0 Sep 14 17:39 .
    drwxr-xr-x.  7 root root    0 Sep 14 17:39 ..
    -r--r--r--.  1 root root 4.0K Sep 14 17:39 config_table
    drwxr-xr-x.  2 root root    0 Jun  5 08:13 efivars
    -r--r--r--.  1 root root 4.0K Sep 14 17:39 fw_platform_size
    -r--r--r--.  1 root root 4.0K Sep 14 17:39 fw_vendor
    -r--r--r--.  1 root root 4.0K Sep 14 17:39 runtime
    drwxr-xr-x.  8 root root    0 Sep 14 17:39 runtime-map
    -r--------.  1 root root 4.0K Sep 14 17:39 systab
    drwxr-xr-x. 90 root root    0 Sep 14 17:39 vars
    [17:41][[email protected]*]# dmesg | grep -i efi
    [17:41][[email protected]*]# df -hT
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/md2       ext4      411G  181G  209G  47% /
    devtmpfs       devtmpfs   16G     0   16G   0% /dev
    tmpfs          tmpfs      16G     0   16G   0% /dev/shm
    tmpfs          tmpfs      16G  1.6G   14G  11% /run
    tmpfs          tmpfs      16G     0   16G   0% /sys/fs/cgroup
    /dev/nvme0n1p1 vfat      510M  2.7M  508M   1% /boot/efi
    tmpfs          tmpfs     3.1G     0  3.1G   0% /run/user/0
    
    Code:
    [18:42][[email protected]*]# efibootmgr
    BootCurrent: 0003
    Timeout: 1 seconds
    BootOrder: 0003,0004,0005,0006,0008,0007
    Boot0002  UEFI: Built-in EFI Shell
    Boot0003* UEFI: PXE IP4 Intel(R) Ethernet Controller X540-AT2
    Boot0004* UEFI: PXE IP4 Intel(R) Ethernet Controller X540-AT2
    Boot0005* UEFI: PXE IP4 Broadcom NetXtreme Gigabit Ethernet (BCM5720)
    Boot0006* UEFI: PXE IP4 Broadcom NetXtreme Gigabit Ethernet (BCM5720)
    Boot0007  USB
    Boot0008  UEFI: Built-in EFI Shell
    [18:42][[email protected]*]# ls -lah /boot/efi/EFI/centos
    total 144K
    drwxr-xr-x. 2 root root 4.0K Jul  6 07:26 .
    drwxr-xr-x. 3 root root 4.0K Jul  6 07:26 ..
    -rwxr-xr-x. 1 root root 136K Jul  6 07:26 grubx64.efi
    [18:42][[email protected]*]# ls -lah /sys/firmware/efi
    total 0
    drwxr-xr-x.  6 root root    0 Sep 14 18:42 .
    drwxr-xr-x.  7 root root    0 Jul  6 07:32 ..
    -r--r--r--.  1 root root 4.0K Sep 14 18:42 config_table
    drwxr-xr-x.  2 root root    0 Jul  6 07:32 efivars
    drwxr-xr-x.  3 root root    0 Sep 14 18:42 esrt
    -r--r--r--.  1 root root 4.0K Sep 14 18:42 fw_platform_size
    -r--r--r--.  1 root root 4.0K Sep 14 18:42 fw_vendor
    -r--r--r--.  1 root root 4.0K Sep 14 18:42 runtime
    drwxr-xr-x. 25 root root    0 Sep 14 18:42 runtime-map
    -r--------.  1 root root 4.0K Jul  6 07:33 systab
    drwxr-xr-x. 76 root root    0 Sep 14 18:42 vars
    [18:42][[email protected]*]# dmesg | grep -i efi
    [18:42][[email protected]*]# df -hT
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/md2       ext4      1.8T  507G  1.2T  31% /
    devtmpfs       devtmpfs   63G     0   63G   0% /dev
    tmpfs          tmpfs      63G   20M   63G   1% /dev/shm
    tmpfs          tmpfs      63G  4.1G   59G   7% /run
    tmpfs          tmpfs      63G     0   63G   0% /sys/fs/cgroup
    /dev/nvme0n1p1 vfat      510M  152K  510M   1% /boot/efi
    tmpfs          tmpfs      13G     0   13G   0% /run/user/0
    Both OVH, and haven't been rebooted since they were initially spun up (running kernel care, so only rebooting as a last resort with them).

    Just checked, and both had broken /etc/grub2-efi.cfg symlinks, as /boot/efi/EFI/centos/grub.cfg was missing until running the following command

    Code:
    [18:49][[email protected]*]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
    Found linux image: /boot/vmlinuz-3.10.0-957.21.3.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-957.21.3.el7.x86_64.img
    Found linux image: /boot/vmlinuz-0-rescue-6ab4ad267a0360ab401378365d203d99
    Found initrd image: /boot/initramfs-0-rescue-6ab4ad267a0360ab401378365d203d99.img
    done
    
     
    • Informative Informative x 2
  12. Matt

    Matt Moderator Staff Member

    848
    372
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +579
    Local Time:
    10:01 PM
    1.5.15
    MariaDB 10.2
    Checked my 3rd server with them that has NVMe and it was the same.
     
    • Informative Informative x 1
  13. eva2000

    eva2000 Administrator Staff Member

    41,754
    9,400
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,445
    Local Time:
    7:01 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Cheers @Matt interesting trying to determine if a server is booting with UEFI or non-UEFI bios as usually googled tests don't seem to apply to ALL checks from what you posted heh.

    What's output for these 2 commands as well
    Code (Text):
    egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/grub2/grub.cfg
    egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/efi/EFI/centos/grub.cfg
    
     
  14. Matt

    Matt Moderator Staff Member

    848
    372
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +579
    Local Time:
    10:01 PM
    1.5.15
    MariaDB 10.2
    However, looking at the verbose output of efibootmgr

    Code:
    18:02][[email protected]*]# efibootmgr -v
    BootCurrent: 0003
    Timeout: 0 seconds
    BootOrder: 0003,0009,0008,0006,0004,0005,0007,0000,0001,0002
    Boot0000* Enter Setup    FvVol(cdbb7b35-6833-4ed6-9ab2-57d2acddf6f0)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
    Boot0001  Boot Device List    FvVol(cdbb7b35-6833-4ed6-9ab2-57d2acddf6f0)/FvFile(eec25bdc-67f2-4d95-b1d5-f81b2039d11d)$.I.B.T...
    Boot0002  Network Boot    FvVol(cdbb7b35-6833-4ed6-9ab2-57d2acddf6f0)/FvFile(9e09e6fd-4e16-6468-9b78-bdaeaf609cff)$.I.B.T...
    Boot0003* UEFI IPv4: Intel I210 Network 00 at Baseboard    /Pci(0x1d,0x2)/Pci(0x0,0x0)/MAC(a4bf012063f2,0)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
    Boot0004* UEFI IPv6: Intel I210 Network 00 at Baseboard    /Pci(0x1d,0x3)/Pci(0x0,0x0)/MAC(a4bf012063f3,0)/IPv6([::]:<->[::]:,0,0)N.....YM....R,Y.
    Boot0005* Launch EFI Shell    FvVol(cdbb7b35-6833-4ed6-9ab2-57d2acddf6f0)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)
    Boot0006* UEFI IPv4: Intel I210 Network 00 at Baseboard 2    /Pci(0x1d,0x3)/Pci(0x0,0x0)/MAC(a4bf012063f3,0)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
    Boot0007* UEFI IPv6: Intel I210 Network 00 at Baseboard 2    /Pci(0x1d,0x2)/Pci(0x0,0x0)/MAC(a4bf012063f2,0)/IPv6([::]:<->[::]:,0,0)N.....YM....R,Y.
    Boot0008* centos    HD(1,GPT,050ee7d4-35c8-453b-98be-dc1136ec1b7d,0x800,0xff800)/File(\EFI\centos\grubx64.efi)
    Boot0009* centos7_64 (GRUB) (first drive nvme0n1)    HD(1,GPT,050ee7d4-35c8-453b-98be-dc1136ec1b7d,0x800,0xff800)/File(\EFI\centos\grubx64.efi)
    Boot000A* UEFI Misc Device    /Pci(0x1,0x1)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)N.....YM....R,Y.
    It's booting from the 3rd entrty which is the NIC (booting in the standard OS kernel on the drives, not the OVH custom kernel)
     
  15. Matt

    Matt Moderator Staff Member

    848
    372
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +579
    Local Time:
    10:01 PM
    1.5.15
    MariaDB 10.2
    Code:
    [18:02][[email protected]*]# egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/grub2/grub.cfg
        linuxefi /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=0239b761:92ee10a0:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 noquiet nosplash net.ifnames=0 biosdevname=0 LANG=en_US.UTF-8
        initrdefi /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
        linuxefi /boot/vmlinuz-3.10.0-957.12.2.el7.x86_64 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=0239b761:92ee10a0:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 noquiet nosplash net.ifnames=0 biosdevname=0
        initrdefi /boot/initramfs-3.10.0-957.12.2.el7.x86_64.img
        linuxefi /boot/vmlinuz-0-rescue-9139efd81b40e4f54a7681b55cf760f7 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=0239b761:92ee10a0:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 noquiet nosplash net.ifnames=0 biosdevname=0
        initrdefi /boot/initramfs-0-rescue-9139efd81b40e4f54a7681b55cf760f7.img
    [18:04][[email protected]*]# egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/efi/EFI/centos/grub.cfg
        linuxefi /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=0239b761:92ee10a0:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 noquiet nosplash net.ifnames=0 biosdevname=0
        initrdefi /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
        linuxefi /boot/vmlinuz-3.10.0-957.12.2.el7.x86_64 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=0239b761:92ee10a0:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 noquiet nosplash net.ifnames=0 biosdevname=0
        initrdefi /boot/initramfs-3.10.0-957.12.2.el7.x86_64.img
        linuxefi /boot/vmlinuz-0-rescue-9139efd81b40e4f54a7681b55cf760f7 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=0239b761:92ee10a0:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 noquiet nosplash net.ifnames=0 biosdevname=0
        initrdefi /boot/initramfs-0-rescue-9139efd81b40e4f54a7681b55cf760f7.img
     
  16. eva2000

    eva2000 Administrator Staff Member

    41,754
    9,400
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,445
    Local Time:
    7:01 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    or is boot order for 0003 then 0009

    Boot0009* centos7_64 (GRUB) (first drive nvme0n1)

    then

    Boot0008* centos HD
     
  17. Matt

    Matt Moderator Staff Member

    848
    372
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +579
    Local Time:
    10:01 PM
    1.5.15
    MariaDB 10.2
    Yeah, but look at bootcurrent
    Code:
    18:02][[email protected]*]# efibootmgr -v
    BootCurrent: 0003
    Timeout: 0 seconds
    BootOrder: 0003,0009,0008,0006,0004,0005,0007,0000,0001,0002
     
  18. Matt

    Matt Moderator Staff Member

    848
    372
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +579
    Local Time:
    10:01 PM
    1.5.15
    MariaDB 10.2
    another OVH server a customer has which has never been rebooted

    Code:
    [[email protected] ~]# efibootmgr
    ls -lah /boot/efi/EFI/centos
    BootCurrent: 0003
    Timeout: 0 seconds
    BootOrder: 0003,000B,0009,0006,0004,0005,0007,0000,0001,0002
    Boot0000* Enter Setup
    Boot0001  Boot Device List
    Boot0002  Network Boot
    Boot0003* UEFI IPv4: Intel I210 Network 00 at Baseboard
    Boot0004* UEFI IPv6: Intel I210 Network 00 at Baseboard
    Boot0005* Launch EFI Shell
    Boot0006* UEFI IPv4: Intel I210 Network 00 at Baseboard 2
    Boot0007* UEFI IPv6: Intel I210 Network 00 at Baseboard 2
    Boot0008* UEFI Misc Device
    Boot0009* centos
    Boot000A* UEFI Misc Device 2
    Boot000B* centos7_64 (GRUB) (first drive nvme0n1)
    [[email protected] ~]# ls -lah /boot/efi/EFI/centos
    total 156K
    drwxr-xr-x. 3 root root 4.0K Feb 10  2019 .
    drwxr-xr-x. 3 root root 4.0K Feb 18  2019 ..
    drwxr-xr-x. 2 root root 4.0K Feb 10  2019 fonts
    -rwxr-xr-x. 1 root root 1.0K Aug 11 03:46 grubenv
    -rwxr-xr-x. 1 root root 138K Feb 10  2019 grubx64.efi
    [[email protected] ~]# ls -lah /sys/firmware/efi
    total 0
    drwxr-xr-x.  5 root root    0 Sep 14 14:17 .
    drwxr-xr-x.  7 root root    0 Feb 10  2019 ..
    -r--r--r--.  1 root root 4.0K Feb 10  2019 config_table
    drwxr-xr-x.  2 root root    0 Feb 10  2019 efivars
    -r--r--r--.  1 root root 4.0K Sep 14 14:17 fw_platform_size
    -r--r--r--.  1 root root 4.0K Feb 10  2019 fw_vendor
    -r--r--r--.  1 root root 4.0K Feb 10  2019 runtime
    drwxr-xr-x.  8 root root    0 Feb 10  2019 runtime-map
    -r--------.  1 root root 4.0K Feb 10  2019 systab
    drwxr-xr-x. 92 root root    0 Sep 14 14:17 vars
    [[email protected] ~]# dmsg | grep -i efi
    -bash: dmsg: command not found
    [[email protected] ~]# egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/grub2/grub.cfg
            linuxefi /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=7f6baae9:f01f6156:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 rootflags=uquota noquiet nosplash net.ifnames=0 biosdevname=0 LANG=en_US.UTF-8
            initrdefi /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
            linuxefi /boot/vmlinuz-3.10.0-957.5.1.el7.x86_64 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=7f6baae9:f01f6156:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 rootflags=uquota noquiet nosplash net.ifnames=0 biosdevname=0
            initrdefi /boot/initramfs-3.10.0-957.5.1.el7.x86_64.img
            linuxefi /boot/vmlinuz-0-rescue-ccd3ffab29f1fab8bed3c8f85c602916 root=/dev/md2 ro crashkernel=auto rhgb quiet vga=normal nomodeset rd.auto=1 rd.md.uuid=7f6baae9:f01f6156:a4d2adc2:26fd5302 rootdelay=10 rootdelay=10 rootflags=uquota noquiet nosplash net.ifnames=0 biosdevname=0
            initrdefi /boot/initramfs-0-rescue-ccd3ffab29f1fab8bed3c8f85c602916.img
    [[email protected] ~]# egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/efi/EFI/centos/grub.cfg
    grep: /boot/efi/EFI/centos/grub.cfg: No such file or directory
    [[email protected] ~]# df -hT
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/md2       xfs       417G   56G  361G  14% /
    devtmpfs       devtmpfs   32G     0   32G   0% /dev
    tmpfs          tmpfs      32G   12K   32G   1% /dev/shm
    tmpfs          tmpfs      32G  3.2G   29G  10% /run
    tmpfs          tmpfs      32G     0   32G   0% /sys/fs/cgroup
    /dev/nvme0n1p1 vfat      510M  2.7M  508M   1% /boot/efi
    /dev/loop0     ext3      3.9G  8.6M  3.7G   1% /tmp
    tmpfs          tmpfs     6.3G     0  6.3G   0% /run/user/0
     
  19. eva2000

    eva2000 Administrator Staff Member

    41,754
    9,400
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,445
    Local Time:
    7:01 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    ah yes wonder if that is so OVH network recovery disk can work ?

    thanks Matt, sort of confirms how I can check if server is booting from UEFI bios or not

    1. grub.cf entries load /boot/vmlinuz via linuxefi instead of linux16 and load /boot/initramfs using initrdefi instead of initrd16

    2. efibootmgr returns info instead of
    Code (Text):
    efibootmgr
    EFI variables are not supported on this system.
    


    3. directory for /sys/firmware/efi exists

    4. nvme labaled mount goes to /boot/efi (UEFI) instead of /boot (non-UEFI)

    your output shows /boot/efi
    Code (Text):
    df -hT
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/md2       ext4      1.8T  507G  1.2T  31% /
    devtmpfs       devtmpfs   63G     0   63G   0% /dev
    tmpfs          tmpfs      63G   20M   63G   1% /dev/shm
    tmpfs          tmpfs      63G  4.1G   59G   7% /run
    tmpfs          tmpfs      63G     0   63G   0% /sys/fs/cgroup
    /dev/nvme0n1p1 vfat      510M  152K  510M   1% /boot/efi
    tmpfs          tmpfs      13G     0   13G   0% /run/user/0
    

    on my 1.2TB NVMe servers it shows mount is /boot and not /boot/efi and grub shows loading via linux16 instead of linuxefi and /sys/firmware/efi doesn't exist on my servers so suggests non-UEFI bios
    Code (Text):
    df -hT
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/nvme0n1p2 ext4      1.1T  1.3G  1.1T   1% /
    devtmpfs       devtmpfs   16G     0   16G   0% /dev
    tmpfs          tmpfs      16G     0   16G   0% /dev/shm
    tmpfs          tmpfs      16G  8.9M   16G   1% /run
    tmpfs          tmpfs      16G     0   16G   0% /sys/fs/cgroup
    /dev/nvme0n1p1 ext4      976M  149M  761M  17% /boot
    tmpfs          tmpfs     3.2G     0  3.2G   0% /run/user/0
    

    Code (Text):
    egrep 'linux16|initrd16|linuxefi|initrdefi' /boot/grub2/grub.cfg
            linux16 /vmlinuz-3.10.0-957.27.2.el7.x86_64 root=UUID=b069c64f-8c96-436a-92ed-367ca3ff21b7 ro crashkernel=auto rhgb quiet LANG=en_US.UTF-8
            initrd16 /initramfs-3.10.0-957.27.2.el7.x86_64.img
            linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=UUID=b069c64f-8c96-436a-92ed-367ca3ff21b7 ro crashkernel=auto rhgb quiet LANG=en_US.UTF-8
            initrd16 /initramfs-3.10.0-957.el7.x86_64.img
            linux16 /vmlinuz-0-rescue-0cc0bdde29a447c29dd1c7eff80c1b40 root=UUID=b069c64f-8c96-436a-92ed-367ca3ff21b7 ro crashkernel=auto rhgb quiet
            initrd16 /initramfs-0-rescue-0cc0bdde29a447c29dd1c7eff80c1b40.img
    

    blank on supposed non-UEFI bios so legacy bios
    Code (Text):
    ls -lah /boot/efi/EFI/centos/                                       
    total 8.0K
    drwx------. 2 root root 4.0K Jan 30  2019 .
    drwxr-xr-x. 3 root root 4.0K Sep 13 12:21 ..
    

    so in theory my 1.2TB NVMe server is not booting via UEFI bios and using legacy bios and shoud NOT need to do extra command (grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg) to regenerate grub.cfg on bios updates like the servers from OVH mentioned in this thread
     
  20. Matt

    Matt Moderator Staff Member

    848
    372
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +579
    Local Time:
    10:01 PM
    1.5.15
    MariaDB 10.2
    upload_2019-9-14_19-18-49.png
     
  21. eva2000

    eva2000 Administrator Staff Member

    41,754
    9,400
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,445
    Local Time:
    7:01 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yeah missing grub2-efi.cfg on your OVH servers which suggest high likelihood you'd run into this thread's original issue of reboot not working if you have OVH CentOS 7 OS image and updating linux kernel + reboot of server as OVH server's use UEFI bios and NVMe mounted /boot/efi partition so looking for /boot/efi/EFI/centos/grub.cfg instead of normal /boot/grub2/grub.cfg
     
    • Agree Agree x 1