Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] stuck in linuxbooot. no login
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
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 10

PostPosted: Sat Dec 28, 2024 8:55 pm    Post subject: [SOLVED] stuck in linuxbooot. no login Reply with quote

arch nvme0n1p3/
arch nvme0n1p3//boot/grub/grub.cfg
fat32 nvme0n1p1/efi
gentoo (precompiled kernel) sda/5



when i boot into gentoo i either get a login shell where i can't enter anything.
or the boot process stops after: ACPIL new extension: Huawei Battery Extension or after [Failed] Failed to start Load/Save RF Kill Switch Status.

When i init=/bin/bash everything work
only dbus service does not work.


getty is enabled.
I can also start tty manually.

systemctl has no logs.
dmesg only has the logs from my Arch.

do you have any ideas what i can do?


Last edited by testware73 on Wed Jan 01, 2025 3:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1044

PostPosted: Sun Dec 29, 2024 8:04 am    Post subject: Reply with quote

Hi , I'm not running systemd but you can try to add
init=/usr/lib/systemd/systemd to the kernel comandline
_________________
LRS 64/32
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 10

PostPosted: Sun Dec 29, 2024 9:20 am    Post subject: Reply with quote

Hi,

init=/usr/lib/systemd/systemd
console=tty1
loglevel=7

led to the same result:
Code:

[Failed] Start of Load/Save RF Kill Switch Status failed.
iTCO_vendor_support: vendor-support=0
iTCO_wdt iTCO_wdt: An Intel PCF TCO device was found (version=6 TCOBASE=0x400)
iTCO_wdt iTCO_wdt: initialized. heartbeat=30 sec
[OK] Setup of the virtual console.
intel_tcc_cooling: programmable tcc offset detected
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1044

PostPosted: Sun Dec 29, 2024 12:11 pm    Post subject: Reply with quote

and the output of rfkill :

for systemd I think should be :
Code:
systemctl status systemd-rfkill.service



Code:
equery b rfkill
 * Searching for rfkill ...
sys-apps/util-linux-2.40.2 (/usr/sbin/rfkill)
sys-apps/util-linux-2.40.2 (/usr/share/bash-completion/completions/rfkill)
sys-kernel/gentoo-sources-6.6.62 (/usr/src/linux-6.6.62-gentoo/net/rfkill)


check your rfkill kernel configuration
Code:
zcat /proc/config.gz | grep RFKILL



I hope this is the right way to solve the problem :roll:
_________________
LRS 64/32
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 10

PostPosted: Sun Dec 29, 2024 2:42 pm    Post subject: Reply with quote

I cannot run this in a chroot environment.
I can't run this because of dbus in init=/bin/bash
I don't have another shell
Code:
systemctl status systemd-rfkill.service



I don't know the kernel that well YET
Code:
zcat /proc/config.gz | grep RFKILL
zcat /proc/config.gz | grep RFKILL
CONFIG_RFKILL=m
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
CONFIG_RFKILL_GPIO=m
CONFIG_ATH9K_RFKILL=y
CONFIG_AMILO_RFKILL=m
CONFIG_TOSHIBA_BT_RFKILL=m


I tried it again with other kernel parameters.
I even managed to come back to the login shell once.
But I couldn't type anything in again.

Code:
(d=rfkill) systemd-rfkill.service: Failed to set up special directory in /var/lib: Read-only file system
systemd-rfkill.service: Main process exited, code=exited, status=230?STATE_DIRECTORY
[Ok] Virtual Console Setup.



I have configured my fstab for this.
Now I get no more error messages, but my login is still not loaded, because the bootprocess is simply interrupted.
my fstab:
Code:

LABEL=E68B-375F                                                              /efi           vfat             defaults                1 2
UUID=0ce64439-9491-4c80-8228-3a962ace12cf               /               ext4            defaults                0 1
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1044

PostPosted: Sun Dec 29, 2024 3:29 pm    Post subject: Reply with quote

At boot try to pass this to the cmdline :

Code:
systemd.restore_state=0


by default should be 1

PS : now you have this
Code:
(d=rfkill) systemd-rfkill.service: Failed to set up special directory in /var/lib: Read-only file system


what is your kernel boot cmdline ?
Code:
cat /proc/cmdline

_________________
LRS 64/32
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 10

PostPosted: Sun Dec 29, 2024 4:55 pm    Post subject: Reply with quote

cmdline:
Code:
linux   /boot/kernel-6.6.58-gentoo-dist root=UUID=0ce64439-9491-4c80-8228-3a962ace12cf ro init=/usr/lib/systemd/systemd console=tty1 loglevel=7 systemd.restore_state=0


Quote:

PS : now you have this

no:
Code:

iwlifi 000:00:14.3: Direct firmware load for iwlwifi-so-a0-hr-b0-75.ucode failed with -2
NO SUITABLE FIRMWARE FOUND!
minimum version required: iwlwifi-so-a0-hr-b0-59
maximum version supported iwlwifi-so-a0-hr-b0-83
check git://git.kernel.org/...
ACPI Warning: \_SB.PC00.XHCI.RHUB.HS10._DSM: Argument #4 type mismatch - Found [integer], ACPI reqirees [Package] (20230628/nsarguments-61)
Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-0040-4150.sfi (-2)
Bluethooth: hci0: Failed to read MSFT support features (-56)
[ok] Load/Save RF Kill Switch Status
[ok] Virtual Console Setup


but network work when im in inti=/bin/bash
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


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

PostPosted: Sun Dec 29, 2024 5:48 pm    Post subject: Reply with quote

testware73 wrote:
cmdline:
Code:
linux   /boot/kernel-6.6.58-gentoo-dist root=UUID=0ce64439-9491-4c80-8228-3a962ace12cf ro init=/usr/lib/systemd/systemd console=tty1 loglevel=7 systemd.restore_state=0


Quote:

PS : now you have this

no:
Code:

iwlifi 000:00:14.3: Direct firmware load for iwlwifi-so-a0-hr-b0-75.ucode failed with -2
NO SUITABLE FIRMWARE FOUND!
minimum version required: iwlwifi-so-a0-hr-b0-59
maximum version supported iwlwifi-so-a0-hr-b0-83
check git://git.kernel.org/...
ACPI Warning: \_SB.PC00.XHCI.RHUB.HS10._DSM: Argument #4 type mismatch - Found [integer], ACPI reqirees [Package] (20230628/nsarguments-61)
Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-0040-4150.sfi (-2)
Bluethooth: hci0: Failed to read MSFT support features (-56)
[ok] Load/Save RF Kill Switch Status
[ok] Virtual Console Setup


but network work when im in inti=/bin/bash


You have misunderstanding/misrepresenting the situation. init=/bin/bash on kernel command line can NOT get network going. You must have done something after you got bash prompt.

So in your situation it is manual vs automate issue.

You can manually get network going. That mean your kernel config is correct, your hardware worked as expect.

Automation fail mean, whatever you used for the "init" system likely have something misconfigured (wrong start order count as misconfiguration).

You have not share anything about which "init" system you use for default (openrc, systemd or something else)

if your keyboard/mouse connect over bluetooth than above messages about bluetooth fail load will explain why they don't work. But this may be part of "init" system problem that need to fix first.
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 10

PostPosted: Sun Dec 29, 2024 6:25 pm    Post subject: Reply with quote

I'm using systemd as "init" system

I finally have my journal with with experimental kernel parameters:
https://0x0.st/8sW3.txt

edit
my journal:
https://0x0.st/8s42.txt
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


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

PostPosted: Sun Dec 29, 2024 8:11 pm    Post subject: Reply with quote

testware73 wrote:
I'm using systemd as "init" system

I finally have my journal with with experimental kernel parameters:
https://0x0.st/8sW3.txt

edit
my journal:
https://0x0.st/8s42.txt


The two link have different kernel command line parameters. Which should be consider correct?

What is the state of boot now? I don't see significant error that is causing problem. (but than again, I might missing something)

one key part is about the missing firmware for i915 so you need to find those firmware files.

You don't need to use 'init=/usr/lib/systemd/systemd" if your system was configured correctly, usually /sbin/init (or /usr/sbin/init) should be point to the "systemd".
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 10

PostPosted: Sun Dec 29, 2024 9:13 pm    Post subject: Reply with quote

Quote:
The two link have different kernel command line parameters. Which should be consider correct?


this one:
Quote:
https://0x0.st/8s42.txt


this is only with experimental command line parameters.
Quote:
https://0x0.st/8sW3.txt


Quote:
What is the state of boot now? I don't see significant error that is causing problem

this:
https://0x0.st/8s42.txt
Me too, what do you miss, tell me.


Quote:
one key part is about the missing firmware for i915 so you need to find those firmware files.

I am not an expert but:
I have to implement this driver in the configuration of my kernel.
But I have the gentoo-bin precompiled kernel.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


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

PostPosted: Sun Dec 29, 2024 9:31 pm    Post subject: Reply with quote

testware73 wrote:
Me too, what do you miss, tell me.
I don't know what I miss :D If I know than I did not miss.

Quote:
Quote:
What is the state of boot now? I don't see significant error that is causing problem

this:
https://0x0.st/8s42.txt
This really tell me nothing. Did you got login prompt? Are you able to use keyboard? And the journal log may not be enough because unlike the other dmesg log, it does not show if keyboard/mouse registered or not.

Quote:
I am not an expert but:
I have to implement this driver in the configuration of my kernel.
But I have the gentoo-bin precompiled kernel.
If "I have to implement this driver in the configuration of my kernel" mean you build the module statically (mean =y) than those firmware also need to build statically in to kernel.
Back to top
View user's profile Send private message
testware73
n00b
n00b


Joined: 28 Dec 2024
Posts: 10

PostPosted: Sun Dec 29, 2024 9:53 pm    Post subject: Reply with quote

Quote:
This really tell me nothing. Did you got login prompt? Are you able to use keyboard? And the journal log may not be enough because unlike the other dmesg log, it does not show if keyboard/mouse registered or not.

The only way to get a console is through init=/bin/bash.
I don't think these logs will do you any good, but I can get them.
Or through chroot from my arch but accordingly the logs are only from arch.



My idea is to force my system to boot through command line parameters and there I can and have more.
However, my previous attempts failed because I could no longer enter anything. And I don't know how I managed that (I am sitting at a leptop)
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


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

PostPosted: Sun Dec 29, 2024 11:31 pm    Post subject: Reply with quote

OK, so can you show step by step commands when you use init=/bin/bash, how you got "everything work"?

Does "everything work" mean,

  • You are on right rootfs (sda5)
  • You can type (as in keyboard working)
  • Can you run lsmod?


Have you try single user mode? Remove init=/bin/bash and put word "single". (quote is not needed)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5271
Location: Bavaria

PostPosted: Mon Dec 30, 2024 1:30 am    Post subject: Reply with quote

pingtoo and testware73,

this:
Code:
Dec 29 19:34:39 kernel: Console: switching to colour dummy device 80x25
[...]
Dec 29 19:34:39 kernel: Loading firmware: i915/adlp_dmc.bin
Dec 29 19:34:39 kernel: i915 0000:00:02.0: Direct firmware load for i915/adlp_dmc.bin failed with error -2

... tells me that the package "linux-firmware" is not present ... please emerge it ;-)
_________________
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: 10

PostPosted: Wed Jan 01, 2025 3:49 pm    Post subject: Reply with quote

Hello, thank you for your help.


I got it working.
After I installed the driver i915 everything worked:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915

I also installed gentoo on my built-in hard disk, because I think I will learn more about linux with gentoo:
E.g:
(1) I learned here what the initramfs is.
(2) How to use the tools iw ip wpa_supplicant wpa_supplicant to connect to the network (even if this was not directly in the handbook, it just said something about dhcp and nothing about how to connect to the internet with my rooter).
source: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Networking

With the Gentoo installation on my new machine I also had problems.
1. again I only got to the login once at the beginning, where I couldn't enter anything then always got stuck in the boot process. From the journal I could not remove anything that was relevant for me.
Then I built my own “Initramfs” which provides me with a shell. Again I could not enter anything.
source how to make an initramfs handbook:
(whoever had the idea to show something like this is a really great person)
https://wiki.gentoo.org/wiki/Custom_Initramfs

Then I created an initramfs with genkernel. since then my gentoo works.


My question is.
1. do you have any ideas why I could not enter anything in my login. (the kernel was self configured)
my journal:
https://0x0.st/8z8m.txt

no it is probably not due to the following, because my arch also boots from this partition:
FAT-fs (nvme0n1p1): Volume was not properly unmounted. Some data may be corrupt.

here my init from initramfs:
Code:

#!/bin/busybox sh

# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys

rescue_shell() {
    echo "Something went wrong. Dropping to a shell."
    exec sh
}

# Do your stuff here.
# Solution 1: Explicitly open a terminal device (/dev/tty)
echo "Checking and ensuring /dev/tty is accessible..."

# Check if /dev/tty exists, if not create it
if [ ! -c /dev/tty ]; then
    echo "/dev/tty not found! Creating /dev/tty..."
    mknod /dev/tty c 5 0
fi

# 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

# Debugging the tty issue
echo "Debugging tty settings..."

# Show the current terminal device (if any)
echo "Current terminal (tty):"
tty

# Check if stty settings are correct
echo "Current terminal settings:"
stty -a

# Ensure terminal settings are sane
stty sane

# 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 /mnt/root

# Debug: List mounted filesystems
echo "Mounted filesystems:"
mount

# Solution 3: Enter rescue shell
echo "Entering rescue shell..."

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


echo "NOT Failed to mount root filesystem."

umount /proc
umount /sys
umount /dev

exec switch_root /newroot /sbin/init


# Mount the root filesystem.
mount -o ro /dev/nvme0n1p5 /mnt/root

# Clean up.
umount /proc
umount /sys

# Boot the real thing.
exec switch_root /mnt/root /sbin/init


erros from initramfs:
Code:

/dev/tty is available
current terminal (tty):
/dev/console
Mounting root filesystem...
Root filesystem mounted successfully.
Root filesystem status
Filesystem
/dev/nvme0n1p5
Mounted filesystems:
none on /proc type proc (0)
none on /sys type sysfs (0)
/dev/nvme0n1p5 on /mnt/root type ext4 (ro)
sh: can't access tty: job control turned off
~ #
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