Forums

Skip to content

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

Kernel panic upon boot

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
112 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
Author
Message
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 05, 2025 7:25 pm

So, I read your articles (thanks a million by the way, it's practically a treasure trove for new Gentoo users over there...) I discarded .config (yeah, I used nano...), reran

Code: Select all

make localmodconfig
, enabled all the config options (through nconfig this time), recompiled and reinstalled the kernel, reinstalled and reconfigured GRUB (just in case), and... yeah... exact same panic - can't mount filesystem on unkown-block(0,0).
:oops:
Last edited by amosbarsinai on Sun Oct 05, 2025 7:35 pm, edited 2 times in total.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 05, 2025 8:05 pm

amosbarsinai,

Read about what

Code: Select all

make localmodconfig
does.
It's not what you need so the panic is expected.

If there is a localyesconfig, you may do better.

As an easy way ahead, install a binary kernel to get you going, then add a hand configured kernel beside it.
As long as the two kernels are differerent versions, thats fine.
Now its easy to fix your broken kernel. You boot the working kernel and fix it.
I have a post about 20 years old for making your own kernel. It's still mostly relevant.
I'll dig out a link when I'm at my PC.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 06, 2025 11:00 am

Hu wrote:[...] [1]: It's quite common for people to mishandle the kernel install and continue running the old known-bad kernel instead of switching to the improved kernel they meant to use.
After reading this, today I remembered there was a previous thread from PO ... having a problem after "make install" ... because no "installkernel" was emerged:
https://forums.gentoo.org/viewtopic-p-8 ... ml#8871182

I dont know if PO installed "installkernel" in the meantime, but if not, then it could be that he is booting the old - manually renamed - kernel and the new one is named "vmlinuz", not known by grub :lol:

So, yes we would need again the output of "ls -al /boot" (after chrooting into the current installation) (this time without -R because we need only /boot but no subdirectories).
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 06, 2025 11:27 am

NeddySeagoon wrote:If there is a localyesconfig, you may do better.
Yes ... and no ... I never suggest creating a kernel configuration with "make localyesconfig" [*] because you will miss some imortant settings. Yes, you get a bootable kernel ... BUT ... let me explain:

You start/boot with our highly modularized Gentoo distribution kernel. The initramfs of it will load many important modules, so this kernel can access its root partition und boots. So far, so good.

What does “make loacalyesconfig” do now?

It adopts the existing static kernel configuration of this dist-kernel and also enables all previously loaded modules statically (=as built-in) in this new kernel configuration. However, everything that was/is configured as a <M>odule in the dist-kernel - and NOT loaded - is now configured as disabled (# ... is not set) in this new .config. This means that any modules that have not been loaded at this point will never be included in the new kernel configuration. And as we all know, almost everything in our dist-kernel is configured as a module; an example: CONFIG_USB_STORAGE=m

If you have NOT inserted a USB stick into your machine (before doing a "make localyesconfig"), then UDEV has not loaded this module. A “make localyesconfig” will then create a “# CONFIG_USB_STORAGE is not set” in the new configuration ... and you will never be able to use any USB stick again. :lol:

As a result, you have disabled many options that you will need in the future (just think of netfilter; you will never be able to have a firewall).

*) @amosbarsinai: Go into /usr/src/linux and do a "make help" ... ;-)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 06, 2025 11:57 am

amosbarsinai,

I am not happy with this part of our Gentoo Handbook:
https://wiki.gentoo.org/wiki/Handbook:A ... figuration

IMHO it is misleading (do a "make localmodconfig") and incomplete... without my 20 years of experience with manually configuring kernels, I would not be able to configure a bootable kernel based on this article alone.

Yes, breaking new ground is a very good approach to learning more. Okay, it takes a little longer, but you gain a lot of experience.

When you boot our LiveCD, you will notice that almost everything in this kernel is configured as a module ... which is not a problem, because the associated initramfs loads all the necessary kernel modules (all boot CDs from all other distributions do the same). If you do a "make localmodconfig" from this active kernel, you get also almost everything configured as a module ... which is not a problem if you know which modules you need to switch to <*>.

"make localyesconfig" helps a little here, because it configures everything as built-in (then you no longer need initramfs) ... you then just have to enter all firmware files manually in the kernel configuration ... but such a kernel should at least boot. Okay, some things won't work because... you may not have loaded all the modules at this point. Did you plug in a USB stick... so that the CONFIG_USB_STORAGE=m module was loaded? (Yes, that's also configured as a module in our dist-kernel, just like all the modules you need for a firewall and much more).

But then there is also a lot of unnecessary stuff configured in this kernel and the question arises why you want to configure a kernel yourself at all?

You will then have the same kernel as our Gentoo distribution (only without initramfs): a kernel that can be used on all systems, regardless of whether they are Intel or AMD. Normally, you configure a kernel yourself because you want a lean - and ideally also a hardened - kernel. Okay, there is another reason: to get to know the core of a Linux system better. That's a good reason.

The nice thing about the Linux kernel is that you never have enough experience to understand everything about it... and even if you do, the developers have counteracted this by introducing new options in every new major version. :lol:

For example, I can highly recommend 6.16 (or higher) because you can then compile the kernel with march=native (you have a modern AlderLake that will benefit from this):
See number 2 of https://wiki.gentoo.org/wiki/User:Pieti ... 16#Upgrade
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 06, 2025 12:54 pm

amosbarsinai,

I just read this chapter of our wiki article:
https://wiki.gentoo.org/wiki/Intel_micr ... patible.29
and found that it is outdated. Please only use my old post (which I updated in 2020 and 2023):
https://forums.gentoo.org/viewtopic-t-1065464.html
(I already gave you this link, but better safe than sorry ;-) )
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Fri Oct 10, 2025 6:33 pm

Well, I'm answering in a bit of delay, but I'll look into the resources you linked (I've learned to trust you by now...).
Also, do you actually config the whole kernel yourself...? Walk through the whole nconfig tree? That's... impressive...
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Fri Oct 10, 2025 9:30 pm

amosbarsinai wrote:[...] Also, do you actually config the whole kernel yourself...? Walk through the whole nconfig tree? [...]
Yes ... and ... no. :lol:

Yes, I did it at a time where we had OSS (OpenSoundSystem) in the kernel (that was before ALSA) ... but of course I do not check everything in DeviceDrivers (here are many modules you usually never need; e.g. Greybus, Chrome hardware, Industrial I/O support, Android ... and many more).

Usually you do it only ONE time ... the initial configuration ... and later you will check only (with "make oldconfig") new options (see my Update from X to Y articles). If you buy a new machine with a CPU from the same vendor you can mostly use the old config (disable old ethernet module; enable new ethernet module; etc.).

Have fun with Gentoo! :D
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sat Oct 11, 2025 8:23 am

So I copied the defconfig (/usr/src/linux/arch/x86/configs/x86_64_defconfig) (which I discovered by scouring [profile=]pietinger[/profile]'s tutorials) into /usr/src/linux/.config and ran

Code: Select all

make defconfig
, then

Code: Select all

make
make modules_install
make install
grub-install /dev/sda3 --efi-directory=/efi
grub-mkconfig -o /boot/grub/grub.cfg
, exited arch-chroot, rebooted, and booted the newly installed kernel.
The kernel panicked (I think, capslock is blinking) without even displaying an error message.
It only says

Code: Select all

EFI stub: Loaded united from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9
That's strange though... I thought I used a monolithic kernel boot, not initrd/efi stubs...
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 11, 2025 10:03 am

Please give us (after chrooting into your installation):

- output of "efibootmgr" + "emerge --info"
- "parted -l" -OR- "fdisk -l"
- ls -al /boot
- cat /boot/grub/grub.cfg
- your current kernel .config with wgetpaste
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 11, 2025 10:44 am

P.S.: And please give us also the complete output of "lspci -nnk" (because I guess you had cutted some lines in your old output; I miss AHCI and/or NVME)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 11, 2025 11:36 am

amosbarsinai,

I have no idea what

Code: Select all

make defconfig
is useful for.
It does not normally produce a useful kernel.

It also does the copy you did by hand too.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sat Oct 11, 2025 12:25 pm

Hey, Pastebin for config is https://pastebin.com/w0criGcX.
Pastebin for

Code: Select all

lspci -nnk
is here (not sure why you'd need it, it's from arch-chrooting my root directory but still with the LiveCD's kernel...): https://pastebin.com/CLaMADvx
Here's the command chain:

Code: Select all

livecd / # efibootmgr
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0000,0001
Boot0000* gentoo        HD(1,GPT,18d28bfa-b0c3-4924-aeda-db621124ecab,0x100,0x40000)/\EFI\gentoo\grubx64.efi
Boot0001* UEFI: SanDisk, Partition 2    PciRoot(0x0)/Pci(0x14,0x0)/USB(6,0)/HD(2,GPT,14f70f4d-6fcc-458c-a643-09ff7d235b54,0x234,0x1680)0000424f
livecd / # emerge --info
Portage 3.0.68 (python 3.13.5-final-0, default/linux/amd64/23.0/desktop/plasma, gcc-14, glibc-2.41-r6, 6.12.47 x86_64)
=================================================================
System uname: Linux-6.12.47-x86_64-Intel-R-_Core-TM-_i3-N305-with-glibc2.41
KiB Mem:     7732652 total,   7186680 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 04 Oct 2025 18:30:01 +0000
Head commit of repository gentoo: 147a8180b722c753f9b18c94d597514ccd8693fc
sh bash 5.3_p3-r2
ld GNU ld (Gentoo 2.45 p3) 2.45.0
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.3_p3-r2::gentoo
dev-build/autoconf:        2.72-r3::gentoo
dev-build/automake:        1.18.1::gentoo
dev-build/cmake:           3.31.8::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.2::gentoo
dev-lang/perl:             5.40.2::gentoo
dev-lang/python:           3.13.5_p1::gentoo
llvm-core/llvm:            20.1.8::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.62.10::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-devel/binutils:        2.45-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.3.1_p20250801::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.12::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41-r6::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-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts: 

Binary Repositories:

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d"
CXXFLAGS="-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="-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 export-pms-vars fixlafiles getbinpkg ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirror.isoc.org.il/pub/gentoo/     https://tethys.il.ext.planetunix.net/pub/gentoo/     http://tethys.il.ext.planetunix.net/pub/gentoo/     ftp://tethys.il.ext.planetunix.net/pub/gentoo/     rsync://tethys.il.ext.planetunix.net/gentoo/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
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 a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg kde kwallet lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_14" 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 aes avx avx2 avx_vnni bmi1 bmi2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax 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" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-3" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_13" RUBY_TARGETS="ruby32 ruby33" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" 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, MAKEOPTS, 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

livecd / # fdisk -l
Disk /dev/sda: 238.37 GiB, 255944818688 bytes, 62486528 sectors
Disk model: HN8T15DEHKX075  
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: CB29A0B6-355C-41F5-A912-927FEB976F32

Device       Start      End  Sectors   Size Type
/dev/sda1      256   262399   262144     1G EFI System
/dev/sda2   262400  2359551  2097152     8G Linux swap
/dev/sda3  2359552 62486271 60126720 229.4G Linux root (x86-64)
GPT PMBR size mismatch (1560463 != 15630335) will be corrected by write.
The backup GPT table is not on the end of the device.


Disk /dev/sdb: 7.45 GiB, 8002732032 bytes, 15630336 sectors
Disk model: Cruzer Blade    
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: 14F70F4D-6FCC-458C-A641-09FF7D235B54

Device       Start     End Sectors   Size Type
/dev/sdb1       64     563     500   250K Microsoft basic data
/dev/sdb2      564    6323    5760   2.8M EFI System
/dev/sdb3     6324 1559815 1553492 758.5M Apple HFS/HFS+
/dev/sdb4  1559816 1560415     600   300K Microsoft basic data


Disk /dev/loop0: 669.61 MiB, 702140416 bytes, 1371368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
livecd / # ls -al /boot
total 42616
drwxr-xr-x 1 root root      324 Oct 11 08:11 .
drwxr-xr-x 1 root root      132 Oct  4 18:35 ..
-rw-r--r-- 1 root root  7921924 Oct 11 08:11 System.map-6.12.41-gentoo
-rw-r--r-- 1 root root  7921924 Oct 11 08:08 System.map-6.12.41-gentoo.old
-rw-r--r-- 1 root root   177152 Oct 11 08:11 amd-uc.img
-rw-r--r-- 1 root root   143649 Oct 11 08:11 config-6.12.41-gentoo
-rw-r--r-- 1 root root   143649 Oct 11 08:08 config-6.12.41-gentoo.old
drwxr-xr-x 1 root root      102 Oct 11 08:11 grub
-rw-r--r-- 1 root root 13644800 Oct 11 08:11 vmlinuz-6.12.41-gentoo
-rw-r--r-- 1 root root 13644800 Oct 11 08:08 vmlinuz-6.12.41-gentoo.old
livecd / # cat /boot/grub/grub.cfg
#
# 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 btrfs
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  166acb37-6c03-4dd1-91fa-07cb86b3f30f
else
  search --no-floppy --fs-uuid --set=root 166acb37-6c03-4dd1-91fa-07cb86b3f30f
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-166acb37-6c03-4dd1-91fa-07cb86b3f30f' {
        load_video
        insmod gzio
        insmod part_gpt
        insmod btrfs
        set root='hd0,gpt3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  166acb37-6c03-4dd1-91fa-07cb86b3f30f
        else
          search --no-floppy --fs-uuid --set=root 166acb37-6c03-4dd1-91fa-07cb86b3f30f
        fi
        echo    'Loading Linux 6.12.41-gentoo ...'
        linux   /boot/vmlinuz-6.12.41-gentoo root=PARTUUID=f0db0bcf-1bbb-4473-9abc-58ebf2d755f2 ro  
        echo    'Loading initial ramdisk ...'
        initrd  /boot/amd-uc.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-166acb37-6c03-4dd1-91fa-07cb86b3f30f' {
        menuentry 'Gentoo GNU/Linux, with Linux 6.12.41-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.12.41-gentoo-advanced-166acb37-6c03-4dd1-91fa-07cb86b3f30f' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod btrfs
                set root='hd0,gpt3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  166acb37-6c03-4dd1-91fa-07cb86b3f30f
                else
                  search --no-floppy --fs-uuid --set=root 166acb37-6c03-4dd1-91fa-07cb86b3f30f
                fi
                echo    'Loading Linux 6.12.41-gentoo ...'
                linux   /boot/vmlinuz-6.12.41-gentoo root=PARTUUID=f0db0bcf-1bbb-4473-9abc-58ebf2d755f2 ro  
                echo    'Loading initial ramdisk ...'
                initrd  /boot/amd-uc.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.12.41-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.12.41-gentoo-recovery-166acb37-6c03-4dd1-91fa-07cb86b3f30f' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod btrfs
                set root='hd0,gpt3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  166acb37-6c03-4dd1-91fa-07cb86b3f30f
                else
                  search --no-floppy --fs-uuid --set=root 166acb37-6c03-4dd1-91fa-07cb86b3f30f
                fi
                echo    'Loading Linux 6.12.41-gentoo ...'
                linux   /boot/vmlinuz-6.12.41-gentoo root=PARTUUID=f0db0bcf-1bbb-4473-9abc-58ebf2d755f2 ro single 
                echo    'Loading initial ramdisk ...'
                initrd  /boot/amd-uc.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.12.41-gentoo.old' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.12.41-gentoo.old-advanced-166acb37-6c03-4dd1-91fa-07cb86b3f30f' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod btrfs
                set root='hd0,gpt3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  166acb37-6c03-4dd1-91fa-07cb86b3f30f
                else
                  search --no-floppy --fs-uuid --set=root 166acb37-6c03-4dd1-91fa-07cb86b3f30f
                fi
                echo    'Loading Linux 6.12.41-gentoo.old ...'
                linux   /boot/vmlinuz-6.12.41-gentoo.old root=PARTUUID=f0db0bcf-1bbb-4473-9abc-58ebf2d755f2 ro  
                echo    'Loading initial ramdisk ...'
                initrd  /boot/amd-uc.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.12.41-gentoo.old (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.12.41-gentoo.old-recovery-166acb37-6c03-4dd1-91fa-07cb86b3f30f' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod btrfs
                set root='hd0,gpt3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  166acb37-6c03-4dd1-91fa-07cb86b3f30f
                else
                  search --no-floppy --fs-uuid --set=root 166acb37-6c03-4dd1-91fa-07cb86b3f30f
                fi
                echo    'Loading Linux 6.12.41-gentoo.old ...'
                linux   /boot/vmlinuz-6.12.41-gentoo.old root=PARTUUID=f0db0bcf-1bbb-4473-9abc-58ebf2d755f2 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 ###
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 11, 2025 12:59 pm

I see multiple problems ... :lol:

1. The reason you dont see anything (not even a kernel panic) is a missing FrameBuffer (you have:# CONFIG_FB is not set). Let me quote from:
https://wiki.gentoo.org/wiki/User:Pieti ... rsion_6.12
->
I am not happy with the default configuration we have, after we have just emerged gentoo-sources (or after we did a "make defconfig"). Why ?

[...]

On the other side some options are not enabled by default which you must have to be able to boot your machine.
As Neddy already said, using the default configuration without any change in not successful

2. I asked for "lspci -nnk" because I want to see one (or both) of these two entries (this is from my machine; I have/use both) nvme and/or ahci:

Code: Select all

10000:e0:17.0 SATA controller [0106]: Intel Corporation Raptor Lake SATA AHCI Controller [8086:7a62] (rev 11)
        Subsystem: Gigabyte Technology Co., Ltd Device [1458:b005]
        Kernel driver in use: ahci
10000:e1:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO [144d:a80a]
        Subsystem: Samsung Electronics Co Ltd SSD 980 PRO [144d:a801]
        Kernel driver in use: nvme
The only thing I have seen in your output for accessing disks is:

Code: Select all

00:12.7 Universal Flash Storage controller [0109]: Intel Corporation Alder Lake-N UFS Controller [8086:54ff]
        DeviceName: Onboard - Other
        Kernel driver in use: ufshcd
3. I cannot believe you have booted from a LiveCD because here I am missing the i915 module (you would get with our GentooLiveCD):

Code: Select all

00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-N [UHD Graphics] [8086:46d0]
        DeviceName: Onboard - Video
        Subsystem: ASUSTeK Computer Inc. Device [1043:18f3]

Now how do you want to proceed?

The easy way with "make localyesconfig" ... or doing all what I have written in my Wiki Articles? Its up to you. :P
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 11, 2025 1:20 pm

amosbarsinai,

Make it work first, make it leaner, meaner, faster, better, whatever better is, later.
Build on what you know works. Start with a binary kernel/initrd set.

Ispci -nnk tells us the vendor and device IDs of all the hardware on your PCI busses.
The drivers for many of them are required to be able to boot.
The vendor and device IDs are how the kernel binds to the devices.
They also let us search cateee.net for missing drivers.

The -k tells lspci to output the kernel module in use, which saves us looking at cateee.net :)
When no driver is listed, that device is either not working or does not require a driver. The latter is rare. e.g. RAM controller, as its configured by the firmware and the kernel only uses it
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 11, 2025 1:26 pm

NeddySeagoon wrote:[...] Start with a binary kernel/initrd set. [...]
YESSSS! 8)

Let me quote from https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
->
Secondly, even if you want to use a manually configured kernel, you should first install the precompiled kernel image sys-kernel/gentoo-kernel-bin or sys-kernel/gentoo-kernel (non-precompiled) because you can then select it at any time via the boot manager and thus have a backup kernel when your manually configured kernel causes problems. [...]
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sat Oct 11, 2025 1:28 pm

Uhhh... first of all, I'm certain I really did boot from the Gentoo LiveCD.
I have no idea why the i915 is missing, there's no i686 either (though if I remember correctly they don't use it for x86_64... I might just be an idiot here, I was born after they stopped using x32 :|).
I did run this within a chroot environment (arch-chroot) into /dev/sda3, my designated root partition - I can try running the same outside of it.
About the NVMe/AHCI thing, I have a SATA (SSD) disk. Again, I can't explain the missing entries.
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 11, 2025 1:35 pm

amosbarsinai wrote:Uhhh... first of all, I'm certain I really did boot from the Gentoo LiveCD. [...]
Do you have then a graphical desktop (KDE/Plasma) ... and can work with it? Check if your mouse works. Do you have a touchpad? If yes, does it work?

What is the output of "lsmod"? (be aware it could be more pages; try also "lsmod | more"; maybe use also wgetpaste). Give us also the output of "blkid" and "lsblk".

(Maybe also: The output of "lscpu" will help us later for configuring the kernel)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sat Oct 11, 2025 1:35 pm

And can I just emerge the gentoo-kernel? It's as simple as that? How do I install it?
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 11, 2025 1:40 pm

amosbarsinai wrote:And can I just emerge the gentoo-kernel? It's as simple as that? How do I install it?
This is the short description (for an OpenRC system; you have):
https://wiki.gentoo.org/wiki/User:Pieti ... tem#Kernel
(I suggest gentoo-kernel-bin; its faster to install; and it is all you need; it is the same as gentoo-kernel but without all the compiling stuff)

You dont need to install grub again ... but you must configure grub again -> grub-mkconfig
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sat Oct 11, 2025 1:47 pm

Okay, thank you...
If that will fail too I'm gonna come back here with the output of the commands you needed.
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sat Oct 11, 2025 4:17 pm

Guys, I browsed through the discussion, and have not noticed the answer whether the hard drive is NVME, given that this option was not enabled in the beginning ( AHCI things were configured)
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sat Oct 11, 2025 4:19 pm

It's not NVMe, I'm not rich :|
But I installed a dist kernel and now it's fine, thanks to you all
Top
zen_desu
Guru
Guru
Posts: 501
Joined: Fri Oct 25, 2024 3:14 pm
Location: your area

  • Quote

Post by zen_desu » Sat Oct 11, 2025 6:27 pm

amosbarsinai wrote:It's not NVMe, I'm not rich :|
But I installed a dist kernel and now it's fine, thanks to you all
I'm not sure what the market is like there but NVMEs can be real cheap, and can pay themselves off in power savings if your system runs often and you're comparing to a spinning disk, something to consider

(~$50 for a 1tb nvme, compared to $40 for a 1tb spinning disk, from a quick search)
µgRD dev
Wiki writer
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sat Oct 11, 2025 9:42 pm

zen_desu wrote:
amosbarsinai wrote:It's not NVMe, I'm not rich :|
But I installed a dist kernel and now it's fine, thanks to you all
I'm not sure what the market is like there but NVMEs can be real cheap, and can pay themselves off in power savings if your system runs often and you're comparing to a spinning disk, something to consider

(~$50 for a 1tb nvme, compared to $40 for a 1tb spinning disk, from a quick search)
I suspect a bit more price difference comes from the laptop built for NVME, and a laptop built for a spinning disk. Not even component prices, but marketing
Top
Post Reply

112 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Return to “Installing 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