Forums

Skip to content

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

[SOLVED] stuck in linuxbooot. no login

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

[SOLVED] stuck in linuxbooot. no login

  • Quote

Post by testware73 » Sat Dec 28, 2024 8:55 pm

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.
Top
sabayonino
Veteran
Veteran
User avatar
Posts: 1072
Joined: Tue Jan 03, 2012 5:46 pm
Contact:
Contact sabayonino
Website

  • Quote

Post by sabayonino » Sun Dec 29, 2024 8:04 am

Hi , I'm not running systemd but you can try to add
init=/usr/lib/systemd/systemd to the kernel comandline
LRS 64/32
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Sun Dec 29, 2024 9:20 am

Hi,

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

led to the same result:

Code: Select all

[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
Top
sabayonino
Veteran
Veteran
User avatar
Posts: 1072
Joined: Tue Jan 03, 2012 5:46 pm
Contact:
Contact sabayonino
Website

  • Quote

Post by sabayonino » Sun Dec 29, 2024 12:11 pm

and the output of rfkill :

for systemd I think should be :

Code: Select all

systemctl status systemd-rfkill.service

Code: Select all

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

zcat /proc/config.gz | grep RFKILL

I hope this is the right way to solve the problem :roll:
LRS 64/32
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Sun Dec 29, 2024 2:42 pm

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

systemctl status systemd-rfkill.service

I don't know the kernel that well YET

Code: Select all

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

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

LABEL=E68B-375F                                                              /efi           vfat             defaults                1 2
UUID=0ce64439-9491-4c80-8228-3a962ace12cf               /               ext4            defaults                0 1
Top
sabayonino
Veteran
Veteran
User avatar
Posts: 1072
Joined: Tue Jan 03, 2012 5:46 pm
Contact:
Contact sabayonino
Website

  • Quote

Post by sabayonino » Sun Dec 29, 2024 3:29 pm

At boot try to pass this to the cmdline :

Code: Select all

systemd.restore_state=0
by default should be 1

PS : now you have this

Code: Select all

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

cat /proc/cmdline
LRS 64/32
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Sun Dec 29, 2024 4:55 pm

cmdline:

Code: Select all

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
PS : now you have this
no:

Code: Select all

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

  • Quote

Post by pingtoo » Sun Dec 29, 2024 5:48 pm

testware73 wrote:cmdline:

Code: Select all

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
PS : now you have this
no:

Code: Select all

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.
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Sun Dec 29, 2024 6:25 pm

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

  • Quote

Post by pingtoo » Sun Dec 29, 2024 8:11 pm

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".
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Sun Dec 29, 2024 9:13 pm

The two link have different kernel command line parameters. Which should be consider correct?
this one:
https://0x0.st/8s42.txt
this is only with experimental command line parameters.
https://0x0.st/8sW3.txt
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.

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

  • Quote

Post by pingtoo » Sun Dec 29, 2024 9:31 pm

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.
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.
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.
Top
testware73
n00b
n00b
Posts: 29
Joined: Sat Dec 28, 2024 3:46 pm

  • Quote

Post by testware73 » Sun Dec 29, 2024 9:53 pm

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

  • Quote

Post by pingtoo » Sun Dec 29, 2024 11:31 pm

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

  • Quote

Post by pietinger » Mon Dec 30, 2024 1:30 am

pingtoo and testware73,

this:

Code: Select all

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 --> 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 Jan 01, 2025 3:49 pm

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/ke ... /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:A ... 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: Select all

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

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

  • Quote

Post by pietinger » Wed Jan 01, 2025 5:23 pm

testware73,

you need an initramfs only when you:

a) boot from an encrypted root partition, OR
b) configure important (*) kernel modules as <M>odule into your kernel, instead configuring it statically <*> into your kernel. *) = everything kernel needs to access its root partition

IF you configure your kernel manually AND have no encrypted root partition THEN you CAN configure your kernel without needing an initramfs. **)

Maybe you are interested in these articles:

https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
https://wiki.gentoo.org/wiki/User:Pieti ... s_Overview


**) I suggest to do these steps to get a working - manually configured - kernel:

1. Boot with our GentooLiveCD
2. Chroot into your installation (see chapter: "Pause during Installation" in https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo)
3a. # emerge gentoo-sources (if not already done)
3b. I recommend the version 6.12.x because it is already LTS and will be soon our next stable Gentoo kernel. See more here:
https://wiki.gentoo.org/wiki/User:Pieti ... el_version
4. # eselect kernel list
5. check if correct; if not:
6. # eselect kernel set X
7. # cd /usr/src/linux
8. # make localyesconfig
9. # make menuconfig
and now check (***) it with:
https://wiki.gentoo.org/wiki/User:Pieti ... figuration
and
https://wiki.gentoo.org/wiki/User:Pieti ... ent_Kernel
10. Quit with safe and do # make all (+ "# make modules_install" ONLY if you have configured some addditional modules)
11. # cp arch/x86/boot/bzImage /boot/vmlinuz-6.12.X-gentoo
12. # grub-mkconfig -o /boot/grub/grub.cfg
13. # reboot


***) I suggest to read it all - the most important parts are:
https://wiki.gentoo.org/wiki/User:Pieti ... _you_start
https://wiki.gentoo.org/wiki/User:Pieti ... s_Firmware
viewtopic-t-1065464.html


P.S.: I dont recommend using "genkernel" ... Use our Gentoo distribution kernel (= gentoo-kernel-bin) ... or do all yourself (=manual configuration) ... 8)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
Post Reply

17 posts • Page 1 of 1

Return to “Installing 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