SARPi kernel 5.14.x update and root filesystem detection
Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When installing the kernel_sarpi* pkg, the root filesystem type is now detected and the /boot/cmdline.txt file 'rootfstype=' value is updated accordingly and automatically. This was an issue for users who did not select 'ext4' as their root fs type during Slackware ARM installation and thereafter needed to set this value manually in order to boot successfully. This has been fully tested with Slackware supported Linux filesystem types. Unsupported filesystem types have not been tested. Please keep that in mind.
A shoutout with many thanks to; doug713705 in the ##slackware channel on libera.chat for highlighting this problem and providing an idea towards a viable solution for detecting the root fs type, and also to Tadgy for his suggestions and advice on more efficient methods to do the job.
applied 5.14.9 to rpi4, saw above, not sure if this has happened before as I do headless, thanks.
Install the sarpi-hacks*.txz pkg. This pkg contains the fix for the 'INIT: Id "s0" respawning too fast' error. I've not come across this issue after upgrading with the latest sarpi shizzle. Let me know if installing this pkg fixes it.
[EDIT] Just an afterthought, if sarpi pkgs are installed before Slackware ARM pkgs the '/etc/inittab' file might be overwritten with any settings that MoZes includes in the official pkgs. So, it best to upgrade with official Slackware ARM pkgs on the RPis before sarpi pkgs. This could be one reason why you are seeing this 'INIT: Id "s0" respawning too fast' error. Another reason could be if you didn't install the sarpi-hacks* pkg after upgrading Slackware ARM pkgs. It's a known issue on the RPis because they use /dev/ttyAMA0 and not /dev/ttyS0 serial port device.
Last edited by Exaga; 10-03-2021 at 02:44 PM.
Reason: parenthesis
I'm going to change it, am I missing something you said to do?
First of all, thanks for bringing this problem of yours to me. The 'INIT: Id "s0" respawning too fast' error is a showstopper when logging in remotely because while it's apparent you cannot use the system. I make mistakes as much as the next guy and my work needs to be audited often. People like you keep me on my toes and that's a good thing!
All you need to do is install the sarpi-hacks pkg and it should modify the serial port entry line correctly. If you can copy and paste what that line is now in your /etc/inittab file then we can compare and maybe track down the cause of the problem. - SCRATCH THAT! see EDIT at the bottom...
I have checked and double-checked my RPis running kernel 5.14.9 and they all have the same setting in /etc/inittab file "serial lines" section:
Code:
# Local serial lines:
s0:12345:respawn:/sbin/agetty --keep-baud 115200,38400,9600 ttyAMA0 vt100
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100
For the Raspberry Pi this is correct. The "s0" line is the one that should be set by installing the sarpi-hacks pkg. The question on my mind is why it's not working as designed or intended for you. That's what's bothering me most.
However, if you can manually edit this line so it's the same as above then your problem will be solved. In my /etc/inittab it's line: 60
----------------------
[EDIT] I can see what the problem is... your /etc/inittab entry:
Your serial port has been identified as /dev/ttyS1 - and it should be /dev/ttyS0 to be detected properly - I'm guessing your Raspberry Pi has something connected to it that has caused this to happen, like a HAT or another device that offers some serial functionality. If I'm incorrect then I'm at a loss to figure out the cause.
Last edited by Exaga; 10-03-2021 at 06:09 PM.
Reason: eureka!
If you're sure you dotted all your T's and crossed all your I's, maybe I've done something I don't know I did and you're not telling me what.
Maybe have me check on this or that?
The only thing you might like to test/check is...
(This is my RPi4 build-test machine - headless)
Code:
root@torq:~# cat /proc/device-tree/model && echo
Raspberry Pi 4 Model B Rev 1.2
root@torq:~# ls -l /dev/ttyS0 /dev/ttyS1 /dev/ttyAMA0
/bin/ls: cannot access '/dev/ttyS0': No such file or directory
/bin/ls: cannot access '/dev/ttyS1': No such file or directory
crw--w---- 1 root tty 204, 64 Oct 4 07:50 /dev/ttyAMA0
root@torq:~# lsof /dev/ttyAMA0
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
agetty 841 root 0u CHR 204,64 0t0 130 /dev/ttyAMA0
agetty 841 root 1u CHR 204,64 0t0 130 /dev/ttyAMA0
agetty 841 root 2u CHR 204,64 0t0 130 /dev/ttyAMA0
root@torq:~# cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:67:C4:2B vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 dwc_otg.lpm_enable=0 console=tty1 nofont root=PARTUUID=662a1393-03 rootfstype=ext4 rootwait ro
root@torq:~#
(This is my RPi4 NTP/Apache server - headless)
Code:
root@kron:~# cat /proc/device-tree/model && echo
Raspberry Pi 4 Model B Rev 1.4
root@kron:~# ls -l /dev/ttyS0 /dev/ttyS1 /dev/ttyAMA0
/bin/ls: cannot access '/dev/ttyS0': No such file or directory
/bin/ls: cannot access '/dev/ttyS1': No such file or directory
crw--w---- 1 root tty 204, 64 Sep 24 19:42 /dev/ttyAMA0
root@kron:~# lsof /dev/ttyAMA0
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
agetty 896 root 0u CHR 204,64 0t0 130 /dev/ttyAMA0
agetty 896 root 1u CHR 204,64 0t0 130 /dev/ttyAMA0
agetty 896 root 2u CHR 204,64 0t0 130 /dev/ttyAMA0
root@kron:~# cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=E4:5F:01:11:9B:EA vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 dwc_otg.lpm_enable=0 console=tty1 nofont root=PARTUUID=35804286-03 rootfstype=ext4 rootwait ro
root@kron:~#
If the 'ls' and 'lsof' command output shows /dev/ttyS0 or /dev/ttyS1 then check that your /proc/cmdline does not contain 'console=ttyS0,115200' or 'console=ttyS1,115200', or something of that nature. If it does, I would say that getty has created a console on ttyS0 or ttyS1 - in that case change your /boot/cmdline.txt file console entry to 'console=tty1' and reboot.
Also, are you using Bluetooth at all? If your /proc/cmdline contains something like 'console=ttyS<number>,115200' or 'console=serial<number>,115200' then Bluetooth might be the cause of your problem. You can test this by editing your /boot/cmdline.txt file entry to 'console=tty1' and uncommenting (or adding) the line below in your /boot/config.txt file and rebooting.
Code:
dtoverlay=disable-bt
Turning off Bluetooth can solve a lot of issues with the serial port.
Last edited by Exaga; 10-04-2021 at 03:32 AM.
Reason: dmesg | grep tty
If you're sure you dotted all your T's and crossed all your I's, maybe I've done something I don't know I did and you're not telling me what.
All I know is that, in Slackware ARM 15.0 rc1 on my RPis, the console serial port is as it should be. If this problem is persisting for you then kindly paste the contents of your /boot/cmdline.txt and /boot/config.txt files and let's see what settings are in those files which may be affecting your system serial ports. Right now it's a mystery.
I see /boot/cmdline.txt has console=tty1 but so does my rpi3 and its inittab has ttyAMA0.
Did you manage to find out what caused the problem on your RPi4 and a solution for it yet, glorsplitz? I'm very interested to know how you're getting on with this issue.
We encountered this on the most recent SlackChat episode - it should be ttyS1 for the RPI4, and a/sysvinit-scripts now sets it correctly within /etc/inittab.
If you do query this inteface, you should see the same:
We encountered this on the most recent SlackChat episode - it should be ttyS1 for the RPI4, and a/sysvinit-scripts now sets it correctly within /etc/inittab.
If you do query this inteface, you should see the same:
Hi Exaga,I'm getting the same notification about "s0" on my pi 4 after doing "slackpkg upgrade-all", but I'm still using kernel 5.10.59 and etc because of the HDMI audio issue. And I see the same result as you when I run the strings query.
Hi Exaga,I'm getting the same notification about "s0" on my pi 4 after doing "slackpkg upgrade-all", but I'm still using kernel 5.10.59 and etc because of the HDMI audio issue. And I see the same result as you when I run the strings query.
Hi netcrawl. Thanks for letting me know. This is certainly puzzling.
I too used 'slackpkg upgrade-all' to install Slackware ARM 15.0 release candidate 1 on my Raspberry Pis - but I did not select to install the official Slackware ARM kernel, kernel_modules, kernel-headers, or kernel-source pkgs. Did you install any or all of these pkgs when you upgraded? The kernel-headers and source won't make any difference to the serial port but I'm thinking the kernel might. I wonder if that's what's made the difference here, and that's a guess at this moment in time. I am very aware of the 'INIT: Id "s0" respawning too fast: disabled for 5 minutes' error on the Raspberry Pi devices and it's been resolved by installing the sarpi-hacks pkg for goodness knows how many years. So something, somewhere, has changed recently to cause it to resurface.
Can I ask you, did this 'INIT: Id "s0" respawning too fast' appear right after you performed the 'slackpkg upgrade-all' or was it apparent before then?
I'll need to do some more investigating to see what's going on here. So far I've looked into and compared what the Raspberrry Pi OS settings are and found this...
So, 'console=serial0' is usually an alias of 'console=ttyS0'. However, I checked this out on Raspberry Pi OS and found...
Code:
root@raspberrypi:~# ls -l /dev/ttyS* /dev/serial* /dev/ttyAMA*
ls: cannot access '/dev/ttyS*': No such file or directory
lrwxrwxrwx 1 root root 7 Oct 7 08:44 /dev/serial1 -> ttyAMA0
crw-rw---- 1 root dialout 204, 64 Oct 7 08:44 /dev/ttyAMA0
Here I have '/dev/serial1' as a symlink to '/dev/ttyAMA0' and no '/dev/serial0' or '/dev/ttyS0' to be found.
Code:
root@raspberrypi:~# lsof /dev/serial1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
hciattach 525 root 3u CHR 204,64 0t0 134 /dev/ttyAMA0
But then I saw this post from PhilE, Raspberry Pi Engineer who confirms that the default kernel command line includes console=serial0, which the firmware translates to ttyAMA0 or ttyS0 as necessary. That entire forum thread is well worth a read. PhilE suggests in a later post to add these to the /boot/config.txt file and says that the miniuart overlay uses ttyS0 for Bluetooth, freeing /dev/ttyAMA0, and he deliberately reversed the order of the UART overlays to demonstrate that ordering here makes no difference to the ttyAMA numbering.
So you might want to test with these settings yourself. In the meantime, I'm looking into it but will say again that I have not seen the 'INIT: Id "s0" respawning too fast' error myself on any of my RPi devices for a long, long time (years), which includes running kernel 5.10.x, 5.13.x, and 5.14.x.
[EDIT] I also want to reiterate that whenever I use slackpkg to install any updated official pkgs I'll always install any new sarpi updated pkgs right after slackpkg has completed, but before rebooting the Raspberry Pi. Usually I'll 'upgradepkg --reinstall <pkg name>' the sarpi pkgs if/when any new official Slackware pkgs have been installed and there are no new sarpi pkgs. I'm especially mindful of the differences in the mainline and Raspberry Pi kernel sources. As MoZes develops and perfects his Slackware ARM/AArch64 kernel I expect there will be more clarity and less disparity for myself, as the RPi devices become officially supported by him.
Last edited by Exaga; 10-07-2021 at 04:04 AM.
Reason: yes and yes
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.