Latest kernel does not show up in boot menu

General support questions
stargazer
Posts: 10
Joined: 2017/03/08 07:18:52

Re: Latest kernel does not show up in boot menu

Post by stargazer » 2017/04/28 16:26:17

Here's the output:

Code: Select all

# df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs        50G   13G   38G  26% /
devtmpfs                devtmpfs  3.9G     0  3.9G   0% /dev
tmpfs                   tmpfs     3.9G  788K  3.9G   1% /dev/shm
tmpfs                   tmpfs     3.9G  9.2M  3.9G   1% /run
tmpfs                   tmpfs     3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda2               xfs       494M  276M  219M  56% /boot
/dev/mapper/centos-home xfs       873G  341G  533G  39% /home
tmpfs                   tmpfs     787M   32K  787M   1% /run/user/562

Code: Select all

# cat /proc/mounts 
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=4012108k,nr_inodes=1003027,mode=755 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0
devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0
tmpfs /sys/fs/cgroup tmpfs ro,seclabel,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
/dev/mapper/centos-root / xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=34,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
/dev/sda2 /boot xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
/dev/mapper/centos-home /home xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
/etc/auto.misc /misc autofs rw,relatime,fd=7,pgrp=2262,timeout=300,minproto=5,maxproto=5,indirect 0 0
-hosts /net autofs rw,relatime,fd=13,pgrp=2262,timeout=300,minproto=5,maxproto=5,indirect 0 0
tmpfs /run/user/562 tmpfs rw,seclabel,nosuid,nodev,relatime,size=805616k,mode=700,uid=562,gid=500 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
gvfsd-fuse /run/user/562/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=562,group_id=500 0 0

Code: Select all

# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648      1435647    500M  Microsoft basic 
 3      1435648   1953523711  930.8G  Linux LVM       

Disk /dev/mapper/centos-swap: 8338 MB, 8338276352 bytes, 16285696 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/centos-home: 937.4 GB, 937439526912 bytes, 1830936576 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdb: 2000.4 GB, 2000396746752 bytes, 3907024896 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0008a108

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907024895  1953511424    7  HPFS/NTFS/exFAT

stargazer
Posts: 10
Joined: 2017/03/08 07:18:52

Re: Latest kernel does not show up in boot menu

Post by stargazer » 2017/05/04 18:26:42

I finally solved the issue with the latest kernel not showing up in the boot menu. It turns out that I had to run grub2-install after updating the configuration file. It took some trouble shooting to get grub2-install to work successfully, so I thought I would outline the steps I took:

First I updated the grub configuration file (not sure which file is the active one, so I updated both of these):
  • # grub2-mkconfig -o /boot/grub2/grub.cfg
    # grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
To get grub2-install to work, I first had to install the grub2-efi-modules package using yum. But then I got the following error message, "grub2-install: error: /boot/efi doesn't look like an EFI partition." It took a while to realize that I had to mount the EFI System Partition before I could run the install command. I ended up finding the relevant information using the "parted -l" command:
  • # parted -l
    Model: ATA ST1000LM024 HN-M (scsi)
    Disk /dev/sda: 1000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags:

    Number Start End Size File system Name Flags
    1 1049kB 211MB 210MB fat16 EFI System Partition boot
    2 211MB 735MB 524MB xfs
    3 735MB 1000GB 999GB lvm
Then I mounted /dev/sda1 and located the relevant EFI directory:
  • #mount /dev/sda1 /mnt

    # ls /mnt/EFI/centos
    BOOT.CSV fonts gcdx64.efi grub.cfg grubenv grubx64.efi MokManager.efi shim-centos.efi shim.efi
After this I was able to successfully update the grub installation:
  • # grub2-install --efi-directory=/mnt
    Installing for x86_64-efi platform.
    Installation finished. No error reported.
Then I rebooted my computer, and the most recent kernel finally showed up in the boot menu. Thanks for the help and suggestions along the way.

belgeadmin
Posts: 21
Joined: 2017/04/23 10:51:03
Location: Belgium

Re: Latest kernel does not show up in boot menu

Post by belgeadmin » 2017/05/04 19:23:17

Nice you succeeded :)

Its interesing that you dont use sda2 as a boot partition.

/dev/sda2 xfs 494M 276M 219M 56% /boot

So you have a little distorted grub configuration.
“If at first the idea is not absurd, then there is no hope for it.”

Post Reply