Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Not booting after install (luks/lvm/btrfs)
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
heleos
n00b
n00b


Joined: 24 Jul 2024
Posts: 4

PostPosted: Wed Jul 24, 2024 9:30 pm    Post subject: [Solved] Not booting after install (luks/lvm/btrfs) Reply with quote

Hello,

I'm attempting to come back to Gentoo after playing around with it 20 years ago.

Trying to get the hang of the install process for my desktop, I'm attempting a pretty basic installation on my laptop using as many binaries as I can and following the recommended programs for most options. After I complete the entire install, I attempt to reboot, and the boot process hangs after about 3 seconds, after detecting my USB ports. The symptoms looks almost identical to another forum post I found (https://forums.gentoo.org/viewtopic-t-996074-start-0.html)

I am using grub with an LVM on LUKS configuration. I used gentoo-kernel-bin with dracut. I am able to put in my password to decrypt the drive. The output is frozen after the USB detection, but if I plug in a usb drive, it shows it, so it isn't frozen, it just seems like it's hanging trying to find something.

I did not set a VIDEO_CARDS entry in my make.conf because I'm using integrated graphics on a laptop, would that still need to be set to amdgpu if it's a Ryzen processor? What can I provide that's useful to people?

I'll try to be a little proactive:

dracut.conf
Code:

kernel_cmdline="root=uuid=aa2f58ed-de76-49a7-9ba0-49215a96abff rootfstype=btrfs rootflags=rw,relatime,compress=zstd,subvolid=256,subvol=/@ rd.luks.uuid=be79bede-d6c0-4dcd-b37b-9db9f274404b rd.lvm.vg=system rd.lvm.lv=system/root rd.lvm.lv=system/swap rd.lvm.lv=system/home"


/etc/fstab
Code:

UUID=5FF4-3DB2               /efi      vfat   umask=0077                           0 2
UUID=aa2f58ed-de76-49a7-9ba0-49215a96abff   /      btrfs   rw,relatime,compress=zstd,ssd,discard=async,subvolid=256,subvol=/@      0 0
UUID=aa2f58ed-de76-49a7-9ba0-49215a96abff   /.snapshots   btrfs   rw,relatime,compress=zstd,ssd,discard=async,subvolid=257,subvol=/@snapshots   0 0
UUID=aa2f58ed-de76-49a7-9ba0-49215a96abff   /var/log   btrfs   rw,relatime,compress=zstd,ssd,discard=async,subvolid=258,subvol=/@log      0 0
UUID=aa2f58ed-de76-49a7-9ba0-49215a96abff   /.btrfsroot   btrfs   rw,relatime,compress=zstd,ssd,discard=async,subvolid=5,subvol=/         0 0
UUID=0ce7aa78-8486-4e28-adf9-856f0636ec2d   /home      xfs   defaults,noatime                        0 1
UUID=cf1d47ff-8531-44ce-825a-626f55e43abf   none      swap   sw                              0 0


/etc/default/grub
Code:

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
#     'grub-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_DISTRIBUTOR="Gentoo"
GRUB_ENABLE_CRYPTODISK=y
GRUB_PRELOAD_MODULES="lvm cryptodisk dmcrypt"
# Default menu entry
#GRUB_DEFAULT=0

# Boot the default entry this many seconds after the menu is displayed
#GRUB_TIMEOUT=5
#GRUB_TIMEOUT_STYLE=menu

# Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
#
# Boot with systemd instead of sysvinit (openrc)
# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"

# Append parameters to the linux kernel command line for non-recovery entries
#GRUB_CMDLINE_LINUX_DEFAULT=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
#GRUB_GFXMODE=640x480

# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
#GRUB_GFXPAYLOAD_LINUX=

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true

# Comment if you don't want GRUB to pass "root=PARTUUID=xxx" parameter to kernel
GRUB_DISABLE_LINUX_PARTUUID=false

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true

# Uncomment to disable generation of the submenu and put all choices on
# the top-level menu.
# Besides the visual affect of no sub menu, this makes navigation of the
# menu easier for a user who can't see the screen.
#GRUB_DISABLE_SUBMENU=y

# Uncomment to play a tone when the main menu is displayed.
# This is useful, for example, to allow users who can't see the screen
# to know when they can make a choice on the menu.
#GRUB_INIT_TUNE="60 800 1"


/boot/grub/grub.cfg
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 ###
insmod lvm
insmod cryptodisk
insmod dmcrypt
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 cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u be79bede-d6c0-4dcd-b37b-9db9f274404b
set root='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'  aa2f58ed-de76-49a7-9ba0-49215a96abff
else
  search --no-floppy --fs-uuid --set=root aa2f58ed-de76-49a7-9ba0-49215a96abff
fi
    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-aa2f58ed-de76-49a7-9ba0-49215a96abff' {
   load_video
   if [ "x$grub_platform" = xefi ]; then
      set gfxpayload=keep
   fi
   insmod gzio
   insmod part_gpt
   insmod cryptodisk
   insmod luks
   insmod gcry_rijndael
   insmod gcry_rijndael
   insmod gcry_sha256
   insmod lvm
   insmod btrfs
   cryptomount -u be79bede-d6c0-4dcd-b37b-9db9f274404b
   set root='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'  aa2f58ed-de76-49a7-9ba0-49215a96abff
   else
     search --no-floppy --fs-uuid --set=root aa2f58ed-de76-49a7-9ba0-49215a96abff
   fi
   echo   'Loading Linux 6.6.35-gentoo-dist ...'
   linux   /@/boot/vmlinuz-6.6.35-gentoo-dist root=/dev/mapper/system-root ro rootflags=subvol=@ 
   echo   'Loading initial ramdisk ...'
   initrd   /@/boot/amd-uc.img /@/boot/initramfs-6.6.35-gentoo-dist.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-aa2f58ed-de76-49a7-9ba0-49215a96abff' {
   menuentry 'Gentoo GNU/Linux, with Linux 6.6.35-gentoo-dist' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.35-gentoo-dist-advanced-aa2f58ed-de76-49a7-9ba0-49215a96abff' {
      load_video
      if [ "x$grub_platform" = xefi ]; then
         set gfxpayload=keep
      fi
      insmod gzio
      insmod part_gpt
      insmod cryptodisk
      insmod luks
      insmod gcry_rijndael
      insmod gcry_rijndael
      insmod gcry_sha256
      insmod lvm
      insmod btrfs
      cryptomount -u be79bede-d6c0-4dcd-b37b-9db9f274404b
      set root='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'  aa2f58ed-de76-49a7-9ba0-49215a96abff
      else
        search --no-floppy --fs-uuid --set=root aa2f58ed-de76-49a7-9ba0-49215a96abff
      fi
      echo   'Loading Linux 6.6.35-gentoo-dist ...'
      linux   /@/boot/vmlinuz-6.6.35-gentoo-dist root=/dev/mapper/system-root ro rootflags=subvol=@ 
      echo   'Loading initial ramdisk ...'
      initrd   /@/boot/amd-uc.img /@/boot/initramfs-6.6.35-gentoo-dist.img
   }
   menuentry 'Gentoo GNU/Linux, with Linux 6.6.35-gentoo-dist (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.35-gentoo-dist-recovery-aa2f58ed-de76-49a7-9ba0-49215a96abff' {
      load_video
      if [ "x$grub_platform" = xefi ]; then
         set gfxpayload=keep
      fi
      insmod gzio
      insmod part_gpt
      insmod cryptodisk
      insmod luks
      insmod gcry_rijndael
      insmod gcry_rijndael
      insmod gcry_sha256
      insmod lvm
      insmod btrfs
      cryptomount -u be79bede-d6c0-4dcd-b37b-9db9f274404b
      set root='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'  aa2f58ed-de76-49a7-9ba0-49215a96abff
      else
        search --no-floppy --fs-uuid --set=root aa2f58ed-de76-49a7-9ba0-49215a96abff
      fi
      echo   'Loading Linux 6.6.35-gentoo-dist ...'
      linux   /@/boot/vmlinuz-6.6.35-gentoo-dist root=/dev/mapper/system-root ro single rootflags=subvol=@
      echo   'Loading initial ramdisk ...'
      initrd   /@/boot/amd-uc.img /@/boot/initramfs-6.6.35-gentoo-dist.img
   }
   menuentry 'Gentoo GNU/Linux, with Linux 6.6.35-gentoo-dist.old' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.35-gentoo-dist.old-advanced-aa2f58ed-de76-49a7-9ba0-49215a96abff' {
      load_video
      if [ "x$grub_platform" = xefi ]; then
         set gfxpayload=keep
      fi
      insmod gzio
      insmod part_gpt
      insmod cryptodisk
      insmod luks
      insmod gcry_rijndael
      insmod gcry_rijndael
      insmod gcry_sha256
      insmod lvm
      insmod btrfs
      cryptomount -u be79bede-d6c0-4dcd-b37b-9db9f274404b
      set root='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'  aa2f58ed-de76-49a7-9ba0-49215a96abff
      else
        search --no-floppy --fs-uuid --set=root aa2f58ed-de76-49a7-9ba0-49215a96abff
      fi
      echo   'Loading Linux 6.6.35-gentoo-dist.old ...'
      linux   /@/boot/vmlinuz-6.6.35-gentoo-dist.old root=/dev/mapper/system-root ro rootflags=subvol=@ 
      echo   'Loading initial ramdisk ...'
      initrd   /@/boot/amd-uc.img /@/boot/initramfs-6.6.35-gentoo-dist.img.old
   }
   menuentry 'Gentoo GNU/Linux, with Linux 6.6.35-gentoo-dist.old (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.35-gentoo-dist.old-recovery-aa2f58ed-de76-49a7-9ba0-49215a96abff' {
      load_video
      if [ "x$grub_platform" = xefi ]; then
         set gfxpayload=keep
      fi
      insmod gzio
      insmod part_gpt
      insmod cryptodisk
      insmod luks
      insmod gcry_rijndael
      insmod gcry_rijndael
      insmod gcry_sha256
      insmod lvm
      insmod btrfs
      cryptomount -u be79bede-d6c0-4dcd-b37b-9db9f274404b
      set root='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint='lvmid/0GYEou-dbGp-Tggs-sPd9-1OQo-0vnW-kf1dbq/3nqygF-NLbH-d0Tr-Fbqe-UPFZ-3Ftf-01Qdjd'  aa2f58ed-de76-49a7-9ba0-49215a96abff
      else
        search --no-floppy --fs-uuid --set=root aa2f58ed-de76-49a7-9ba0-49215a96abff
      fi
      echo   'Loading Linux 6.6.35-gentoo-dist.old ...'
      linux   /@/boot/vmlinuz-6.6.35-gentoo-dist.old root=/dev/mapper/system-root ro single rootflags=subvol=@
      echo   'Loading initial ramdisk ...'
      initrd   /@/boot/amd-uc.img /@/boot/initramfs-6.6.35-gentoo-dist.img.old
   }
}

### 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 ###


/etc/portage/make.conf
Code:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

MAKEOPTS="-j4 -l5"
VIDEO_CARDS="amdgpu radeonsi"
# Binary packages by default for my laptop for now
FEATURES="${FEATURES} getbinpkg"
FEATURES="${FEATURES} binpkg-request-signature"

# Licenses
ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE"

# NOTE: This stage was built with the bindist USE flag enabled

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8
GRUB_PLATFORM="efi-64"


Last edited by heleos on Fri Jul 26, 2024 12:59 am; edited 1 time in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20485

PostPosted: Thu Jul 25, 2024 3:38 am    Post subject: Reply with quote

I'd expect that you will need to set VIDEO_CARDS to something.

Based on your CPU, what integrated graphics does it use?
https://en.m.wikipedia.org/wiki/List_of_AMD_Ryzen_processors

You should be able to see what correlates to that hardware here:
https://wiki.gentoo.org/wiki/AMDGPU#Prerequisites
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
heleos
n00b
n00b


Joined: 24 Jul 2024
Posts: 4

PostPosted: Thu Jul 25, 2024 11:26 am    Post subject: Reply with quote

Thanks for the reply!

Processor is a Ryzen 7 7840HS, so I believe it's an RDNA3. I added amdgpu into the video card section and added a use flag for amdgpu to the linux-firmware package and rebuilt, then did an emerge --config gentoo-kernel-bin just to be safe, but i am still having the same issue.
Back to top
View user's profile Send private message
heleos
n00b
n00b


Joined: 24 Jul 2024
Posts: 4

PostPosted: Thu Jul 25, 2024 8:39 pm    Post subject: Reply with quote

One thing I've noticed is if I let it sit at the screen where output is mostly frozen, after about 2 minutes, i start getting the following message over and over every second:

Code:

dracut: Scanning for all btrfs devices


which makes me think it's not detecting my drives for some reason
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20485

PostPosted: Thu Jul 25, 2024 10:49 pm    Post subject: Reply with quote

To be honest, I can't figure out what that AMDGPU guide expects.

You seem to be correct regarding RDNA3...
Quote:
Phoenix (7040 series, Zen 4/RDNA3/XDNA based)
Includes integrated RDNA 3 GPU.
Code:
Navi    NAVI31    RDNA 3       RX 7000
Code:
NAVI31    amdgpu/gc_11_0_0_{imu,pfp,me,rlc,mec,mes,mes1,mes_2}.bin amdgpu/psp_13_0_0_{sos,ta}.bin amdgpu/smu_13_0_0.bin amdgpu/dcn_3_2_0_dmcub.bin amdgpu/sdma_6_0_0.bin amdgpu/vcn_4_0_0.bin
So that would appear to be the firmware.

But if you're seeing output, then video shouldn't be the problem.

I don't have experience with LUKS or btrfs, so I can't help there.

Have you looked for any forum topics related to the scanning message?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
heleos
n00b
n00b


Joined: 24 Jul 2024
Posts: 4

PostPosted: Fri Jul 26, 2024 12:58 am    Post subject: Reply with quote

Thank you, you pushed me in the right direction! After searching that and getting down a rabbit hole, I realized I never had sys-fs/cryptsetup installed, I just assumed it was because it's on the livecd, but was not in my chrooted environment! I had to add it to openrc to launch at boot, and add entries into my /etc/conf.d/dmcrypt file. I now have a working boot! Thank you!

It is pretty incredible to see how far Linux has come for the casual user. My issue was following what I did for my Arch install, which I guess holds my hand a little more than I thought and must add a lot of this stuff to the background automatically
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