On 10/1/23 07:29, Michael wrote:
On Sunday, 1 October 2023 05:56:02 BST Valmor F. de Almeida wrote:
On 9/30/23 17:25, Håkon Alstadheim wrote:
Den 30.09.2023 22:57, skrev Valmor F. de Almeida:
Hello,

For a while now (3 weeks or so) I have been upgrading the linux kernel
on a Dell XPS laptop starting from 6.1.41-gentoo (which is my current
working kernel) to 6.1.53-gentoo-r1. No kernel I have built since is
able to boot. I have been following the same method for many years:
make oldconfig, etc...

The booting error starts at:

[snip]

* INIT: Entering runlevel: 3
[snip]
* Starting cronie ...
* Starting DHCP Client Daemon ...
* Starting laptop_mode ...
* Mounting network filesystems ...
/etc/init.d/netmount: line 45 /lib/rc/bin/ewend: Input/output error
/lib/rc/sh/rc-cgroup.sh: line 184: rmdir: command not found
INIT:
INIT: cannot execute "/sbin/agetty"
INIT: cannot execute "/sbin/agetty"
INIT: cannot execute "/sbin/agetty"

Can you show /etc/fstab and the console-log for the entire boot? Seems
/sbin is not readable. You sure you have the kernel modules loaded? Are
you using an initramfs? If so, does that build without errors ?

Here is fstab:

/dev/nvme0n1p2          /boot           ext2            defaults        0 2
/dev/nvme0n1p3          none            swap            sw              0 0
/dev/nvme0n1p4          /               ext4            noatime,discard
         0 1
/dev/cdrom              /mnt/cdrom      auto            noauto,user     0 0

I have not changed anything from 6.1.41-gentoo (which compiles and
boots) except updating the config file for compiling the new kernel.
Then I do: make && modules_install. Which runs without errors. After
that: grub-mkconfig -o /boot/grub/grub.cfg.
I am not using initramfs.

I don't know how to save the boot messages; it seems that if I turn on
the logger in openrc, it will log the openrc messages but not sysinit
runlevels?

Thanks,
--
Valmor

I think the error messages you're getting indicate inability to access your
rootfs.  Have you perhaps changed the fs drivers in the latest kernels, from
built in to modules?

Have you diff'ed your 6.1.41-gentoo .config file against the latest kernels'
.config files to see what might have changed/missing?

You can set up a netconsole to check boot time messages:

https://www.kernel.org/doc/Documentation/networking/netconsole.txt
https://wiki.ubuntu.com/Kernel/Netconsole

In summary, build netconsole in the new kernel, or as a module, change GRUB's
default CMDLINE from "quiet splash" to "debug" and add netconsole in the
kernel command line:

netconsole=@/,[PORT]@[DEST_IP]

Then at the destination PC launch netcat/socat/telnet; e.g.

nc -u -l -p [PORT]

and reboot the PC you want to debug with the latest kernel, while watching the
output on the destination PC's terminal with nc.

Here is the diff for the config files:

->  diff config /boot/config-6.1.41-gentoo
3c3
< # Linux/x86 6.1.53-gentoo-r1 Kernel Configuration
---
> # Linux/x86 6.1.41-gentoo Kernel Configuration
5c5
< CONFIG_CC_VERSION_TEXT="gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826"
---
> CONFIG_CC_VERSION_TEXT="gcc (Gentoo 12.3.1_p20230526 p2) 12.3.1 20230526"
7c7
< CONFIG_GCC_VERSION=130201
---
> CONFIG_GCC_VERSION=120301
455d454
< CONFIG_CPU_SRSO=y
457d455
< # CONFIG_GDS_FORCE_MITIGATION is not set
646d643
< CONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y
3136d3132
< CONFIG_VIDEO_V4L2_SUBDEV_API=y
3139,3140d3134
< CONFIG_V4L2_FWNODE=m
< CONFIG_V4L2_ASYNC=m
3236c3230,3233
< CONFIG_VIDEO_CAMERA_SENSOR=y
---
>
> #
> # Camera sensor devices
> #
3295a3293
> # end of Camera sensor devices

I guess I could explore some of this difference.
I have not changed the way I compile the kernel and I typically try to have everything built in (only a few modules).
Thanks for the netconsole info.
--
Valmor

Reply via email to