Forums

Skip to content

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

[SOLVED] initramfs: sh can't type:

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
24 posts • Page 1 of 1
Author
Message
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

[SOLVED] initramfs: sh can't type:

  • Quote

Post by testware73 » Wed Feb 12, 2025 12:32 pm

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)
viewtopic-t-1172303.html
I also try to get the shell to run in initramfs.

Here is the code mines initrm fs:

Code: Select all

#!/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: Select all

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
Last edited by testware73 on Mon Feb 17, 2025 11:03 am, edited 1 time in total.
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: initramfs: sh can't type:

  • Quote

Post by pietinger » Wed Feb 12, 2025 1:32 pm

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: Select all

Device Drivers  --->
    Input device support  --->
        [*]     Provide legacy /dev/psaux device
        [*] Keyboards  --->
            <*> AT keyboard
See more:
https://wiki.gentoo.org/wiki/User:Pieti ... ce_Drivers
https://wiki.gentoo.org/wiki/User:Pieti ... s_Overview
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Wed Feb 12, 2025 2:36 pm

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
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Feb 12, 2025 3:32 pm

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: Select all

#mount -t devtmpfs none /dev || rescue_shell
You need it. Please check:

Code: Select all

Device Drivers  --->
    Generic Driver Options  --->
        -*- Maintain a devtmpfs filesystem to mount at /dev
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Thu Feb 13, 2025 10:18 am

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)
Top
user
Apprentice
Apprentice
Posts: 245
Joined: Sun Feb 08, 2004 4:57 pm

  • Quote

Post by user » Thu Feb 13, 2025 11:01 am

Hi,
according to your output last running command was:

Code: Select all

mount || echo "somthing whent wrong during mount command"
but next expected command output still missing:

Code: Select all

echo "Ensure the terminal is interactive"
So, mount hangs?
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Thu Feb 13, 2025 1:07 pm

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: Select all

#!/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: Select all

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.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Thu Feb 13, 2025 1:48 pm

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.
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Thu Feb 13, 2025 2:09 pm

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:Pieti ... _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:Pieti ... e_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 --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Thu Feb 13, 2025 2:10 pm

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

I'll edit it again with the values.
Did you custom busybox configuration?
no, I just installed bussybox according to
https://wiki.gentoo.org/wiki/Custom_Initramfs

Code: Select all

emerge --ask --verbose sys-apps/busybox
ldd /bin/busybox
        not a dynamic executable
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Thu Feb 13, 2025 3:03 pm

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: Select all

wgetpaste --tinyurl zcat /proc/config.gz 
http://0x0.st/8Z0j.config

Do you have your initramfs as an embedded or as an external CPIO archive? (https://wiki.gentoo.org/wiki/User:Pieti ... _initramfs ).
external CPIO archive
Top
user
Apprentice
Apprentice
Posts: 245
Joined: Sun Feb 08, 2004 4:57 pm

  • Quote

Post by user » Thu Feb 13, 2025 3:24 pm

What about using /dev/console?

Code: Select all

exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Thu Feb 13, 2025 3:37 pm

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)
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Thu Feb 13, 2025 3:39 pm

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.
Did you custom busybox configuration?
no, I just installed bussybox according to
https://wiki.gentoo.org/wiki/Custom_Initramfs

Code: Select all

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.
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Thu Feb 13, 2025 3:45 pm

testware73,,

first of all I can tell you why you have no keyboard ->
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: Select all

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:Pieti ... figuration
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Thu Feb 13, 2025 4:12 pm

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

However, I checked CONFIG_KEYBOARD_ATKBD is also modular here.
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
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.
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
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
exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console
no that doesn't help
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Thu Feb 13, 2025 4:32 pm

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).
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Thu Feb 13, 2025 6:36 pm

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: Select all

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: Select all

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: Select all

CONFIG_SYSFB_SIMPLEFB=y
CONFIG_DRM_SIMPLEDRM=y
because you need only these (you already have ;-) ):

Code: Select all

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:Pieti ... tramfs_.3F


P.S.: Maybe read also:
https://wiki.gentoo.org/wiki/User:Pieti ... %3DUUID%3D
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Fri Feb 14, 2025 12:02 pm

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: Select all

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: Select all

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: Select all

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
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Fri Feb 14, 2025 12:09 pm

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

I think modinfo need point to the actual file.
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Fri Feb 14, 2025 12:37 pm

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: Select all

modinfo atkbd
modinfo: ERROR: Module atkbd not found.
(optional) I could use /lib/modules from arch?
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
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Fri Feb 14, 2025 1:08 pm

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_Ini ... io_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 --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Fri Feb 14, 2025 1:59 pm

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: Select all

modinfo atkbd
modinfo: ERROR: Module atkbd not found.
(optional) I could use /lib/modules from arch?
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: Select all

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: Select all

uname -r
5.10.11-v8-p4
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Mon Feb 17, 2025 11:42 am

I compiled the new kernel with the same configuration.
Now, I can type with my costem as well as from genkernel initrmfs in getty again.

But not in the shell of initrmfs for both. (even if CONFIG_KEYBOARD_ATKBD = y)

I will not look for problems from this point on, but will try to get to know the kernel better.

Maybe you have some ideas (probably won't try them).

But thanks for the help
Top
Post Reply

24 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