Announcement

Collapse
No announcement yet.

Kernel problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kernel problem

    Hi

    In CL 8.8 I have a problem, the kernel not loaded.
    Almalinux + CL + cPanel

    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    Generating grub configuration file ...
    /usr/bin/grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such fileor directory.​

    How to fix it please ?

  • #2
    Hi,

    Do you have the /boot/grub2 mounted? What is inside when you list it?
    Code:
    ls -la /boot/grub2

    Comment


    • #3
      Hi

      ls -la /boot/grub2
      total 44
      drwx------. 4 root root 126 Aug 4 06:43 .
      dr-xr-xr-x. 6 root root 4096 Aug 2 21:17 ..
      drwxr-xr-x. 2 root root 25 May 24 17:55 fonts
      -rw-------. 1 root root 12379 Aug 3 21:45 grub.cfg
      -rw------- 1 root root 4312 Aug 4 06:43 grub.cfg.new
      lrwxrwxrwx 1 root root 25 Aug 2 19:04 grubenv -> ../efi/EFI/centos/grubenv
      -rw-r--r-- 1 root root 1024 Aug 4 06:43 grubenv.new
      lrwxrwxrwx 1 root root 25 Apr 14 11:05 grubenv.rpmnew -> ../efi/EFI/centos/grubenv
      drwxr-xr-x. 2 root root 8192 May 24 17:55 i386-pc​

      Comment


      • #4
        Okay, do you have the /boot/efi/ mounted?

        Comment


        • #5
          Originally posted by bogdan.sh View Post
          Okay, do you have the /boot/efi/ mounted?
          How to know that it is mounted ?

          Comment


          • #6
            Show the content of /boot/ :
            Code:
            ls -la /boot/

            Comment


            • #7
              ls -la /boot/
              total 449780
              dr-xr-xr-x. 6 root root 4096 Aug 2 21:17 .
              dr-xr-xr-x. 18 root root 4096 Aug 4 07:36 ..
              -rw-r--r--. 1 root root 200377 May 16 11:42 config-4.18.0-477.10.1.el8_8.x86_64
              -rw-r--r-- 1 root root 200515 Jul 17 19:27 config-4.18.0-477.13.1.lve.1.el8.x86_64
              -rw-r--r-- 1 root root 201558 Jul 17 19:03 config-4.18.0-477.13.1.lve.1.el8.x86_64+debug
              -rw-r--r--. 1 root root 200377 Jul 24 09:05 config-4.18.0-477.15.1.el8_8.x86_64
              drwxr-xr-x 3 root root 16384 Jan 1 1970 efi
              drwxr-xr-x. 2 root root 39 May 24 17:57 grub
              drwx------. 4 root root 126 Aug 4 06:43 grub2
              -rw-------. 1 root root 63582409 May 24 17:55 initramfs-0-rescue-2499f61b48624200af33217233e070bd.img
              -rw-------. 1 root root 73428246 Jul 31 06:05 initramfs-0-rescue-4decec7247ac438bb6509ac74522bd1d.img
              -rw------- 1 root root 78330847 Aug 1 16:21 initramfs-0-rescue-a116afcdb59d4e0ebff2720230c2dbc5.img
              -rw-------. 1 root root 33403348 Aug 1 16:21 initramfs-4.18.0-477.10.1.el8_8.x86_64.img
              -rw------- 1 root root 36709796 Aug 2 21:17 initramfs-4.18.0-477.13.1.lve.1.el8.x86_64+debug.img
              -rw------- 1 root root 33427667 Aug 2 21:08 initramfs-4.18.0-477.13.1.lve.1.el8.x86_64.img
              -rw-------. 1 root root 33407750 Aug 1 16:21 initramfs-4.18.0-477.15.1.el8_8.x86_64.img
              drwxr-xr-x. 3 root root 21 May 24 17:54 loader
              lrwxrwxrwx 1 root root 52 Aug 1 16:20 symvers-4.18.0-477.10.1.el8_8.x86_64.gz -> /lib/modules/4.18.0-477.10.1.el8_8.x86_64/symvers.gz
              lrwxrwxrwx 1 root root 62 Aug 2 21:17 symvers-4.18.0-477.13.1.lve.1.el8.x86_64+debug.gz -> /lib/modules/4.18.0-477.13.1.lve.1.el8.x86_64+debug/symvers.gz
              lrwxrwxrwx 1 root root 56 Aug 2 21:07 symvers-4.18.0-477.13.1.lve.1.el8.x86_64.gz -> /lib/modules/4.18.0-477.13.1.lve.1.el8.x86_64/symvers.gz
              lrwxrwxrwx 1 root root 52 Aug 1 16:21 symvers-4.18.0-477.15.1.el8_8.x86_64.gz -> /lib/modules/4.18.0-477.15.1.el8_8.x86_64/symvers.gz
              -rw-------. 1 root root 4450954 May 16 11:42 System.map-4.18.0-477.10.1.el8_8.x86_64
              -rw------- 1 root root 4451335 Jul 17 19:27 System.map-4.18.0-477.13.1.lve.1.el8.x86_64
              -rw------- 1 root root 5248593 Jul 17 19:03 System.map-4.18.0-477.13.1.lve.1.el8.x86_64+debug
              -rw-------. 1 root root 4451107 Jul 24 09:05 System.map-4.18.0-477.15.1.el8_8.x86_64
              -rwxr-xr-x. 1 root root 10843912 May 24 17:55 vmlinuz-0-rescue-2499f61b48624200af33217233e070bd
              -rwxr-xr-x. 1 root root 10843912 Jul 31 06:05 vmlinuz-0-rescue-4decec7247ac438bb6509ac74522bd1d
              -rwxr-xr-x 1 root root 10843912 Aug 1 16:21 vmlinuz-0-rescue-a116afcdb59d4e0ebff2720230c2dbc5
              -rwxr-xr-x. 1 root root 10843912 May 16 11:42 vmlinuz-4.18.0-477.10.1.el8_8.x86_64
              -rw-r--r--. 1 root root 173 May 16 11:41 .vmlinuz-4.18.0-477.10.1.el8_8.x86_64.hmac
              -rwxr-xr-x 1 root root 10842752 Jul 17 19:28 vmlinuz-4.18.0-477.13.1.lve.1.el8.x86_64
              -rwxr-xr-x 1 root root 23728768 Jul 17 19:04 vmlinuz-4.18.0-477.13.1.lve.1.el8.x86_64+debug
              -rw-r--r-- 1 root root 183 Jul 17 19:02 .vmlinuz-4.18.0-477.13.1.lve.1.el8.x86_64+debug.hmac
              -rw-r--r-- 1 root root 177 Jul 17 19:26 .vmlinuz-4.18.0-477.13.1.lve.1.el8.x86_64.hmac
              -rwxr-xr-x. 1 root root 10843912 Jul 24 09:06 vmlinuz-4.18.0-477.15.1.el8_8.x86_64
              -rw-r--r--. 1 root root 173 Jul 24 09:04 .vmlinuz-4.18.0-477.15.1.el8_8.x86_64.hmac​

              Comment


              • #8
                And please:

                Code:
                ls -la /boot/efi/

                Comment


                • #9
                  Originally posted by bogdan.sh View Post
                  And please:

                  Code:
                  ls -la /boot/efi/
                  ls -la /boot/efi/
                  total 28
                  drwxr-xr-x 3 root root 16384 Jan 1 1970 .
                  dr-xr-xr-x. 6 root root 4096 Aug 2 21:17 ..
                  drwxr-xr-x 4 root root 8192 Jul 31 06:06 EFI​

                  Comment


                  • #10
                    Need more, please:

                    Code:
                    blkid
                    grep -i efi /etc/fstab

                    Comment


                    • #11
                      blkid
                      /dev/nvme0n1p1: SEC_TYPE="msdos" LABEL="EFI_SYSPART" UUID="07D0-40C8" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="primary" PARTUUID="afeede4d-b5f2-4353-aa16-53687c4153e6"
                      /dev/nvme0n1p2: UUID="7b7128d8-28f9-9581-d993-5e64737e8353" UUID_SUB="4b3e3d37-8482-445b-3e9e-c4ea0d8b1850" LABEL="md2" TYPE="linux_raid_member" PARTLABEL="primary" PARTUUID="97224726-5bdd-4966-a6cd-403a31f2b311"
                      /dev/nvme0n1p3: UUID="5face237-ac19-ccc6-7cb8-1439b27a215e" UUID_SUB="41b1a7d5-872f-01cc-2e37-39c70bd651bb" LABEL="md3" TYPE="linux_raid_member" PARTLABEL="primary" PARTUUID="e4d7aecd-28e4-4c4e-ab18-c70bffda880c"
                      /dev/nvme0n1p4: LABEL="swap-nvme0n1p4" UUID="ad653e08-0971-460c-919e-1ba2a0c42070" TYPE="swap" PARTLABEL="primary"PARTUUID="035cf24f-3a98-4821-8403-0e1d0f88b0e7"
                      /dev/nvme0n1p5: BLOCK_SIZE="2048" UUID="2023-08-01-16-19-23-00" LABEL="config-2" TYPE="iso9660" PARTLABEL="logical" PARTUUID="9e4f32c3-0e7e-4288-b157-f7077094c348"
                      /dev/nvme1n1p1: SEC_TYPE="msdos" LABEL="EFI_SYSPART" UUID="07DB-7229" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="primary" PARTUUID="f5c0d377-41fb-4ee2-8b22-1b8604bfc8f2"
                      /dev/nvme1n1p2: UUID="7b7128d8-28f9-9581-d993-5e64737e8353" UUID_SUB="1674ccb0-cb02-3ca9-4b73-64dc625674a9" LABEL="md2" TYPE="linux_raid_member" PARTLABEL="primary" PARTUUID="d3555f7e-2e2d-4511-8ca6-af2aefb8d547"
                      /dev/nvme1n1p3: UUID="5face237-ac19-ccc6-7cb8-1439b27a215e" UUID_SUB="68b57137-09eb-227b-4bd8-af4fe26a8a43" LABEL="md3" TYPE="linux_raid_member" PARTLABEL="primary" PARTUUID="21d92f66-eab2-4b2e-a2b9-8caeb9cc2661"
                      /dev/nvme1n1p4: LABEL="swap-nvme1n1p4" UUID="541fda1a-b721-4bf7-8798-9c5c578cf40d" TYPE="swap" PARTLABEL="primary"PARTUUID="a543aafb-f214-47d3-a931-5066322779bb"
                      /dev/md3: LABEL="root" UUID="503eb818-43c7-4160-8b1a-e80a99474531" BLOCK_SIZE="512" TYPE="xfs"
                      /dev/md2: LABEL="boot" UUID="71297e82-2192-4b3c-94ba-697e861015c3" BLOCK_SIZE="512" TYPE="xfs"
                      /dev/loop0: UUID="e0b18ea1-e8ad-4fd3-a3ad-f4738336ee8b" BLOCK_SIZE="4096" TYPE="ext3"
                      /dev/nvme0n1: PTUUID="fa6b6d52-d788-4f7f-b0ef-984b84046f48" PTTYPE="gpt"
                      /dev/nvme1n1: PTUUID="8560d436-380e-494d-ba6b-42f197f65d6c" PTTYPE="gpt"​

                      Comment


                      • #12
                        grep -i efi /etc/fstab
                        /dev/nvme0n1p1 /boot/efi vfat defaults 0 1​

                        Comment


                        • #13
                          And the last one please:
                          Code:
                          cat /proc/mounts  | grep -i boot

                          Comment


                          • #14
                            Originally posted by bogdan.sh View Post
                            And the last one please:
                            Code:
                            cat /proc/mounts | grep -i boot
                            /dev/md2 /boot xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,n oquota 0 0
                            /dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,ioc harset=ascii,shortname=mixed,errors=remount-ro 0 0​

                            Comment


                            • #15
                              Hey there!

                              Can you confirm the kernel that it's loading? It's loading .15.1 instead of 13.2, I bet, are you able to run rpm -qa|grep kernel as well?

                              To sum it up, here's what I need you to run:

                              Code:
                              uname -r
                              
                              rpm -qa| grep kernel

                              And in order to attempt to fix it:

                              Code:
                              grub2-mkconfig -o /etc/grub2.cfg
                              grub2-mkconfig -o /etc/grub2-efi.cfg
                              grub2-mkconfig -o /boot/grub2/grub.cfg
                              grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg​
                              
                              rsync -avP /boot/efi/EFI/centos/ /boot/efi/EFI/almalinux/
                              grubby --set-default /boot/vmlinuz-4.18.0-477.13.1.lve.1.el8.x86_64
                              cp -rp /boot/efi/EFI/almalinux/grubenv /boot/efi/EFI/centos/grubenv​
                              Do give it a try.

                              Cheers!
                              Last edited by Miguel Varela; 08-04-2023, 01:05 PM.

                              Comment

                              Working...
                              X