View previous topic :: View next topic |
Author |
Message |
2anwct n00b

Joined: 06 May 2025 Posts: 12
|
Posted: Tue May 06, 2025 7:54 pm Post subject: Chroot shows livecd version in uname -r dracut fails |
|
|
I followed all the mount options in the handbook and chrooted in but when trying to:
Code: |
dracut --force --hostonly --add-drivers "raid0 raid6_pq raid10 ext4"
dracut[F]: Cannot find module directory /lib/modules/6.12.16-gentoo-dist/
dracut[F]: and --no-kernel was not specified
ls /lib/modules/6.12.21-gentoo-gentoo-dist/build modules.alias modules.builtin.alias.bin modules.dep modules.order modules.symbols.bin
extra modules.alias.bin modules.builtin.bin modules.dep.bin modules.softdep modules.weakdep
kernel modules.builtin modules.builtin.modinfo modules.devname modules.symbols
livecd / # ls /boot/vmlinuz-6.12.21-gentoo-gentoo-dist/boot/vmlinuz-6.12.21-gentoo-gentoo-dist
|
I think dracut uses uname -r. im using md raids and it's not booting so trying to get support in initramfs. kernel has support. I don't know why this is so difficult, I've installed gentoo many times before. Is it supposed to show the livecd version in chroot for uname -r or the kernel youre trying to use? |
|
Back to top |
|
 |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 4078 Location: Rasi, Finland
|
Posted: Wed May 07, 2025 4:41 pm Post subject: |
|
|
dracut has --kver switch. ;) _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23462
|
Posted: Wed May 07, 2025 5:08 pm Post subject: |
|
|
Welcome to the forums. By definition, uname -r shows the uname of the kernel you are currently running. Therefore, when booted from the LiveCD, uname -r shows the version of the kernel from the LiveCD, not the version of any kernel(s) you may be attempting to build for later use. |
|
Back to top |
|
 |
zen_desu Apprentice

Joined: 25 Oct 2024 Posts: 254
|
Posted: Wed May 07, 2025 5:23 pm Post subject: |
|
|
It's generally easiest to let installkernel handle calling the initramfs generator, this ensures the right --kver arg is passed.
ugrd has the same "issue", that it uses uname -r if a --kver is not explicitly passed, in general it makes sense, but can cause confusion. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
 |
2anwct n00b

Joined: 06 May 2025 Posts: 12
|
Posted: Sat May 10, 2025 3:20 pm Post subject: |
|
|
Hu wrote: | Welcome to the forums. By definition, uname -r shows the uname of the kernel you are currently running. Therefore, when booted from the LiveCD, uname -r shows the version of the kernel from the LiveCD, not the version of any kernel(s) you may be attempting to build for later use. |
Yes, that's the problem. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23462
|
Posted: Sat May 10, 2025 3:42 pm Post subject: |
|
|
The last sentence of your first post asked how uname -r was supposed to behave when in a chroot. I was answering that question. |
|
Back to top |
|
 |
|