Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
My system is not booting anymore. (resolved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
defiant_godmother
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Sat Sep 07, 2024 8:04 am    Post subject: My system is not booting anymore. (resolved) Reply with quote

i have a full disk encryption setup when upon loading initramfs i get prompted for a passphrase for a symmetric key which was used to encrypt the drive each time I boot.
I recently updated my system (i'm not 100% sure if that's related) and now, upon entering the correct passphrase i am being thrown into a dracut debug shell

Here's some info about my boot process:
When i boot the shim efi binary (shimx64.efi) from a partition labeled "A2C8-42B3" gets executed (this partition is mounted under /efi in my paste) (this partition also has an emergency EFI shell under /EFI/boot, please don't get confused), it then executes grubx64.efi binary located in the same directory, which consequently reads grub.cfg from the same directory.
grub executes a kernel image and initramfs from a partition with a UUID "b0d785e1-627e-498c-8d9e-eb20d43bf5eb" (this partition is mounted under /boot in my paste). initramfs then tries to decrypt the btrfs filesystem which lies under /dev/sda1 (/dev/sda1 is "ca32d232-f285-4824-8a2e-10664a22c341") encrypted (the 1TB drive) (the decrypted btrfs fs itself has a UUID of "f77e55b5-91ac-4840-b11d-7f69cdb0c16f" with a symmetric key named "crypt_key.luks.gpg". This key is encrypted itself, so initramfs asks me for a passphrase here.
After asking the passphrase and me entering the CORRECT (this is 100%) passphrase (if i enter incorrect passphrase it will ask me again) it just hangs for a moment and then after quite some time it opens a dracut# debug shell.

please note:
~ dracut.conf is valid, i successfully generated initramfs images before (using the same config) and my system was booting, i haven't touch dracut.conf since then.
~ in the paste i'm using a gentoo livecd and successfully decrypting the btrfs FS using `gpg --decrypt /boot/crypt_key.luks.gpg | cryptsetup --key-file - open /dev/sda1 root` and consequently mounting it under /mnt/gentoo.
~ i also tried without lsm=selinux, still the same. SELinux is in permissive anyways.
~ the problem appeared when yesterday i ran grub-mkconfig with some linux cmdline options (which i then deleted and restored the /etc/default/grub exactly the way it was before and ran grub-mkconfig again). Even after reverting grub config to the way it was before the issue still persists.


Here's the dmesg output from the dracut emergency shell : https://termbin.com/euqu (last 2 entries ("Volume was not properly unmounted") are because of my mistake when i already entered the dracut shell, it's unrelated)

Here's the contents of /run/initramfs/rdsosreport.txt file from the dracut emergency shell (it's quite long, that's why pastebin) : https://termbin.com/0oe9


Here's some info about how i generated initramfs image, grub config, lsblk, etc. (please let me know if i forgot something) :
Code:

################## lsblk -o name,size,uuid,label
NAME       SIZE UUID                                 LABEL
loop0    507.5M                                     
sda      931.5G                                     
└─sda1   931.5G ca32d232-f285-4824-8a2e-10664a22c341
  └─root 931.5G f77e55b5-91ac-4840-b11d-7f69cdb0c16f rootfs
sdb         15G                                     
├─sdb1       1G A2C8-42B3                           
└─sdb2       1G b0d785e1-627e-498c-8d9e-eb20d43bf5eb boot
sdd       57.8G 2024-09-01-17-49-53-00               Gentoo-amd64-@DATESTAMP@
├─sdd1     250K                                     
├─sdd2     2.8M 65BF-DD86                           
├─sdd3   589.2M                                      Gentoo-amd64-@DATESTAMP@
└─sdd4     300K                                     





################## cat /etc/dracut.conf
# PUT YOUR CONFIG IN separate files
# in /etc/dracut.conf.d named "<name>.conf"
# SEE man dracut.conf(5) for options
add_dracutmodules+=" crypt crypt-gpg dm rootfs-block btrfs "
kernel_cmdline+=" loglevel=6 rd.luks.key=/crypt_key.luks.gpg:UUID=b0d785e1-627e-498c-8d9e-eb20d43bf5eb rootfstype=btrfs rd.luks.uuid=ca32d232-f285-4824-8a2e-10664a22c341 root=UUID=f77e55b5-91ac-4840-b11d-7f69cdb0c16f "
# kernel_cmdline+=" root=LABEL=rootfs rd.luks.uuid=ca32d232-f285-4824-8a2e-10664a22c341 rd.luks.key=/crypt_key.luks.gpg:UUID=b0d785e1-627e-498c-8d9e-eb20d43bf5eb rootfstype=btrfs "





################## cat /etc/default/grub
# 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"

# 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_DEFAULT="loglevel=6 lsm=selinux"
# GRUB_CMDLINE_LINUX_DEFAULT="loglevel=6 rd.luks.key=/crypt_key.luks.gpg:UUID=b0d785e1-627e-498c-8d9e-eb20d43bf5eb rootfstype=btrfs rd.luks.uuid=ca32d232-f285-4824-8a2e-10664a22c341 root=UUID=f77e55b5-91ac-4840-b11d-7f69cdb0c16f"
# cryptdevice=UUID=ca32d232-f285-4824-8a2e-10664a22c341:root
#
# 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

# Resolution used on graphical terminal.
# The list of valid modes may be obtained using the 'vbeinfo' (PC BIOS) or
# 'videoinfo' (EFI) command from a GRUB boot prompt.
#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"





################## tree /boot
/boot
├── System.map-6.6.47-gentoo-dist
├── System.map-6.6.47-gentoo-dist.old
├── config-6.6.47-gentoo-dist
├── config-6.6.47-gentoo-dist.old
├── crypt_key.luks.gpg
├── grub
│   ├── fonts
│   │   └── unicode.pf2
│   ├── grub.cfg
│   ├── grub.cfg~
│   ├── grubenv
│   ├── locale
│   │   ├── ast.mo
│   │   ├── ca.mo
│   │   ├── da.mo
│   │   ├── de.mo
│   │   ├── de@hebrew.mo
│   │   ├── de_CH.mo
│   │   ├── en@arabic.mo
│   │   ├── en@cyrillic.mo
│   │   ├── en@greek.mo
│   │   ├── en@hebrew.mo
│   │   ├── en@piglatin.mo
│   │   ├── en@quot.mo
│   │   ├── eo.mo
│   │   ├── es.mo
│   │   ├── fi.mo
│   │   ├── fr.mo
│   │   ├── gl.mo
│   │   ├── he.mo
│   │   ├── hr.mo
│   │   ├── hu.mo
│   │   ├── id.mo
│   │   ├── it.mo
│   │   ├── ja.mo
│   │   ├── ka.mo
│   │   ├── ko.mo
│   │   ├── lg.mo
│   │   ├── lt.mo
│   │   ├── nb.mo
│   │   ├── nl.mo
│   │   ├── pa.mo
│   │   ├── pl.mo
│   │   ├── pt.mo
│   │   ├── pt_BR.mo
│   │   ├── ro.mo
│   │   ├── ru.mo
│   │   ├── sl.mo
│   │   ├── sr.mo
│   │   ├── sv.mo
│   │   ├── tr.mo
│   │   ├── uk.mo
│   │   ├── vi.mo
│   │   ├── zh_CN.mo
│   │   └── zh_TW.mo
│   ├── themes
│   │   └── starfield
│   │       ├── COPYING.CC-BY-SA-3.0
│   │       ├── README
│   │       ├── blob_w.png
│   │       ├── boot_menu_c.png
│   │       ├── boot_menu_e.png
│   │       ├── boot_menu_n.png
│   │       ├── boot_menu_ne.png
│   │       ├── boot_menu_nw.png
│   │       ├── boot_menu_s.png
│   │       ├── boot_menu_se.png
│   │       ├── boot_menu_sw.png
│   │       ├── boot_menu_w.png
│   │       ├── dejavu_10.pf2
│   │       ├── dejavu_12.pf2
│   │       ├── dejavu_14.pf2
│   │       ├── dejavu_16.pf2
│   │       ├── dejavu_bold_14.pf2
│   │       ├── slider_c.png
│   │       ├── slider_n.png
│   │       ├── slider_s.png
│   │       ├── starfield.png
│   │       ├── terminal_box_c.png
│   │       ├── terminal_box_e.png
│   │       ├── terminal_box_n.png
│   │       ├── terminal_box_ne.png
│   │       ├── terminal_box_nw.png
│   │       ├── terminal_box_s.png
│   │       ├── terminal_box_se.png
│   │       ├── terminal_box_sw.png
│   │       ├── terminal_box_w.png
│   │       └── theme.txt
│   └── x86_64-efi
│       ├── acpi.mod
│       ├── adler32.mod
│       ├── affs.mod
│       ├── afs.mod
│       ├── afsplitter.mod
│       ├── ahci.mod
│       ├── all_video.mod
│       ├── aout.mod
│       ├── appleldr.mod
│       ├── archelp.mod
│       ├── at_keyboard.mod
│       ├── ata.mod
│       ├── backtrace.mod
│       ├── bfs.mod
│       ├── bitmap.mod
│       ├── bitmap_scale.mod
│       ├── bli.mod
│       ├── blocklist.mod
│       ├── boot.mod
│       ├── bsd.mod
│       ├── bswap_test.mod
│       ├── btrfs.mod
│       ├── bufio.mod
│       ├── cat.mod
│       ├── cbfs.mod
│       ├── cbls.mod
│       ├── cbmemc.mod
│       ├── cbtable.mod
│       ├── cbtime.mod
│       ├── chain.mod
│       ├── cmdline_cat_test.mod
│       ├── cmp.mod
│       ├── cmp_test.mod
│       ├── command.lst
│       ├── configfile.mod
│       ├── core.efi
│       ├── cpio.mod
│       ├── cpio_be.mod
│       ├── cpuid.mod
│       ├── crc64.mod
│       ├── crypto.lst
│       ├── crypto.mod
│       ├── cryptodisk.mod
│       ├── cs5536.mod
│       ├── ctz_test.mod
│       ├── date.mod
│       ├── datehook.mod
│       ├── datetime.mod
│       ├── disk.mod
│       ├── diskfilter.mod
│       ├── div.mod
│       ├── div_test.mod
│       ├── dm_nv.mod
│       ├── echo.mod
│       ├── efi_gop.mod
│       ├── efi_uga.mod
│       ├── efifwsetup.mod
│       ├── efinet.mod
│       ├── efitextmode.mod
│       ├── ehci.mod
│       ├── elf.mod
│       ├── eval.mod
│       ├── exfat.mod
│       ├── exfctest.mod
│       ├── ext2.mod
│       ├── extcmd.mod
│       ├── f2fs.mod
│       ├── fat.mod
│       ├── file.mod
│       ├── fixvideo.mod
│       ├── font.mod
│       ├── fs.lst
│       ├── fshelp.mod
│       ├── functional_test.mod
│       ├── gcry_arcfour.mod
│       ├── gcry_blowfish.mod
│       ├── gcry_camellia.mod
│       ├── gcry_cast5.mod
│       ├── gcry_crc.mod
│       ├── gcry_des.mod
│       ├── gcry_dsa.mod
│       ├── gcry_idea.mod
│       ├── gcry_md4.mod
│       ├── gcry_md5.mod
│       ├── gcry_rfc2268.mod
│       ├── gcry_rijndael.mod
│       ├── gcry_rmd160.mod
│       ├── gcry_rsa.mod
│       ├── gcry_seed.mod
│       ├── gcry_serpent.mod
│       ├── gcry_sha1.mod
│       ├── gcry_sha256.mod
│       ├── gcry_sha512.mod
│       ├── gcry_tiger.mod
│       ├── gcry_twofish.mod
│       ├── gcry_whirlpool.mod
│       ├── geli.mod
│       ├── gettext.mod
│       ├── gfxmenu.mod
│       ├── gfxterm.mod
│       ├── gfxterm_background.mod
│       ├── gfxterm_menu.mod
│       ├── gptsync.mod
│       ├── grub.efi
│       ├── gzio.mod
│       ├── halt.mod
│       ├── hashsum.mod
│       ├── hdparm.mod
│       ├── hello.mod
│       ├── help.mod
│       ├── hexdump.mod
│       ├── hfs.mod
│       ├── hfsplus.mod
│       ├── hfspluscomp.mod
│       ├── http.mod
│       ├── iorw.mod
│       ├── iso9660.mod
│       ├── jfs.mod
│       ├── jpeg.mod
│       ├── json.mod
│       ├── keylayouts.mod
│       ├── keystatus.mod
│       ├── ldm.mod
│       ├── legacy_password_test.mod
│       ├── legacycfg.mod
│       ├── linux.mod
│       ├── linux16.mod
│       ├── loadbios.mod
│       ├── loadenv.mod
│       ├── loopback.mod
│       ├── ls.mod
│       ├── lsacpi.mod
│       ├── lsefi.mod
│       ├── lsefimmap.mod
│       ├── lsefisystab.mod
│       ├── lsmmap.mod
│       ├── lspci.mod
│       ├── lssal.mod
│       ├── luks.mod
│       ├── luks2.mod
│       ├── lvm.mod
│       ├── lzopio.mod
│       ├── macbless.mod
│       ├── macho.mod
│       ├── mdraid09.mod
│       ├── mdraid09_be.mod
│       ├── mdraid1x.mod
│       ├── memdisk.mod
│       ├── memrw.mod
│       ├── minicmd.mod
│       ├── minix.mod
│       ├── minix2.mod
│       ├── minix2_be.mod
│       ├── minix3.mod
│       ├── minix3_be.mod
│       ├── minix_be.mod
│       ├── mmap.mod
│       ├── moddep.lst
│       ├── modinfo.sh
│       ├── morse.mod
│       ├── mpi.mod
│       ├── msdospart.mod
│       ├── mul_test.mod
│       ├── multiboot.mod
│       ├── multiboot2.mod
│       ├── nativedisk.mod
│       ├── net.mod
│       ├── newc.mod
│       ├── nilfs2.mod
│       ├── normal.mod
│       ├── ntfs.mod
│       ├── ntfscomp.mod
│       ├── odc.mod
│       ├── offsetio.mod
│       ├── ohci.mod
│       ├── part_acorn.mod
│       ├── part_amiga.mod
│       ├── part_apple.mod
│       ├── part_bsd.mod
│       ├── part_dfly.mod
│       ├── part_dvh.mod
│       ├── part_gpt.mod
│       ├── part_msdos.mod
│       ├── part_plan.mod
│       ├── part_sun.mod
│       ├── part_sunpc.mod
│       ├── partmap.lst
│       ├── parttool.lst
│       ├── parttool.mod
│       ├── password.mod
│       ├── password_pbkdf2.mod
│       ├── pata.mod
│       ├── pbkdf2.mod
│       ├── pbkdf2_test.mod
│       ├── pcidump.mod
│       ├── pgp.mod
│       ├── plainmount.mod
│       ├── play.mod
│       ├── png.mod
│       ├── priority_queue.mod
│       ├── probe.mod
│       ├── procfs.mod
│       ├── progress.mod
│       ├── raid5rec.mod
│       ├── raid6rec.mod
│       ├── random.mod
│       ├── rdmsr.mod
│       ├── read.mod
│       ├── reboot.mod
│       ├── regexp.mod
│       ├── reiserfs.mod
│       ├── relocator.mod
│       ├── romfs.mod
│       ├── scsi.mod
│       ├── search.mod
│       ├── search_fs_file.mod
│       ├── search_fs_uuid.mod
│       ├── search_label.mod
│       ├── serial.mod
│       ├── setjmp.mod
│       ├── setjmp_test.mod
│       ├── setpci.mod
│       ├── sfs.mod
│       ├── shift_test.mod
│       ├── signature_test.mod
│       ├── sleep.mod
│       ├── sleep_test.mod
│       ├── smbios.mod
│       ├── spkmodem.mod
│       ├── squash4.mod
│       ├── strtoull_test.mod
│       ├── syslinuxcfg.mod
│       ├── tar.mod
│       ├── terminal.lst
│       ├── terminal.mod
│       ├── terminfo.mod
│       ├── test.mod
│       ├── test_blockarg.mod
│       ├── testload.mod
│       ├── testspeed.mod
│       ├── tftp.mod
│       ├── tga.mod
│       ├── time.mod
│       ├── tpm.mod
│       ├── tr.mod
│       ├── trig.mod
│       ├── true.mod
│       ├── udf.mod
│       ├── ufs1.mod
│       ├── ufs1_be.mod
│       ├── ufs2.mod
│       ├── uhci.mod
│       ├── usb.mod
│       ├── usb_keyboard.mod
│       ├── usbms.mod
│       ├── usbserial_common.mod
│       ├── usbserial_ftdi.mod
│       ├── usbserial_pl2303.mod
│       ├── usbserial_usbdebug.mod
│       ├── usbtest.mod
│       ├── video.lst
│       ├── video.mod
│       ├── video_bochs.mod
│       ├── video_cirrus.mod
│       ├── video_colors.mod
│       ├── video_fb.mod
│       ├── videoinfo.mod
│       ├── videotest.mod
│       ├── videotest_checksum.mod
│       ├── wrmsr.mod
│       ├── xfs.mod
│       ├── xnu.mod
│       ├── xnu_uuid.mod
│       ├── xnu_uuid_test.mod
│       ├── xzio.mod
│       ├── zfs.mod
│       ├── zfscrypt.mod
│       ├── zfsinfo.mod
│       └── zstd.mod
├── initramfs-6.6.47-gentoo-dist.img
├── initramfs-6.6.47-gentoo-dist.img.old
├── lost+found
├── vmlinuz-6.6.47-gentoo-dist
└── vmlinuz-6.6.47-gentoo-dist.old

8 directories, 366 files





################## tree /efi
/efi
└── EFI
    ├── boot
    │   └── bootx64.efi
    └── gentoo
        ├── grub.cfg
        ├── grubx64.efi
        ├── mmx64.efi
        └── shimx64.efi

4 directories, 5 files





################## emerge --info dracut
Portage 3.0.65 (python 3.12.3-final-0, default/linux/amd64/23.0/hardened/selinux, gcc-13, glibc-2.39-r6, 6.6.47-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.47-gentoo-dist-x86_64-Intel-R-_Core-TM-_i7-7700HQ_CPU_@_2.80GHz-with-glibc2.39
KiB Mem:    16290956 total,  15869096 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 06 Sep 2024 08:00:00 +0000
Head commit of repository gentoo: 09da2a9a1a3597357f7e493a1a6d33120af4f00b
Timestamp of repository gentoo-zh: Thu, 05 Sep 2024 23:48:58 +0000
Head commit of repository gentoo-zh: 9177905778b108f53522a6e7f316eababb20c97c

sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.3-r1::gentoo
dev-lang/rust-bin:         1.79.0::gentoo
sec-policy/selinux-base:   2.20240226-r2::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
sys-libs/libselinux:       3.6-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 3

gentoo-zh
    location: /var/db/repos/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git
    masters: gentoo
    volatile: False

Binary Repositories:

binhost
    priority: 9999
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64_hardened

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance binpkg-request-signature buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X acl alsa amd64 audit bzip2 caps cet crypt dist-kernel elogind gdbm grub hardened iconv ipv6 libtirpc modules-sign multilib ncurses nls openmp pam pcre peer_perms pic pie pulseaudio readline seccomp secureboot selinux ssl ssp test-rust ubac unconfined unicode unknown-perms xattr xtpax zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="intel nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sys-kernel/dracut-103-r3::gentoo was built with the following:
USE="(selinux) (-test)" ABI_X86="(64)"
CFLAGS="-march=native -O2 -pipe -D_FILE_OFFSET_BITS=64"





################## efibootmgr
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0002,0000
Boot0000* Grub via Shim   HD(1,GPT,299dd0b8-3e51-4d25-bdbc-284960893c7e,0x800,0x200000)/File(EFI\gentoo\shimx64.efi)
Boot0001* UEFI:  USB DISK 2.0 PMAP, Partition 2   PciRoot(0x0)/Pci(0x14,0x0)/USB(3,0)/HD(2,GPT,06c55cab-8d87-42c8-b379-2cacedef6d71,0x234,0x1680)0000424f
Boot0002* UEFI: General UDisk 5.00, Partition 1   PciRoot(0x0)/Pci(0x14,0x0)/USB(7,0)/HD(1,GPT,299dd0b8-3e51-4d25-bdbc-284960893c7e,0x800,0x200000)0000424f



In order to fix this issue i haven't done anything apart from rebuilding grub, dracut. Generating initramfs with `dracut` and restoring grub config with `grub-mkconfig`.
I'm not sure what to do at this point. Does anyone have an idea about what i'm missing?


Last edited by defiant_godmother on Sun Sep 08, 2024 3:41 am; edited 1 time in total
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 445

PostPosted: Sat Sep 07, 2024 8:51 am    Post subject: Reply with quote

The problem seems to be
Code:
[  233.163131] dracut Warning: Could not boot.
[  233.168489] dracut Warning: /dev/mapper/root does not exist


And in dmesg output the cmdline is
Code:
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.6.47-gentoo-dist root=/dev/mapper/root ro loglevel=6 lsm=selinux
Back to top
View user's profile Send private message
defiant_godmother
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Sat Sep 07, 2024 11:46 am    Post subject: Reply with quote

sMueggli wrote:
The problem seems to be
Code:
[  233.163131] dracut Warning: Could not boot.
[  233.168489] dracut Warning: /dev/mapper/root does not exist


And in dmesg output the cmdline is
Code:
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.6.47-gentoo-dist root=/dev/mapper/root ro loglevel=6 lsm=selinux


is this expected? i'm not sure if it corresponds to contents of /etc/dracut.conf that i've configured
because i have a
Code:
 kernel_cmdline+=" loglevel=6 rd.luks.key=/crypt_key.luks.gpg:UUID=b0d785e1-627e-498c-8d9e-eb20d43bf5eb rootfstype=btrfs rd.luks.uuid=ca32d232-f285-4824-8a2e-10664a22c341 root=UUID=f77e55b5-91ac-4840-b11d-7f69cdb0c16f "
there, not the
Code:
root=/dev/mapper/root
Back to top
View user's profile Send private message
ggggg
n00b
n00b


Joined: 07 Sep 2024
Posts: 1

PostPosted: Sat Sep 07, 2024 9:54 pm    Post subject: Reply with quote

Can you please try the following ?

add_dracutmodules+=" systemd-cryptsetup crypt-gpg dm rootfs-block btrfs "

Are you using systemd ?
Back to top
View user's profile Send private message
defiant_godmother
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Sun Sep 08, 2024 2:52 am    Post subject: Reply with quote

ggggg wrote:
Can you please try the following ?

add_dracutmodules+=" systemd-cryptsetup crypt-gpg dm rootfs-block btrfs "

Are you using systemd ?


Thank you for the reply. I saw this news item as well https://www.gentoo.org/support/news-items/2024-08-09-dracut-crypt.html
I thought that it sounds exactly like my situation. However i am using OpenRC, so i don't think it's relevant
Back to top
View user's profile Send private message
defiant_godmother
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Sun Sep 08, 2024 3:45 am    Post subject: Reply with quote

SOLUTION
it turns out GRUB was overwriting linux cmdline parameters (i.e. "root=UUID=<UUID>" parameter in dracut.conf was being overwritten to root=/dev/mapper/root by GRUB)
the solution is to make GRUB stop doing that:
Code:

### /etc/default/grub
GRUB_DEVICE=UUID=f77e55b5-91ac-4840-b11d-7f69cdb0c16f
Back to top
View user's profile Send private message
konsolebox
n00b
n00b


Joined: 09 Oct 2005
Posts: 10

PostPosted: Tue Sep 10, 2024 5:45 am    Post subject: Reply with quote

Apparently this can also be solved by enabling the device-mapper USE flag in sys-boot/grub.

One can also use findmnt if that's not reliable enough.

Code:
GRUB_DEVICE_UUID=${GRUB_DEVICE_UUID:-$(findmnt / -no UUID)}


See https://bugs.gentoo.org/939361.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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