LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 03-19-2020, 05:08 PM   #1
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Rep: Reputation: Disabled
SARPI on Pi3 - Ran slackpkg update & slackpkg upgrade-all and now won't boot, can't find init


Subject says it all. Usually run headless, but on connection a monitor the kernel panics failing to find init. Mounted partition on a x86_64 box and the file system mounts fine and init is in /sbin as usual.

What happened to cause the kernel panic has scrolled off the top of the screen but the last line of the message is 'end kernel panic - not syncing: No working init found. ...'

I assume there is some issue with the boot process such that the root partition is not mounting.

Two question:
1. any easy fixes rather than starting over?
2. Was it my approach to updating that broke it?

I note that a post at https://www.linuxquestions.org/quest...2/#post6036376

Suggests I update by downloading packages from the SARPI site, does that just do core stuff and should I blacklist anything for slackpkg?
 
Old 03-19-2020, 07:58 PM   #2
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 820

Rep: Reputation: 180Reputation: 180
Did you follow instructions here Slackware ARM on a Raspberry Pi? "Install Slackware"

through step " 10. Configuring the boot partition"?

Once you get the system up and running, you can do the steps mentioned in the link you posted.
 
Old 03-20-2020, 03:09 AM   #3
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware [ARM]
Posts: 347

Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by petejc View Post
Subject says it all. Usually run headless, but on connection a monitor the kernel panics failing to find init. Mounted partition on a x86_64 box and the file system mounts fine and init is in /sbin as usual.

What happened to cause the kernel panic has scrolled off the top of the screen but the last line of the message is 'end kernel panic - not syncing: No working init found. ...'

I assume there is some issue with the boot process such that the root partition is not mounting.

Two question:
1. any easy fixes rather than starting over?
2. Was it my approach to updating that broke it?

I note that a post at https://www.linuxquestions.org/quest...2/#post6036376

Suggests I update by downloading packages from the SARPI site, does that just do core stuff and should I blacklist anything for slackpkg?
Are you running Slackware ARM 14.2 or -current? Which version of 'slackpkg' are you using? Did you by any chance install/upgrade all available packages with 'slackpkg upgrade-all' or 'slackpkg install-new'? Including kernel, kernel-modules, kernel-headers, and kernel-source, etc.

I only install the kernel-headers pkg using 'slackpkg' and omit the rest. As pristine as they are, in the way that MoZes creates them, the official Slackware ARM kernels are not built to support the Raspberry Pi - this is why SARPi builds their own using the Raspberry Pi GitHub repository source.

Answers:
1. Yes, as you have already read about it, installing the SARPi kernel/modules/firmware system pkgs should fix this problem. The SARPi hacks pkg is optional, as always.
2. Without knowing which steps were taken, what was installed exactly (and overwritten), it's hard to say.
3. The SARPi system pkgs install the kernel, kernel modules, and boot-firmware required to boot the device and run Slackware ARM OS. The SARPi hacks pkg modifies '/etc/ssh/sshd_config' so that root can login remotely (e.g. for headless installation); adds RPi3/4 wireless firmware not present in official Slackware ARM source tree, and modifies '/etc/inittab' to prevent the 'INIT: Id "s0" respawning too fast' error (i.e. setting '/dev/ttyS0' serial port list entry to '/dev/ttyAMA0').
4. If installing the SARPi system pkgs solves your problem then you might want to think about adding the kernel, kernel-modules and kernel-firmware pkgs to your 'slackpkg' blacklist on the RPi3.
 
1 members found this post helpful.
Old 03-21-2020, 06:28 AM   #4
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by glorsplitz View Post
Did you follow instructions here Slackware ARM on a Raspberry Pi? "Install Slackware"

through step " 10. Configuring the boot partition"?

Once you get the system up and running, you can do the steps mentioned in the link you posted.
I am sure I ran through this on my original install. It was working for several months. I'll have to mount the SD card on an x86_64 machine and do this part and see if it fixes things.
 
Old 03-21-2020, 06:37 AM   #5
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Exaga View Post
Are you running Slackware ARM 14.2 or -current? Which version of 'slackpkg' are you using? Did you by any chance install/upgrade all available packages with 'slackpkg upgrade-all' or 'slackpkg install-new'? Including kernel, kernel-modules, kernel-headers, and kernel-source, etc.
Current, slack version is showing 14.2+.

Quote:

I only install the kernel-headers pkg using 'slackpkg' and omit the rest. As pristine as they are, in the way that MoZes creates them, the official Slackware ARM kernels are not built to support the Raspberry Pi - this is why SARPi builds their own using the Raspberry Pi GitHub repository source.
Draft, forgot to blacklist those. Now done.

Quote:


Answers:
1. Yes, as you have already read about it, installing the SARPi kernel/modules/firmware system pkgs should fix this problem. The SARPi hacks pkg is optional, as always.
I'm definitely a noob on the Pi with slackware. Been running it on x86 since 3.4 and it felt familiar on the Pi, but I was really back into the basic learning curve for this fundamental stuff on the Pi. Thank you.


Quote:
2. Without knowing which steps were taken, what was installed exactly (and overwritten), it's hard to say.
3. The SARPi system pkgs install the kernel, kernel modules, and boot-firmware required to boot the device and run Slackware ARM OS. The SARPi hacks pkg modifies '/etc/ssh/sshd_config' so that root can login remotely (e.g. for headless installation); adds RPi3/4 wireless firmware not present in official Slackware ARM source tree, and modifies '/etc/inittab' to prevent the 'INIT: Id "s0" respawning too fast' error (i.e. setting '/dev/ttyS0' serial port list entry to '/dev/ttyAMA0').
4. If installing the SARPi system pkgs solves your problem then you might want to think about adding the kernel, kernel-modules and kernel-firmware pkgs to your 'slackpkg' blacklist on the RPi3.
I'll try installing again from x86_64 machine and see if it fixes it. Otherwise I could just backup the useful stuff and reinstall - but I'd rather try the fix route first, it seems better. Thanks.
 
Old 03-23-2020, 04:14 PM   #6
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: Disabled
Installing the packages did not fix it

Still failing to boot, still missing init.

Is it best to backup, do a fresh install and then recover the important bits?

None of this is critical for anything.
 
Old 03-24-2020, 12:28 AM   #7
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware [ARM]
Posts: 347

Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by petejc View Post
Still failing to boot, still missing init.

Is it best to backup, do a fresh install and then recover the important bits?

None of this is critical for anything.
On another Slackware ARM installation, I would try something like this:

Code:
# dir to store pkgs
mkdir -p /tmp/slackware_arm_pkgs
cd /tmp/slackware_arm_pkgs

# copy/download sarpi3 pkgs into this dir
cp /path/to/sarpi3_pkgs/*.txz .
# or 'wget/curl' them from https://sarpi.fatdog.eu/index.php?p=rpi3getcurrent

# dirs to mount sd card partitions [i.e. that's missing init when booting]
mkdir -p /sdcard/boot

# mount sd card / and /boot partitions [example: sd card = '/dev/sda']
mount /dev/sda3 /sdcard
mount /dev/sda1 /sdcard/boot

# install the sarpi3 pkgs onto the mounted sd card
ROOT=/sdcard installpkg *.txz
If that doesn't solve the problem then perhaps a backup and reinstall, as you've suggested, is the way to go. Other elements of the Slackware ARM OS may be borked too, depending on what has been previously installed/over-written/corrupted during the process.

[EDIT] Forgot to mention, I would also check that the root device entry in the 'cmdline.txt' file in the /boot partition points to the correct device/partition before installing any pkgs. Just in case the wrong settings are taking effect, thus causing '/sbin/init' not to be found.

Last edited by Exaga; 03-24-2020 at 12:40 AM. Reason: afterthought
 
1 members found this post helpful.
Old 03-24-2020, 05:33 PM   #8
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Exaga View Post
On another Slackware ARM installation, I would try something like this:
It is my single Slackware ARM system. I appreciate that most of the guys here likely end up with five per room after a while...

Any reason why it needs to be an ARM system? Surely installpkg, and its underlying dependencies are system agnostic? OR is this something to do with big and little endian?


Quote:

Code:
# dir to store pkgs
mkdir -p /tmp/slackware_arm_pkgs
cd /tmp/slackware_arm_pkgs

# copy/download sarpi3 pkgs into this dir
cp /path/to/sarpi3_pkgs/*.txz .
# or 'wget/curl' them from https://sarpi.fatdog.eu/index.php?p=rpi3getcurrent

# dirs to mount sd card partitions [i.e. that's missing init when booting]
mkdir -p /sdcard/boot

# mount sd card / and /boot partitions [example: sd card = '/dev/sda']
mount /dev/sda3 /sdcard
mount /dev/sda1 /sdcard/boot

# install the sarpi3 pkgs onto the mounted sd card
ROOT=/sdcard installpkg *.txz
Ah ha. When I tried this on x86_64 I did not mount boot. Tried it again with boot mounted... Still did not work.

Quote:
If that doesn't solve the problem then perhaps a backup and reinstall, as you've suggested, is the way to go. Other elements of the Slackware ARM OS may be borked too, depending on what has been previously installed/over-written/corrupted during the process.

[EDIT] Forgot to mention, I would also check that the root device entry in the 'cmdline.txt' file in the /boot partition points to the correct device/partition before installing any pkgs. Just in case the wrong settings are taking effect, thus causing '/sbin/init' not to be found.
cmdline.txt:
dwc_otg.lpm_enable=0 console=tty1 nofont root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro

Not familiar with RPi drive numbering. Looks like the third partition of whatever mmcblk0 is.

Sounds like I'll be going down the reinstall route.
 
Old 03-25-2020, 01:42 AM   #9
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware [ARM]
Posts: 347

Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by petejc View Post
Any reason why it needs to be an ARM system? Surely installpkg, and its underlying dependencies are system agnostic? OR is this something to do with big and little endian?
I have one Slackware64 system available. I have several [dozen] Slackware ARM systems/images/installs available. I don't mess with the Slackware64 system much, once it's running it stays that way.

I can't say if installing Slackware ARM packages onto a Slackware ARM OS but doing it under Slackware x86 is OK - as I've never tried it. However, I can imagine if any of those packages are installed wrongly there could be serious consequences for the host OS as it runs on a different architecture.

Quote:
Originally Posted by petejc View Post
cmdline.txt:
dwc_otg.lpm_enable=0 console=tty1 nofont root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro

Not familiar with RPi drive numbering. Looks like the third partition of whatever mmcblk0 is.

Sounds like I'll be going down the reinstall route.
'/dev/mmcblk0' is your sd card device name. Just like '/dev/sda' or '/dev/sdb' [etc.] is for your HDD/SSD/USB storage devices. '/dev/mmcblk0p1', '/dev/mmcblk0p2', '/dev/mmcblk0p3' [etc.] are partitions on that sd card device.

Yes, it would seem that something, somewhere, is royally screwed on your Slackware ARM installation. If your / partition is '/dev/mmcblk0p3' then you would need to do some more investigating into why '/sbin/init' couldn't be found. If it's easier just reinstall, as you say.
 
Old 03-25-2020, 03:26 AM   #10
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 918

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by petejc View Post
I
Any reason why it needs to be an ARM system? Surely installpkg, and its underlying dependencies are system agnostic? OR is this something to do with big and little endian?
54 packages have post installation scripts that chroot into the OS to complete the setup. These will fail when run on a different architecture, so the package installation may be incomplete or broken in some way.

For example:
Code:
root@zippy:/var/lib/pkgtools/scripts# grep -ri 'chroot .' . | less
./dconf-editor-3.36.0-arm-1:chroot . /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/ 1> /dev/null 2> /dev/null
./dconf-editor-3.36.0-arm-1:chroot . /usr/bin/gio-querymodules /usr/lib/gio/modules/ 1> /dev/null 2> /dev/null
./wqy-zenhei-font-ttf-0.8.38_1-noarch-2:# There's no need to chroot and do this during initial
./bind-9.16.1-arm-1:  chroot . /sbin/ldconfig
./bind-9.16.1-arm-1:  chroot . /usr/sbin/rndc-confgen -r /dev/urandom -a 2> /dev/null
There are many more but none of would cause the OS not to boot though, so you could fix a system by installing the packages on an x86 then fix it by hand, or just reinstall the packages again once the ARM OS has booted.
 
1 members found this post helpful.
Old 03-25-2020, 03:34 AM   #11
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 918

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by petejc View Post
Still failing to boot, still missing init.

Is it best to backup, do a fresh install and then recover the important bits?

None of this is critical for anything.
If you can't page up (shift+page-up) to view the kernel messages, attach a serial cable to it, open a serial connection from the x86 to it and log the terminal output.
Code:
root@zippy:/# dmesg | egrep '(Linux ver)|command line'
[    0.000000] Linux version 5.4.24-armv7 (root@zippy.arm.slackware.com) (gcc version 9.2.0 (GCC)) #2 SMP Fri Mar 6 14:39:43 GMT 2020
[    0.000000] Kernel command line: console=ttyS0,115200n8 debug earlyprintk root=/dev/sda2 waitforroot=5 rootfstype=ext4
root@zippy:/#
Perhaps your root= parameter has changed, so init cannot be found? Or it could be that the initrd doesn't have the required modules, a mismatch between kernel and initrd.

Last edited by drmozes; 03-25-2020 at 03:40 AM.
 
Old 03-25-2020, 04:30 AM   #12
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware [ARM]
Posts: 347

Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by drmozes View Post
54 packages have post installation scripts that chroot into the OS to complete the setup. These will fail when run on a different architecture, so the package installation may be incomplete or broken in some way.
That'll be why then.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackpkg upgrade-all returns 'no packages to upgrade' after slackpkg-update has downloaded files san2ban Slackware 8 11-01-2019 05:44 AM
SARPi website new URL - sarpi.co.uk Exaga Slackware - ARM 4 01-28-2018 06:36 PM
Raspberry Pi3 anyone loose eth0 with the last update? enine Slackware - ARM 10 08-03-2016 01:28 AM
[SOLVED] Just ran 'slackpkg upgrade-all'..... Now X windows doesn't work. v.segfault wolf2600 Slackware 14 01-23-2011 06:47 AM
Gotta love those ٱٱٱٱٱٱٱ&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 07:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration