Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[Solved] Dracut 30 second delay on EFI boot

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
abduct
Apprentice
Apprentice
Posts: 222
Joined: Thu Mar 19, 2015 6:51 am

[Solved] Dracut 30 second delay on EFI boot

  • Quote

Post by abduct » Mon Dec 27, 2021 7:34 pm

Hey all

I use Dracut-55-r3 to create my initramfs to boot my encrypted installation. It was working flawlessly at one point then I upgraded @world which upgraded Dracut. At this point I started to experience a 30 second delay while booting just after the EFI boot image passes control to the initramfs.

I have a suspicion it has something to do with this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1976653 or some other module within dracut waiting on a response but ends up timing out.

Unfortunately, I do not use systemd, and I can't seem to locate any files to modify to apply the suggested work arounds.

I am going to attempt to sync and install dracut-55-r4 to see if the bug is patched, but I am not sure if it is or not.

If anyone can give me some pointers on where to start to debug this that would be awesome.

Thanks

edit:

Upgrading to dracut-55-r4 did not fix the issue after regenerating the initramfs and rebooting. The 30 second delay still exists.
Last edited by abduct on Mon Dec 27, 2021 11:24 pm, edited 1 time in total.
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Mon Dec 27, 2021 8:00 pm

You mean 30 seconds after "loading initramfs" before asking luks password?
Is your /boot encrypted?
Plz post

Code: Select all

cat /etc/default/grub
lsblk
cat /etc/crypttab
rc-status boot default
emerge -pv grub
and your dracut.conf
I have
sys-kernel/dracut-055-r3
rebuilt it
and there was NO delay whatsoever @boot
:)
Top
abduct
Apprentice
Apprentice
Posts: 222
Joined: Thu Mar 19, 2015 6:51 am

  • Quote

Post by abduct » Mon Dec 27, 2021 8:22 pm

I do not have a boot loader installed. I let the UEFI bios boot the initramfs dracut creates.

The boot process is as follows:
1) UEFI bios loads initramfs created by dracut
2) initramfs starts bringing up devices, etc
3) initramfs stops for exactly 30 seconds
4) initramfs resumes loading
5) initramfs asks for a luks password to unlock my drive which contains /, etc
6) initramfs mounts devices and mounts encrypted swap from keyfile on drive
7) initramfs pivots
8) normal boot starts

No grub config to provide.

Code: Select all

~ # lsblk
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme0n1                                       259:0    0 953.9G  0 disk  
├─nvme0n1p1                                   259:1    0     1G  0 part  /boot
├─nvme0n1p2                                   259:2    0  31.5G  0 part  
│ └─swap                                      254:1    0  31.5G  0 crypt [SWAP]
└─nvme0n1p3                                   259:3    0 921.4G  0 part  
  └─luks-f24ca01snip                          254:0    0 921.4G  0 crypt /
No crypttab to provide

Code: Select all

~ # rc-status boot default
Runlevel: boot
 hwclock                                                                                                                                                                                                                                                                 [  started  ]
 modules                                                                                                                                                                                                                                                                 [  started  ]
 dmcrypt                                                                                                                                                                                                                                                                 [  started  ]
 fsck                                                                                                                                                                                                                                                                    [  started  ]
 root                                                                                                                                                                                                                                                                    [  started  ]
 mtab                                                                                                                                                                                                                                                                    [  started  ]
 swap                                                                                                                                                                                                                                                                    [  started  ]
 localmount                                                                                                                                                                                                                                                              [  started  ]
 stmpfiles-setup                                                                                                                                                                                                                                                         [  started  ]
 sysctl                                                                                                                                                                                                                                                                  [  started  ]
 bootmisc                                                                                                                                                                                                                                                                [  started  ]
 hostname                                                                                                                                                                                                                                                                [  started  ]
 elogind                                                                                                                                                                                                                                                                 [  started  ]
 termencoding                                                                                                                                                                                                                                                            [  started  ]
 save-termencoding                                                                                                                                                                                                                                                       [  started  ]
 keymaps                                                                                                                                                                                                                                                                 [  started  ]
 save-keymaps                                                                                                                                                                                                                                                            [  started  ]
 procfs                                                                                                                                                                                                                                                                  [  started  ]
 binfmt                                                                                                                                                                                                                                                                  [  started  ]
 urandom                                                                                                                                                                                                                                                                 [  started  ]
 loopback                                                                                                                                                                                                                                                                [  started  ]
 acpilight                                                                                                                                                                                                                                                               [  started  ]
Runlevel: default
 sysklogd                                                                                                                                                                                                                                                                [  started  ]
 cronie                                                                                                                                                                                                                                                                  [  started  ]
 dbus                                                                                                                                                                                                                                                                    [  started  ]
 net.wlan0                                                                                                                                                                                                                                                               [  started  ]
 acpid                                                                                                                                                                                                                                                                   [  started  ]
 laptop_mode                                                                                                                                                                                                                                                             [  started  ]
 netmount                                                                                                                                                                                                                                                                [  started  ]
 local                                                                                                                                                                                                                                                                   [  started  ]
No point in showing the grub emerge.

Dracut config simply contains use_fstab=yes

here is dmesg showing the 30 second halt during boot, although I dont see anything that particularly stands out as the issue:

Code: Select all

[    0.201336] Spectre V2 : Update user space SMT mitigation: STIBP always-on
[    0.201387]  #2 #3 #4 #5 #6 #7
[    0.203352] smp: Brought up 1 node, 8 CPUs
[    0.203358] smpboot: Max logical packages: 2
[    0.203360] smpboot: Total of 8 processors activated (51105.48 BogoMIPS)
[    0.204361] devtmpfs: initialized
[    0.204391] ACPI: PM: Registering ACPI NVS region [mem 0x09f00000-0x09f0efff] (61440 bytes)
[    0.204391] ACPI: PM: Registering ACPI NVS region [mem 0xccf7f000-0xcdf7efff] (16777216 bytes)
[    0.204477] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.204482] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    0.204515] pinctrl core: initialized pinctrl subsystem
[    0.204600] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.204655] DMA: preallocated 4096 KiB GFP_KERNEL pool for atomic allocations
[    0.204668] DMA: preallocated 4096 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.204677] DMA: preallocated 4096 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.204684] audit: initializing netlink subsys (disabled)
[    0.204692] audit: type=2000 audit(1640634282.116:1): state=initialized audit_enabled=0 res=1
[    0.204692] thermal_sys: Registered thermal governor 'fair_share'
[    0.204692] thermal_sys: Registered thermal governor 'bang_bang'
[    0.204692] thermal_sys: Registered thermal governor 'step_wise'
[    0.204692] thermal_sys: Registered thermal governor 'user_space'
[    0.204692] thermal_sys: Registered thermal governor 'power_allocator'
[    0.204692] cpuidle: using governor ladder
[    0.204692] cpuidle: using governor menu
[    0.204692] Simple Boot Flag at 0x44 set to 0x1
[    0.204692] ACPI: bus type PCI registered
[    0.204692] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.204692] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.204692] PCI: Using configuration type 1 for base access
[    0.206961] Kprobes globally optimized
[    0.206965] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.206965] cryptomgr_test (64) used greatest stack depth: 15728 bytes left
[    0.207295] cryptomgr_test (81) used greatest stack depth: 15680 bytes left
[    0.207299] cryptd: max_cpu_qlen set to 1000
[    0.207299] cryptomgr_test (100) used greatest stack depth: 15496 bytes left
[    0.207315] raid6: skip pq benchmark and using algorithm avx2x4
[    0.207315] raid6: using avx2x2 recovery algorithm
[    0.207329] ACPI: Added _OSI(Module Device)
[    0.207330] ACPI: Added _OSI(Processor Device)
[    0.207331] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.207332] ACPI: Added _OSI(Processor Aggregator Device)
[    0.207333] ACPI: Added _OSI(Linux-Dell-Video)
[    0.207334] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.207335] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.215149] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PB2], AE_NOT_FOUND (20210730/dswload2-162)
[    0.215155] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220)
[    0.215157] ACPI: Skipping parse of AML opcode: OpcodeName unavailable (0x0010)
[    0.215845] ACPI: 18 ACPI AML tables successfully acquired and loaded
[    0.216788] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.217611] ACPI: EC: EC started
[    0.217613] ACPI: EC: interrupt blocked
[   30.219292] ACPI Error: Aborting method \_SB.A011 due to previous error (AE_AML_LOOP_TIMEOUT) (20210730/psparse-529)
[   30.219298] ACPI Error: Aborting method \_SB.A025 due to previous error (AE_AML_LOOP_TIMEOUT) (20210730/psparse-529)
[   30.219302] ACPI Error: Aborting method \_SB.ALIB due to previous error (AE_AML_LOOP_TIMEOUT) (20210730/psparse-529)
[   30.219306] ACPI Error: Aborting method \_SB.PCI0.LPC0.FNQR due to previous error (AE_AML_LOOP_TIMEOUT) (20210730/psparse-529)
[   30.219315] ACPI Error: Aborting method \_SB.PCI0.LPC0.FNQS due to previous error (AE_AML_LOOP_TIMEOUT) (20210730/psparse-529)
[   30.219318] ACPI Error: Aborting method \_SB.PCI0.LPC0.EC0._REG due to previous error (AE_AML_LOOP_TIMEOUT) (20210730/psparse-529)
[   30.219323] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[   30.219324] ACPI: \_SB_.PCI0.LPC0.EC0_: Boot DSDT EC used to handle transactions
[   30.219326] ACPI: Interpreter enabled
[   30.219338] ACPI: PM: (supports S0 S3 S4 S5)
[   30.219339] ACPI: Using IOAPIC for interrupt routing
[   30.219429] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[   30.219668] ACPI: Enabled 5 GPEs in block 00 to 1F
[   30.220095] ACPI: PM: Power Resource [PG00]
[   30.231496] ACPI: PM: Power Resource [WRST]
[   30.231886] ACPI: PM: Power Resource [BTPR]
[   30.235075] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[   30.235080] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[   30.235137] acpi PNP0A08:00: _OSC: platform does not support [LTR]
[   30.235187] acpi PNP0A08:00: _OSC: OS now controls [PME PCIeCapability]
[   30.235194] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge
Edit:

This is how I build my system:

Code: Select all

#!/bin/bash

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root"
   exit 1
fi

KERNVER=$(basename $(cd -P /usr/src/linux && pwd) | cut -c 7-)
SLOT=$1

cd /usr/src/linux
make clean
make -j17 && make module_install
dracut -H --fstab --kver $KERNVER --install=/lib/firmware/regulatory.db* -f /boot/EFI/Gentoo/initramfs-$KERNVER$SLOT.img
cp arch/x86_64/boot/bzImage /boot/EFI/Gentoo/bzImage-$KERNVER$SLOT.efi
efibootmgr -c -d /dev/nvme0n1 -L "Gentoo $KERNVER$SLOT" -l "\\EFI\\Gentoo\\bzImage-$KERNVER$SLOT.efi" -u "initrd=\\EFI\\Gentoo\\initramfs-$KERNVER$SLOT.img"
Top
abduct
Apprentice
Apprentice
Posts: 222
Joined: Thu Mar 19, 2015 6:51 am

  • Quote

Post by abduct » Mon Dec 27, 2021 11:27 pm

Solved.

I added rd.debug, rd.udev.debug, etc to dracut --kernel-cmdline and remade the initramfs. After searching through the logs and dmesg super thoroughly I noticed that the init was only setting up 8 out of 16 processor cores and gave me a message about nr_cores being incorrect.

This lines up in the timeline where I updated world, and also changed NR_CORES in the kernel to 8 by accident (did not figure that threads are considered cores, aka 16 should have been the correct value).

This somehow played into dracut having an exact 30 second delay during init via the initramfs. How it plays in exactly I am not sure, but at least it is working fine now.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic