Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
initramfs: sh can't type:
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Wed Feb 12, 2025 12:32 pm    Post subject: initramfs: sh can't type: Reply with quote

Hello,

I would like to build my own initramfs.
However, I can't type anything into the shell (enter nothing).
Even if I bring the boot process up to the getty (but systemd usually aborts in the middle)
https://forums.gentoo.org/viewtopic-t-1172303.html
I also try to get the shell to run in initramfs.

Here is the code mines initrm fs:

Code:
#!/bin/busybox sh
#Importent note: ./dev contains: null  nvme0n1p5  tty

rescue_shell() {
    echo "resce function"
    exec /bin/busybox sh || {
        echo "Failed to start interactive shell"
        /bin/busybox sh || {
            echo "Failed to start interactive she2"
            sh    # Fallback to non-interactive
            }
       }

}

echo "Check mount points: df -h"
df -h

echo "mount /proc /sys: mount -t proc none /proc; mount -t sysfs none /sys"
mount -t proc none /proc
mount -t sysfs none /sys
#mount -t devtmpfs none /dev || rescue_shell

echo "Check mount points: df -h"
df -h

echo "second Checking and ensuring /dev/tty is accessible..."
# Check if /dev/tty is now accessible
if [ -c /dev/tty ]; then
    echo "/dev/tty is available."
else
    echo "Failed to create /dev/tty. Exiting rescue mode."
    exit 1
fi

# Solution 2: Ensure the root filesystem is correctly mounted
echo "Mounting the root filesystem..."

# Mount the root filesystem (adjust device path as needed)
if ! mount -o ro /dev/nvme0n1p5 /mnt/root; then
    echo "Failed to mount root filesystem. Exiting."
    exit 1
else
    echo "Root filesystem mounted successfully."
fi

# After mounting, check the filesystem status
echo "Root filesystem status: df -h"
df -h

# Debug: List mounted filesystems
echo "Mounted filesystems: mount"
mount || echo "somthing whent wrong during mount command"

# Ensure the terminal is interactive
echo "Ensure the terminal is interactive"
#if [ ! -t 1 ]; then
#    echo "No controlling terminal found. Exiting."
#    exit 1
#fi

# Explicitly open the terminal (tty) and exec a new shell
echo "second step: exec </dev/tty1 >/dev/tty1 2>&1"
exec </dev/tty >/dev/tty 2>&1 || rescue_shell
echo "Current terminal (tty): tty"
tty || echo "tty went wrong"
#exec setsid sh
#ls -l /dev/tty*
echo "recuse_shell"
rescue_shell || echo "Something wnt wrong. drping not to shell funktion"

echo "NOT Failed to mount root filesystem."
umount /proc
umount /sys
#umount /dev
exec switch_root /newroot /sbin/init


output:
Code:
Check mount point:df -h
Filesystem
df: /etc/mtab: No such file or directory
mount /proc /sys: mount -t proc none /proc; mount -t sysfs none /sys
Check mount points: df -h
Filsystem
second Checking and ensuring /dev/tty is accessible...
/dev/tty is available.
Mounting the root filesystem...
Root filsystem mount seccessfully.
Root filesystem status: df -h
Filsystem ...
/dev/ nvme0n1p5 ...
Mounted filesystems: mount
none on /proc (0)
none on /sys type sysfs (0)
/dev/nvme0n5 on /mnt/root type ext4 (ro)
_


nothing happens from here!?
however when i get to the shell i can't type as i said
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5400
Location: Bavaria

PostPosted: Wed Feb 12, 2025 1:32 pm    Post subject: Re: initramfs: sh can't type: Reply with quote

testware73 wrote:
[...] however when i get to the shell i can't type as i said

If you have created your own intramfs, perhaps you have also configured your kernel yourself? If so, make sure that you have activated this:
Code:
Device Drivers  --->
    Input device support  --->
        [*]     Provide legacy /dev/psaux device
        [*] Keyboards  --->
            <*> AT keyboard

See more:
https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#Device_Drivers
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Wed Feb 12, 2025 2:36 pm    Post subject: Reply with quote

as info i'm using: HUAWEI RLEF-XX

Device Drivers --->
Input device support --->
[*] Provide legacy /dev/psaux device
[*] Keyboards --->
<*> AT keyboard


<*> AT keyboard was activted
I could not find Provide legacy /dev/psaux device
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5400
Location: Bavaria

PostPosted: Wed Feb 12, 2025 3:32 pm    Post subject: Reply with quote

testware73 wrote:
[...] I could not find Provide legacy /dev/psaux device

Sorry, this was a "copy error" (you dont need a mouse; the dependencies are: Depends on: INPUT [=y] && INPUT_MOUSEDEV [=y] but not necessary for your problem).

Why do you have this removed? ->
Code:
#mount -t devtmpfs none /dev || rescue_shell

You need it. Please check:
Code:
Device Drivers  --->
    Generic Driver Options  --->
        -*- Maintain a devtmpfs filesystem to mount at /dev

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Thu Feb 13, 2025 10:18 am    Post subject: Reply with quote

Good morning, I have activated it
-*- Maintain a devtmpfs filesystem to mount at /dev
and that (mount -t devtmpfs none /dev) alone did not solve the problem.

note from the linked post: if i generate an initramfs from genkern everything works as it should, so it's not a bug but i'm doing something wrong or missing something.
(but I don't understand what and why)
Back to top
View user's profile Send private message
user
Apprentice
Apprentice


Joined: 08 Feb 2004
Posts: 220

PostPosted: Thu Feb 13, 2025 11:01 am    Post subject: Reply with quote

Hi,
according to your output last running command was:
Code:
mount || echo "somthing whent wrong during mount command"

but next expected command output still missing:
Code:
echo "Ensure the terminal is interactive"


So, mount hangs?
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Thu Feb 13, 2025 1:07 pm    Post subject: Reply with quote

Quote:
So, mount hangs?


probably I don't know
I get no error message
I don't get an error message, but init doesn't continue for whatever reason

I have changed a bit of my code
Code:
#!/bin/busybox sh
#Importent note: ./dev contains: console  null  nvme0n1p5  tty

shell() {
    echo "resce function"
    setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
}

set -x

echo "Check mount points: df -h"
df -h

echo "mount /proc /sys: mount -t proc none /proc; mount -t sysfs none /sys mount -t devtmpfs devtmpfs /dev"
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs devtmpfs /dev
# mount -t devtmpfs none /dev || rescue_shell

echo "Check mount points: df -h"
df -h

echo "second Checking and ensuring /dev/tty is accessible..."
# Check if /dev/tty is now accessible
if [ -c /dev/tty ]; then
    echo "/dev/tty is available."
else
    echo "Failed to create /dev/tty. Exiting rescue mode."
    exit 1
fi

# Solution 2: Ensure the root filesystem is correctly mounted
echo "Mounting the root filesystem..."

# Mount the root filesystem (adjust device path as needed)
if ! mount -o ro /dev/nvme0n1p5 /mnt/root; then
    echo "Failed to mount root filesystem. Exiting."
    exit 1
else
    echo "Root filesystem mounted successfully."
fi

ls -l /dev/tty
ls -l /dev/tty1
ls -l /dev/tty1
echo "second step: exec </dev/tty1 >/dev/tty1 2>&1"
# exec </dev/tty >/dev/tty 2>&1
tty

echo "recuse_shell"
setsid sh -c 'exec sh </dev/tty >/dev/tty 2>&1' || echo "failed" && tty && sh
# shell || echo "Something wnt wrong. drping not to shell funktion"

echo "NOT Failed to mount root filesystem."
umount /proc
umount /sys
# umount /dev

exec switch_root /newroot /sbin/init

# Debug: List mounted filesystems
# echo "Mounted filesystems: mount"
# mount || echo "somthing whent wrong during mount command"

# Ensure the terminal is interactive
# echo "Ensure the terminal is interactive"
# if [ ! -t 1 ]; then
#    echo "No controlling terminal found. Exiting."
#    exit 1
# fi

# Explicitly open the terminal (tty) and exec a new shell
# echo "second step: exec </dev/tty1 >/dev/tty1 2>&1"
# exec </dev/tty >/dev/tty 2>&1 || rescue_shell
# echo "Current terminal (tty): tty"
# tty || echo "tty went wrong"
# exec setsid sh
# ls -l /dev/tty*


output:
Code:
Check mount point:df -h
Filesystem
df: /etc/mtab: No such file or directory
mount /proc /sys: mount -t proc none /proc; mount -t sysfs none /sys  mount -t devtmpfs devtmpfs /dev
Check mount points: df -h
Filsystem
devtmpfs 7.7G 0 7.7G 
second Checking and ensuring /dev/tty is accessible...
/dev/tty is available.
Mounting the root filesystem...
Root filsystem mount seccessfully.
crw-rw-rw-   1  0   0   5,  0 Feb 13 11:41 /dev/tty
crw-------   1  0   0   4,  1 Feb 13 11:41 /dev/tty1
crw-------   1  0   0   4,  1 Feb 13 11:41  /dev/tty1
second step: exec </dev/tty1 >/dev/tty1 2>&1
not a tty
recuse_shell
sh: can't open /dev/tty: No such device or address
failed
not a tty
Not Failed to mount root filesystem.


Last edited by testware73 on Thu Feb 13, 2025 2:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1500
Location: Richmond Hill, Canada

PostPosted: Thu Feb 13, 2025 1:48 pm    Post subject: Reply with quote

Did you custom busybox configuration?

The init output kind of peculiar, for example ls -l /dev/tty only show /dev/tty instead show the entire directory entry (owner, permission, etc ...) It feel the "-l" option were ignored.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5400
Location: Bavaria

PostPosted: Thu Feb 13, 2025 2:09 pm    Post subject: Reply with quote

testware73,

you need only a working console for working in a rescue-shell.

Please provide us your kernel .config file (use wgetpaste for this: https://wiki.gentoo.org/wiki/Wgetpaste ) and tell us some more informations:

Do you have your initramfs as an embedded or as an external CPIO archive? (https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview#Building_an_initramfs ).

Show us the content of: Either initramfs_list OR directory where you build it.

Try to use this skeleton: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview#Simple_Skeleton

But first of all, I would like to check your .config ... if there is something missing, you will never be able to work in your initramfs environment.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Thu Feb 13, 2025 2:10 pm    Post subject: Reply with quote

I haven't written it down because I have to type everything in by hand

I'll edit it again with the values.
Quote:
Did you custom busybox configuration?

no, I just installed bussybox according to
https://wiki.gentoo.org/wiki/Custom_Initramfs

Code:
emerge --ask --verbose sys-apps/busybox
ldd /bin/busybox
        not a dynamic executable
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Thu Feb 13, 2025 3:03 pm    Post subject: Reply with quote

Quote:
Please provide us your kernel .config file

Thank you for providing me with this https://wiki.gentoo.org/wiki/, I forgot how to do it with curl and didn't find anything quickly so I hoped you wouldn't ask about it

note: i am in an arch chroot to gentoo
Code:
wgetpaste --tinyurl zcat /proc/config.gz

http://0x0.st/8Z0j.config


Quote:
Do you have your initramfs as an embedded or as an external CPIO archive? (https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview#Building_an_initramfs ).

external CPIO archive
Back to top
View user's profile Send private message
user
Apprentice
Apprentice


Joined: 08 Feb 2004
Posts: 220

PostPosted: Thu Feb 13, 2025 3:24 pm    Post subject: Reply with quote

What about using /dev/console?
Code:
exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Thu Feb 13, 2025 3:37 pm    Post subject: Reply with quote

Quote:
note: i am in an arch chroot to gentoo
Code:
wgetpaste --tinyurl zcat /proc/config.gz

http://0x0.st/8Z0j.config


I just looked into it and understood that it is from my Arch but I don't know how to get the configs from my gentoo.
For some reason in /usr/src/linux/ is no longer the .config file and when I try to get the config in the initscript through zcat /proc/config.gz > /mnt/root/config no config is created. (i did mount -o ro /dev/nvme0n1p5 /mnt/root to mount -o rw /dev/nvme0n1p5 /mnt/root)
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1500
Location: Richmond Hill, Canada

PostPosted: Thu Feb 13, 2025 3:39 pm    Post subject: Reply with quote

testware73 wrote:
I haven't written it down because I have to type everything in by hand

I'll edit it again with the values.
Quote:
Did you custom busybox configuration?

no, I just installed bussybox according to
https://wiki.gentoo.org/wiki/Custom_Initramfs

Code:
emerge --ask --verbose sys-apps/busybox
ldd /bin/busybox
        not a dynamic executable

Thank you for the editing, that clear my question.

You can not use /dev/tty as input/output device, it is special for representing your current process's tty. it can not be use as parameter for manipulate tty device.

however you can try to set /dev/tty1 if that is your preference. But the most correct one to use would be /dev/console.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5400
Location: Bavaria

PostPosted: Thu Feb 13, 2025 3:45 pm    Post subject: Reply with quote

testware73,,

first of all I can tell you why you have no keyboard ->
Quote:
CONFIG_KEYBOARD_ATKBD=m

(I asked for a good reason if this is <*> and not <M>)

This means it is not built-in the kernel and therefore MUST be loaded from your initramfs. The init-script of our Gentoo distribution kernel does this ... your init-script NOT.

Your .config seems to be taken from a distribution kernel (because nearly everything is configured as <M>odule) ... THEN ... the initramfs must have all modules which are necessary that the kernel is able to access its root partition. e.g.:
Code:
CONFIG_NVME_CORE=m
CONFIG_EXT4_FS=m
CONFIG_XFS_FS=m


You probably already know that you can have a kernel with an associated INITRAMFS, or a manually configured one without an INITRAMFS. For example, our DIST kernels or a kernel created with genkernel have an associated initramfs. Why does a distinction have to be made ?

Perhaps you are also familiar with the fact that a kernel only mounts the root partition itself if NO initramfs is present. As soon as the kernel has an initramfs, it no longer does this and leaves the mounting of the root partition to the init-script of the initramfs.

So, if you want to use a self-made initramfs you have two choices:

1. Copy every kernel module in your initramfs + load every needed module first in your init-script, OR
2. Configure a kernel where all the needed modules are statically built in the kernel (*)

*) Maybe start here: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Thu Feb 13, 2025 4:12 pm    Post subject: Reply with quote

This is the gentoo kernel.
http://0x0.st/8ZGP.txt

However, I checked CONFIG_KEYBOARD_ATKBD is also modular here.

Quote:
Your .config seems to be taken from a distribution kernel (because nearly everything is configured as <M>odule) ... THEN ... the initramfs must have all modules which are necessary that the kernel is able to access its root partition. e.g.:


i done it with menuconfig and oldconfig or something like that

Quote:
You probably already know that you can have a kernel with an associated INITRAMFS, or a manually configured one without an INITRAMFS. For example, our DIST kernels or a kernel created with genkernel have an associated initramfs. Why does a distinction have to be made ?

I want to become more independent.
and my initrmfs should be the first step.
The last time I configured my kernel I was overwhelmed by all the options and explanations that are not understandable for my level.

Quote:
Perhaps you are also familiar with the fact that a kernel only mounts the root partition itself if NO initramfs is present. As soon as the kernel has an initramfs, it no longer does this and leaves the mounting of the root partition to the init-script of the initramfs.

Now I didn't know it anymore. probably forgot or never knew it before

Quote:
Copy every kernel module in your initramfs + load every needed module first in your init-script, OR

i would rather do it, but i don't have much idea how to find out which module i need. I will try to find out. and try to configure a new kernel myself with the next gentoo kernel source code update

Quote:
exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console

no that doesn't help
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1500
Location: Richmond Hill, Canada

PostPosted: Thu Feb 13, 2025 4:32 pm    Post subject: Reply with quote

Does your keyboard led came on?

If not that mean kernel does not know your input device. most likely kernel module(s) missing.

if your keyboard is USB device you would need some kind of HID and USB support in kernel. if your keyboard is wireless you may need additional something(I am not 100% sure about this).
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5400
Location: Bavaria

PostPosted: Thu Feb 13, 2025 6:36 pm    Post subject: Reply with quote

testware73,

if you want to "play" with a self-made initramfs, the easiest way is using a kernel where all modules which the kernel needs to access the root partition is built-in (all others can be loaded later by UDEV). If your root partition is a ext4 or xfs, then you already have everything in your kernel:
Code:
CONFIG_EFI_PARTITION=y
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
CONFIG_BLK_DEV_SD=y
CONFIG_SATA_AHCI=y
CONFIG_EXT4_FS=y
CONFIG_JBD2=y
CONFIG_XFS_FS=y

(You dont need CONFIG_EXT2_FS=y because EXT4 is able to handle also EXT2)

If you want to type something when exiting the init-script you need:
Code:
CONFIG_KEYBOARD_ATKBD=y


I guess you have an Intel machine (because of many Intel settings you made) ... but you have also many (useless) AMD settings. If you want a kernel with as few as possible mdoules you can go with my wiki article.

I highly recommend to disable these (makes more problems than it helps):
Code:
CONFIG_SYSFB_SIMPLEFB=y
CONFIG_DRM_SIMPLEDRM=y

because you need only these (you already have ;-) ):
Code:
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_FB_VESA=y
CONFIG_FB_EFI=y
CONFIG_FRAMEBUFFER_CONSOLE=y

As you work with an external CPIO archive as initramfs this is not important for you ... but please keep in mind if you want to make an embedded initrams:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview#Why_do_I_need_an_additional_line_when_using_an_embedded_initramfs_.3F


P.S.: Maybe read also:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Confusion_with_root%3DPARTUUID%3D_and_root%3DUUID%3D
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Fri Feb 14, 2025 12:02 pm    Post subject: Reply with quote

Quote:
Does your keyboard led came on?

Yes, even without atkbd, my laptop uses PCH, I think the LED is via the ACPI protocol

I'll first try to get my system running with my current kernel.
And I will proceed according to the previous plan. My goal is to learn something and not necessarily to get Gentoo running

And now I have the next problem
when I'm in the initscript:

Code:
ls /lib/modules
/lib/modules exist
modinfo atkbd
modprobe: can't change directory to '/lib/modules': No such file or dir


so I on my chroot gentoo:

So I think I need to copy it to /lib/modules/
But when I look for the driver to copy it:
Code:
modinfo atkbd
modinfo: ERROR: Module atkbd not found.


does anyone have a solution, maybe my approach is wrong?!

btw: I'm chroot Arch > gentoo
Arch has the atkbd driver:
Code:
modinfo atkbd
filename: /lib/modules/6.13.2-arch1-1/kernel/drivers/input/keyboard/atkbd.ko.zst

but I am unsure if I can use this
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1500
Location: Richmond Hill, Canada

PostPosted: Fri Feb 14, 2025 12:09 pm    Post subject: Reply with quote

Did you copy the entire /lib/modules or just the single module?

I think modinfo need point to the actual file.
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 28

PostPosted: Fri Feb 14, 2025 12:37 pm    Post subject: Reply with quote

there is not a single file in /lib/modules from my init script.
I am considering copying certain drivers there.
or copying my complete /lib/modules from gentoo or arch to /lib/modules from my initrmfs

(as above shown): but in gentoo /lib/modules there is none (confuses me):
Code:
modinfo atkbd
modinfo: ERROR: Module atkbd not found.


(optional) I could use /lib/modules from arch?

Quote:
I think modinfo need point to the actual file.

probably

I wonder where the initscript from genkern gets the drivers from.
from /lib/modules
or from /dev/nvmexnxpx/lib/modules
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5400
Location: Bavaria

PostPosted: Fri Feb 14, 2025 1:08 pm    Post subject: Reply with quote

testware73 wrote:
[...] I wonder where the initscript from genkern gets the drivers from. [...]

You can check it by yourself -> https://wiki.gentoo.org/wiki/Custom_Initramfs#Extracting_the_cpio_archive

If you want a minimal initramfs you should read also: https://wiki.gentoo.org/wiki/UgRD

(The developer of this is very active and helpful in our forums here)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1500
Location: Richmond Hill, Canada

PostPosted: Fri Feb 14, 2025 1:59 pm    Post subject: Reply with quote

testware73 wrote:
there is not a single file in /lib/modules from my init script.
I am considering copying certain drivers there.
or copying my complete /lib/modules from gentoo or arch to /lib/modules from my initrmfs

(as above shown): but in gentoo /lib/modules there is none (confuses me):
Code:
modinfo atkbd
modinfo: ERROR: Module atkbd not found.


(optional) I could use /lib/modules from arch?

Quote:
I think modinfo need point to the actual file.

probably

I wonder where the initscript from genkern gets the drivers from.
from /lib/modules
or from /dev/nvmexnxpx/lib/modules

Kernel modules usually need to match exactly with kernel image used. so it is unlikely arch module can be use in gentoo kernel.

For most convenience you should copy the entire /lib/modules/<kernel ver>/* <initramfs>/lib/modules/<kernel ver>/

the <kernel ver> is the running kernel's uname -r output. for example my current running kernel report
Code:
uname -a
Linux pi-3.home 5.10.11-v8-p4 #1 SMP PREEMPT Tue Apr 27 18:58:07 -00 2021 aarch64 GNU/Linux
Then you want to use the command
Code:
uname -r
5.10.11-v8-p4
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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