part_gpt module not found

Hi,

I’ve installed openSUSE tumbleweed, now I want to make changes to grub but when i run grub2-mkconfig the result is:

 insmod: ERROR: could not load module part_gpt: No such file or directory 

How can I install part_gpt module ?

Hi, welcome

AFAIK that’s part of the GRUB install, so it should already be on your system. Did you upgrade already? If so, by ‘zypper dup’ ?
Are we talking about a UEFI / Secureboot ?

EDIT: Is this one a 32bit or 64bit install?

That should be the file “/boot/grub2/i386-pc/part_gpt.mod”
or perhaps the file “/boot/grub2/x86_64-efi/part_gpt.mod”
and it should already be on your system. Which of those you should have depends on whether you are using “grub2” or “grub2-efi” for booting.

Are we talking about a UEFI / Secureboot ?

EDIT: Is this one a 32bit or 64bit install?

Yes it’s UEFI system 64 bit and Secureboot is set to true.

That should be the file “/boot/grub2/i386-pc/part_gpt.mod”
or perhaps the file “/boot/grub2/x86_64-efi/part_gpt.mod”

exactly I have part_gpt.mod in /boot/grub2/x86_64-efi. but if I run insmod part_gpt the result is the same.

What changes?

but when i run grub2-mkconfig the result is:

This is very unlikely “result of grub2-mkconfig” as this command does not run “insmod”. Please explain what you mean. If this message is really result of grub2-mkconfig, copy and paste here full invocation and its output. Otherwise please explain when exactly you see this message.

For secure boot signed grub2 binary with disabled module loading is used. This binary includes part_gpt.mod. You really need to explain what and why you are trying to do.

I want to change a splash screen at boot.

This is very unlikely “result of grub2-mkconfig” as this command does not run “insmod”. Please explain what you mean. If this message is really result of grub2-mkconfig, copy and paste here full invocation and its output. Otherwise please explain when exactly you see this message.

andrea@linux-4pag  ~  sudo grub2-mkconfig[sudo] password for root: 
insmod: ERROR: could not load module part_gpt: No such file or directory

I remember that secure boot is enable because when I have installed openSUSE, I left the default settings.

And to achieve it you did what?

andrea@linux-4pag  ~  sudo grub2-mkconfig[sudo] password for root: 
insmod: ERROR: could not load module part_gpt: No such file or directory

You apparently added some custom file to /etc/grub.d that contains literal grub commands. But that is still just a guess without knowing what you actually did.

Currently still nothing. I only read that I could change the parameters of the grub from yast, if I go to Yast -> boot loader I get this error:http://i65.tinypic.com/30lyk92.jpg

/etc/default/grub

## DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#


### BEGIN /etc/grub.d/00_header ###
if  -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif  -s $prefix/grubenv ]; then
  load_env
fi


if  "${env_block}" ] ; then
  load_env -f "${env_block}"
fi


if  "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   if  "${env_block}" ] ; then
     save_env -f "${env_block}" next_entry
   fi
   set boot_once=true
else
   set default="0"
fi


if  x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi


export menuentry_id_option


if  "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi


function savedefault {
  if  -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
    if  "${env_block}" ] ; then
      save_env -f "${env_block}" saved_entry
    fi


  fi
}


function load_video {
  if  x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}


if  x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
if  x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  eedf89e3-5e30-485b-8624-d4e3f8705cf0
else
  search --no-floppy --fs-uuid --set=root eedf89e3-5e30-485b-8624-d4e3f8705cf0
fi
    font="/usr/share/grub2/unicode.pf2"
fi


if loadfont $font ; then
echo "Please press t to show the boot menu on this console"
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if  x${boot_once} = xtrue ]; then
  set timeout=0
elif  x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###


### BEGIN /etc/grub.d/00_tuned ###
set tuned_params=""
set tuned_initrd=""
### END /etc/grub.d/00_tuned ###


### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE Tumbleweed'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    if  x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  eedf89e3-5e30-485b-8624-d4e3f8705cf0
    else
      search --no-floppy --fs-uuid --set=root eedf89e3-5e30-485b-8624-d4e3f8705cf0
    fi
    echo    'Loading Linux 4.16.6-1-default ...'
    linux    /boot/vmlinuz-4.16.6-1-default root=UUID=eedf89e3-5e30-485b-8624-d4e3f8705cf0  
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd-4.16.6-1-default
}
submenu 'Advanced options for openSUSE Tumbleweed' --hotkey=1 $menuentry_id_option 'gnulinux-advanced-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
    menuentry 'openSUSE Tumbleweed, with Linux 4.16.6-1-default' --hotkey=2 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.6-1-default-advanced-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        if  x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  eedf89e3-5e30-485b-8624-d4e3f8705cf0
        else
          search --no-floppy --fs-uuid --set=root eedf89e3-5e30-485b-8624-d4e3f8705cf0
        fi
        echo    'Loading Linux 4.16.6-1-default ...'
        linux    /boot/vmlinuz-4.16.6-1-default root=UUID=eedf89e3-5e30-485b-8624-d4e3f8705cf0  
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd-4.16.6-1-default
    }
    menuentry 'openSUSE Tumbleweed, with Linux 4.16.6-1-default (recovery mode)' --hotkey=3 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.6-1-default-recovery-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        if  x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  eedf89e3-5e30-485b-8624-d4e3f8705cf0
        else
          search --no-floppy --fs-uuid --set=root eedf89e3-5e30-485b-8624-d4e3f8705cf0
        fi
        echo    'Loading Linux 4.16.6-1-default ...'
        linux    /boot/vmlinuz-4.16.6-1-default root=UUID=eedf89e3-5e30-485b-8624-d4e3f8705cf0  
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd-4.16.6-1-default
    }
    menuentry 'openSUSE Tumbleweed, with Linux 4.16.6-1-debug'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.6-1-debug-advanced-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        if  x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  eedf89e3-5e30-485b-8624-d4e3f8705cf0
        else
          search --no-floppy --fs-uuid --set=root eedf89e3-5e30-485b-8624-d4e3f8705cf0
        fi
        echo    'Loading Linux 4.16.6-1-debug ...'
        linux    /boot/vmlinuz-4.16.6-1-debug root=UUID=eedf89e3-5e30-485b-8624-d4e3f8705cf0  
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd-4.16.6-1-debug
    }
    menuentry 'openSUSE Tumbleweed, with Linux 4.16.6-1-debug (recovery mode)' --hotkey=1 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.6-1-debug-recovery-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        if  x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  eedf89e3-5e30-485b-8624-d4e3f8705cf0
        else
          search --no-floppy --fs-uuid --set=root eedf89e3-5e30-485b-8624-d4e3f8705cf0
        fi
        echo    'Loading Linux 4.16.6-1-debug ...'
        linux    /boot/vmlinuz-4.16.6-1-debug root=UUID=eedf89e3-5e30-485b-8624-d4e3f8705cf0  
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd-4.16.6-1-debug
    }
}


### END /etc/grub.d/10_linux ###


### BEGIN /etc/grub.d/20_linux_xen ###
menuentry 'openSUSE Tumbleweed, with Xen hypervisor' --class opensuse --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-simple-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
    insmod part_gpt
    insmod fat
    if  x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  2CC0-9413
    else
      search --no-floppy --fs-uuid --set=root 2CC0-9413
    fi
     echo    'Loading Xen 4.10.0_18-1 with Linux 4.16.6-1-default ...'
     chainloader  /efi/opensuse/xen-4.10.0_18-1.efi xen-4.10.0_18-1.efi  config.1
}
submenu 'Advanced options for openSUSE Tumbleweed (with Xen hypervisor)' $menuentry_id_option 'gnulinux-advanced-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
    submenu 'Xen hypervisor, version 4.10.0_18-1' $menuentry_id_option 'xen-hypervisor-4.10.0_18-1-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
        menuentry 'openSUSE Tumbleweed, with Xen 4.10.0_18-1 and Linux 4.16.6-1-default' --class opensuse --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-4.16.6-1-default-advanced-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
            insmod part_gpt
            insmod fat
            if  x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  2CC0-9413
            else
              search --no-floppy --fs-uuid --set=root 2CC0-9413
            fi
             echo    'Loading Xen 4.10.0_18-1 with Linux 4.16.6-1-default ...'
             chainloader  /efi/opensuse/xen-4.10.0_18-1.efi xen-4.10.0_18-1.efi  config.2
        }
        menuentry 'openSUSE Tumbleweed, with Xen 4.10.0_18-1 and Linux 4.16.6-1-default (recovery mode)' --class opensuse --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-4.16.6-1-default-recovery-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
            insmod part_gpt
            insmod fat
            if  x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  2CC0-9413
            else
              search --no-floppy --fs-uuid --set=root 2CC0-9413
            fi
             echo    'Loading Xen 4.10.0_18-1 with Linux 4.16.6-1-default ...'
             chainloader  /efi/opensuse/xen-4.10.0_18-1.efi xen-4.10.0_18-1.efi  failsafe.3
        }
        menuentry 'openSUSE Tumbleweed, with Xen 4.10.0_18-1 and Linux 4.16.6-1-debug' --class opensuse --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-4.16.6-1-debug-advanced-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
            insmod part_gpt
            insmod fat
            if  x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  2CC0-9413
            else
              search --no-floppy --fs-uuid --set=root 2CC0-9413
            fi
             echo    'Loading Xen 4.10.0_18-1 with Linux 4.16.6-1-debug ...'
             chainloader  /efi/opensuse/xen-4.10.0_18-1.efi xen-4.10.0_18-1.efi  config.4
        }
        menuentry 'openSUSE Tumbleweed, with Xen 4.10.0_18-1 and Linux 4.16.6-1-debug (recovery mode)' --class opensuse --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-4.16.6-1-debug-recovery-eedf89e3-5e30-485b-8624-d4e3f8705cf0' {
            insmod part_gpt
            insmod fat
            if  x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  2CC0-9413
            else
              search --no-floppy --fs-uuid --set=root 2CC0-9413
            fi
             echo    'Loading Xen 4.10.0_18-1 with Linux 4.16.6-1-debug ...'
             chainloader  /efi/opensuse/xen-4.10.0_18-1.efi xen-4.10.0_18-1.efi  failsafe.5
        }
    }
}


### END /etc/grub.d/20_linux_xen ###


### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###


### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-2CC0-9413' {
    insmod part_gpt
    insmod fat
    if  x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  2CC0-9413
    else
      search --no-floppy --fs-uuid --set=root 2CC0-9413
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###


### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###


### BEGIN /etc/grub.d/41_custom ###
if  -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif  -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###


### BEGIN /etc/grub.d/80_suse_btrfs_snapshot ###
### END /etc/grub.d/80_suse_btrfs_snapshot ###


### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###


### BEGIN /etc/grub.d/95_textmode ###


    # On EFI systems we can only have graphics *or* serial, so allow the user
    # to switch between the two
    hiddenentry 'Text mode' --hotkey 't' {
    set textmode=true
    terminal_output console
    }
### END /etc/grub.d/95_textmode ###

I voluntarily did not modify anything. In the end I decided that I will reinstall the whole system by disabling secure boot during installation. In this way we should solve every problem. Unfortunately it was my fault, I did not read the openSUSE documentation about secure boot and I left it enabled as the default setting.
So, from what I understood by leaving it enabled I would need to sign the kernel with a key and compile it, since I did not, the kernel is not compiled with modules like part_gpt right?

I do not see any error

/etc/default/grub

## DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub

Somehow you managed to overwrite /etc/default/grub with output of grub2-mkconfig which should go into /boot/grub2/grub.cfg instead.