Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Chroot shows livecd version in uname -r dracut fails
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
2anwct
n00b
n00b


Joined: 06 May 2025
Posts: 12

PostPosted: Tue May 06, 2025 7:54 pm    Post subject: Chroot shows livecd version in uname -r dracut fails Reply with quote

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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 4078
Location: Rasi, Finland

PostPosted: Wed May 07, 2025 4:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23469

PostPosted: Wed May 07, 2025 5:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
zen_desu
Apprentice
Apprentice


Joined: 25 Oct 2024
Posts: 254

PostPosted: Wed May 07, 2025 5:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
2anwct
n00b
n00b


Joined: 06 May 2025
Posts: 12

PostPosted: Sat May 10, 2025 3:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23469

PostPosted: Sat May 10, 2025 3:42 pm    Post subject: Reply with quote

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



OSZAR »