Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
EvanFoss
n00b
n00b


Joined: 12 Oct 2019
Posts: 13

PostPosted: Thu Sep 19, 2024 8:46 pm    Post subject: grub Reply with quote

Hi Gentoo Forum,

I am trying to install gentoo on a new laptop and I am having issues with grub. At boot it keeps dumping me out at the "Bash like" screen.

grub-mkconfig -o /boot/grub.cfg
grub-install --efi-directory=/boot/EFI /boot/grub.cfg

I also tried...
grub-install --efi-directory=/boot/EFI --target=x86_64-efi /boot/grub.cfg

Note that I do have /boot/EFI mounted. This is my "disk" configuration:
Command (m for help): p

Disk /dev/nvme0n1: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 980 PRO 2TB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 924C3235-921C-4914-A40B-351C83824DB5

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 2099199 2097152 1G EFI System
/dev/nvme0n1p2 2099200 73402367 71303168 34G Linux swap
/dev/nvme0n1p3 73402368 3907028991 3833626624 1.8T Linux filesystem

nvme0n1p1 is formatted vfat
nvme0n1p3 is formatted ext4

The grub.cfg file looks right compared to the ones on my other machines. It specifies the UUID, kernel, etc.

It might be connected but when I built kernel linux-6.6.47-gentoo the make install didn't work and I had to copy the files manually.

Code:

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

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   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
  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
search --no-floppy --fs-uuid --set=root hd0,gpt3
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
if [ 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/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f13d81a3-3188-4912-963d-db9274a03ff6' {
   load_video
   if [ "x$grub_platform" = xefi ]; then
      set gfxpayload=keep
   fi
   insmod gzio
   insmod part_gpt
   insmod ext2
   search --no-floppy --fs-uuid --set=root f13d81a3-3188-4912-963d-db9274a03ff6
   echo   'Loading Linux 6.6.47-gentoo ...'
   linux   /boot/vmlinuz-6.6.47-gentoo root=PARTUUID=5eb57b74-24a4-49ce-966a-0293b97e081e ro 
   echo   'Loading initial ramdisk ...'
   initrd   /boot/amd-uc.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-f13d81a3-3188-4912-963d-db9274a03ff6' {
   menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-advanced-f13d81a3-3188-4912-963d-db9274a03ff6' {
      load_video
      if [ "x$grub_platform" = xefi ]; then
         set gfxpayload=keep
      fi
      insmod gzio
      insmod part_gpt
      insmod ext2
      search --no-floppy --fs-uuid --set=root f13d81a3-3188-4912-963d-db9274a03ff6
      echo   'Loading Linux 6.6.47-gentoo ...'
      linux   /boot/vmlinuz-6.6.47-gentoo root=PARTUUID=5eb57b74-24a4-49ce-966a-0293b97e081e ro 
      echo   'Loading initial ramdisk ...'
      initrd   /boot/amd-uc.img
   }
   menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-recovery-f13d81a3-3188-4912-963d-db9274a03ff6' {
      load_video
      if [ "x$grub_platform" = xefi ]; then
         set gfxpayload=keep
      fi
      insmod gzio
      insmod part_gpt
      insmod ext2
      search --no-floppy --fs-uuid --set=root f13d81a3-3188-4912-963d-db9274a03ff6
      echo   'Loading Linux 6.6.47-gentoo ...'
      linux   /boot/vmlinuz-6.6.47-gentoo root=PARTUUID=5eb57b74-24a4-49ce-966a-0293b97e081e ro single
      echo   'Loading initial ramdisk ...'
      initrd   /boot/amd-uc.img
   }
}

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

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

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
   menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
      fwsetup
   }
fi
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###
Back to top
View user's profile Send private message
EvanFoss
n00b
n00b


Joined: 12 Oct 2019
Posts: 13

PostPosted: Thu Sep 19, 2024 9:28 pm    Post subject: Reply with quote

If I enter the grub shell:

configfile /boot/grub.cfg

it will load the config file and I get the boot menu and after a little fixing my kernel loads. So it's just grub not seeing it's own config for some reason.
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 429
Location: Nijmegen

PostPosted: Fri Sep 20, 2024 8:02 am    Post subject: Reply with quote

Quote:
/boot/grub.cfg


It should be /boot/grub/grub.cfg
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
EvanFoss
n00b
n00b


Joined: 12 Oct 2019
Posts: 13

PostPosted: Fri Sep 20, 2024 4:57 pm    Post subject: Reply with quote

AndrewAmmerlaan wrote:
Quote:
/boot/grub.cfg


It should be /boot/grub/grub.cfg


Thanks that worked!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum