gitbls / sdm

Raspberry Pi SD Card Image Manager
MIT License
471 stars 48 forks source link

Pi5 running SDM: "Too many levels of symbolic links" #268

Open mattie47 opened 6 days ago

mattie47 commented 6 days ago

Hi @gitbls,

I decided to follow your suggestion of using a pi5 to build an image, but I can't seem to get SDM working on a fresh install of a Pi5.

Instead, I get the following whenever it attempts to mount the image:

pi@rpi5:~ $ sudo sdm --customize 2024-10-22-raspios-bookworm-armhf.img
* Mount IMG '2024-10-22-raspios-bookworm-armhf.img'
mount: /dev/loop0 mounted on /mnt/sdm.
mount: /dev/loop1 mounted on /mnt/sdm/boot/firmware.
/usr/local/sdm/sdm-cparse: line 560: /usr/bin/date: Too many levels of symbolic links
/usr/local/bin/sdm: line 817: /usr/bin/mkdir: Too many levels of symbolic links
/usr/local/bin/sdm: line 818: /usr/bin/touch: Too many levels of symbolic links
/usr/local/bin/sdm: line 819: /usr/bin/chmod: Too many levels of symbolic links
/usr/local/bin/sdm: line 820: /mnt/sdm/etc/sdm/auto-1piboot.conf: No such file or directory
/usr/local/bin/sdm: line 821: /usr/bin/mkdir: Too many levels of symbolic links
/usr/local/bin/sdm: line 824: /usr/bin/cp: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 205: /usr/bin/chown: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 206: /usr/bin/chmod: Too many levels of symbolic links
/usr/local/bin/sdm: line 824: /usr/bin/cp: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 205: /usr/bin/chown: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 206: /usr/bin/chmod: Too many levels of symbolic links
/usr/local/bin/sdm: line 824: /usr/bin/cp: Too many levels of symbolic links

And trying explore (yes, different vanilla image, I tried downloading the two latest ones):

pi@rpi5:~ $ sudo  sdm --explore 2024-11-13-raspios-bookworm-armhf.img
* Mount IMG '2024-11-13-raspios-bookworm-armhf.img'
mount: /dev/loop0 mounted on /mnt/sdm.
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.
mount: /dev/loop1 mounted on /mnt/sdm/boot/firmware.
% sdm will use qemu 'arm'
% Add and enable qemu binfmt for 'arm' processor architecture
* Enter IMG '2024-11-13-raspios-bookworm-armhf.img'
/usr/local/sdm/sdm-cparse: line 2067: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 2067: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 2067: /usr/bin/stty: Too many levels of symbolic links

This leaves the Pi in a bad state, and I physically have to hotswap power to the Pi to get out of this state.

Reproduction steps

Log of results from above reproduction (Note, Apt failed to install a couple things from the SDM install, however I ran this manually as per logs, prior to running SDM)

ssh pi@rpi5.local
Linux rpi5 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Nov 13 14:20:19 2024

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@rpi5:~ $ curl -L https://raw.githubusercontent.com/gitbls/sdm/master/EZsdmInstaller | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7627  100  7627    0     0  17702      0 --:--:-- --:--:-- --:--:-- 17737
* Make directory '/usr/local/sdm' and download sdm files to it
Downloading 'sdm' to '/usr/local/sdm/sdm'
Downloading 'sdm-phase0' to '/usr/local/sdm/sdm-phase0'
Downloading 'sdm-phase1' to '/usr/local/sdm/sdm-phase1'
Downloading 'sdm-cparse' to '/usr/local/sdm/sdm-cparse'
Downloading 'sdm-cmdsubs' to '/usr/local/sdm/sdm-cmdsubs'
Downloading 'sdm-readparams' to '/usr/local/sdm/sdm-readparams'
Downloading 'sdm-rpcsubs' to '/usr/local/sdm/sdm-rpcsubs'
Downloading 'sdm-firstboot' to '/usr/local/sdm/sdm-firstboot'
Downloading 'sdm-collect-labwc-config' to '/usr/local/sdm/sdm-collect-labwc-config'
Downloading 'sdm-cryptconfig' to '/usr/local/sdm/sdm-cryptconfig'
Downloading 'sdmcryptfs' to '/usr/local/sdm/sdmcryptfs'
Downloading 'sdm-apt-cacher' to '/usr/local/sdm/sdm-apt-cacher'
Downloading 'sdm-apt' to '/usr/local/sdm/sdm-apt'
Downloading 'sdm-customphase' to '/usr/local/sdm/sdm-customphase'
Downloading 'sdm-apps-example' to '/usr/local/sdm/sdm-apps-example'
Downloading 'sdm-xapps-example' to '/usr/local/sdm/sdm-xapps-example'
Downloading 'sdm-cportal' to '/usr/local/sdm/sdm-cportal'
Downloading 'sdm-logmsg' to '/usr/local/sdm/sdm-logmsg'
Downloading 'sdm-gburn' to '/usr/local/sdm/sdm-gburn'
Downloading 'sdm-make-luks-usb-key' to '/usr/local/sdm/sdm-make-luks-usb-key'
Downloading 'sdm-add-luks-key' to '/usr/local/sdm/sdm-add-luks-key'
Downloading 'sdm-ssh-initramfs' to '/usr/local/sdm/sdm-ssh-initramfs'
Downloading 'plugins/apps' to '/usr/local/sdm/plugins/apps'
Downloading 'plugins/apt-addrepo' to '/usr/local/sdm/plugins/apt-addrepo'
Downloading 'plugins/apt-cacher-ng' to '/usr/local/sdm/plugins/apt-cacher-ng'
Downloading 'plugins/apt-file' to '/usr/local/sdm/plugins/apt-file'
Downloading 'plugins/bootconfig' to '/usr/local/sdm/plugins/bootconfig'
Downloading 'plugins/btwifiset' to '/usr/local/sdm/plugins/btwifiset'
Downloading 'plugins/chrony' to '/usr/local/sdm/plugins/chrony'
Downloading 'plugins/clockfake' to '/usr/local/sdm/plugins/clockfake'
Downloading 'plugins/copydir' to '/usr/local/sdm/plugins/copydir'
Downloading 'plugins/copyfile' to '/usr/local/sdm/plugins/copyfile'
Downloading 'plugins/cryptroot' to '/usr/local/sdm/plugins/cryptroot'
Downloading 'plugins/disables' to '/usr/local/sdm/plugins/disables'
Downloading 'plugins/dovecot-imap' to '/usr/local/sdm/plugins/dovecot-imap'
Downloading 'plugins/explore' to '/usr/local/sdm/plugins/explore'
Downloading 'plugins/extractfs' to '/usr/local/sdm/plugins/extractfs'
Downloading 'plugins/gadgetmode' to '/usr/local/sdm/plugins/gadgetmode'
Downloading 'plugins/git-clone' to '/usr/local/sdm/plugins/git-clone'
Downloading 'plugins/graphics' to '/usr/local/sdm/plugins/graphics'
Downloading 'plugins/hotspot' to '/usr/local/sdm/plugins/hotspot'
Downloading 'plugins/imon' to '/usr/local/sdm/plugins/imon'
Downloading 'plugins/knockd' to '/usr/local/sdm/plugins/knockd'
Downloading 'plugins/L10n' to '/usr/local/sdm/plugins/L10n'
Downloading 'plugins/labwc' to '/usr/local/sdm/plugins/labwc'
Downloading 'plugins/logwatch' to '/usr/local/sdm/plugins/logwatch'
Downloading 'plugins/lxde' to '/usr/local/sdm/plugins/lxde'
Downloading 'plugins/mkdir' to '/usr/local/sdm/plugins/mkdir'
Downloading 'plugins/modattr' to '/usr/local/sdm/plugins/modattr'
Downloading 'plugins/ndm' to '/usr/local/sdm/plugins/ndm'
Downloading 'plugins/network' to '/usr/local/sdm/plugins/network'
Downloading 'plugins/parted' to '/usr/local/sdm/plugins/parted'
Downloading 'plugins/piapps' to '/usr/local/sdm/plugins/piapps'
Downloading 'plugins/pistrong' to '/usr/local/sdm/plugins/pistrong'
Downloading 'plugins/postburn' to '/usr/local/sdm/plugins/postburn'
Downloading 'plugins/postfix' to '/usr/local/sdm/plugins/postfix'
Downloading 'plugins/quietness' to '/usr/local/sdm/plugins/quietness'
Downloading 'plugins/raspiconfig' to '/usr/local/sdm/plugins/raspiconfig'
Downloading 'plugins/runatboot' to '/usr/local/sdm/plugins/runatboot'
Downloading 'plugins/runscript' to '/usr/local/sdm/plugins/runscript'
Downloading 'plugins/rxapp' to '/usr/local/sdm/plugins/rxapp'
Downloading 'plugins/samba' to '/usr/local/sdm/plugins/samba'
Downloading 'plugins/serial' to '/usr/local/sdm/plugins/serial'
Downloading 'plugins/sshd' to '/usr/local/sdm/plugins/sshd'
Downloading 'plugins/sshkey' to '/usr/local/sdm/plugins/sshkey'
Downloading 'plugins/sdm-plugin-template' to '/usr/local/sdm/plugins/sdm-plugin-template'
Downloading 'plugins/syncthing' to '/usr/local/sdm/plugins/syncthing'
Downloading 'plugins/system' to '/usr/local/sdm/plugins/system'
Downloading 'plugins/trim-enable' to '/usr/local/sdm/plugins/trim-enable'
Downloading 'plugins/ufw' to '/usr/local/sdm/plugins/ufw'
Downloading 'plugins/user' to '/usr/local/sdm/plugins/user'
Downloading 'plugins/vnc' to '/usr/local/sdm/plugins/vnc'
Downloading 'plugins/wificonfig' to '/usr/local/sdm/plugins/wificonfig'
Downloading 'plugins/wsdd' to '/usr/local/sdm/plugins/wsdd'
Downloading '1piboot/1piboot.conf' to '/usr/local/sdm/1piboot/1piboot.conf'
* Create link for sdm: /usr/local/bin/sdm
* Ensure required packages are installed: binfmt-support gdisk keyboard-configuration parted qemu-user-static rsync systemd-container uuid
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gdisk is already the newest version (1.0.9-2.1).
gdisk set to manually installed.
keyboard-configuration is already the newest version (1.221rpt1).
parted is already the newest version (3.5-3).
rsync is already the newest version (3.2.7-1).
uuid is already the newest version (1.6.2-1.5+b11).
uuid set to manually installed.
Recommended packages:
  libnss-mymachines
The following NEW packages will be installed:
  binfmt-support qemu-user-static systemd-container
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.7 MB of archives.
After this operation, 269 MB of additional disk space will be used.
Get:1 http://mirror.2degrees.nz/raspbian/raspbian bookworm/main armhf binfmt-support armhf 2.2.2-2 [52.3 kB]
Get:2 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf qemu-user-static armhf 1:7.2+dfsg-7+deb12u7 [24.2 MB]
Err:3 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf systemd-container armhf 252.30-1~deb12u2+rpi1
  404  Not Found [IP: 93.93.128.193 80]
Fetched 24.3 MB in 4s (6,638 kB/s)
E: Failed to fetch http://raspbian.raspberrypi.com/raspbian/pool/main/s/systemd/systemd-container_252.30-1%7edeb12u2%2brpi1_armhf.deb  404  Not Found [IP: 93.93.128.193 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

* Invoke sdm with 'sudo sdm'

  Complete sdm documentation: https://github.com/gitbls/sdm/tree/master/Docs

pi@rpi5:~ $ sudo apt update && sudo apt install systemd-container
Get:1 http://raspbian.raspberrypi.com/raspbian bookworm InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.com/debian bookworm InRelease [39.2 kB]
Get:3 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf Packages [14.5 MB]
Get:4 http://archive.raspberrypi.com/debian bookworm/main armhf Packages [541 kB]
Get:5 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages [511 kB]
Fetched 15.6 MB in 9s (1,697 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
13 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libnss-mymachines libpam-systemd libsystemd-shared libsystemd0 libudev1 systemd systemd-sysv systemd-timesyncd udev
Suggested packages:
  systemd-homed systemd-userdbd systemd-boot systemd-resolved libtss2-esys-3.0.2-0 libtss2-mu0 libtss2-rc0
Recommended packages:
  libnss-systemd
The following NEW packages will be installed:
  libnss-mymachines systemd-container
The following packages will be upgraded:
  libpam-systemd libsystemd-shared libsystemd0 libudev1 systemd systemd-sysv systemd-timesyncd udev
8 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 7,284 kB of archives.
After this operation, 1,541 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf systemd-sysv armhf 252.31-1~deb12u1+rpi1 [42.8 kB]
Get:2 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libpam-systemd armhf 252.31-1~deb12u1+rpi1 [200 kB]
Get:3 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf systemd-timesyncd armhf 252.31-1~deb12u1+rpi1 [63.7 kB]
Get:4 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf systemd armhf 252.31-1~deb12u1+rpi1 [2,894 kB]
Get:5 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libsystemd-shared armhf 252.31-1~deb12u1+rpi1 [1,515 kB]
Get:6 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libsystemd0 armhf 252.31-1~deb12u1+rpi1 [300 kB]
Get:7 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf udev armhf 252.31-1~deb12u1+rpi1 [1,630 kB]
Get:8 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libudev1 armhf 252.31-1~deb12u1+rpi1 [100 kB]
Get:9 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf systemd-container armhf 252.31-1~deb12u1+rpi1 [388 kB]
Get:10 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libnss-mymachines armhf 252.31-1~deb12u1+rpi1 [151 kB]
Fetched 7,284 kB in 7s (1,109 kB/s)
Reading changelogs... Done
(Reading database ... 136511 files and directories currently installed.)
Preparing to unpack .../0-systemd-sysv_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking systemd-sysv (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Preparing to unpack .../1-libpam-systemd_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking libpam-systemd:armhf (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Preparing to unpack .../2-systemd-timesyncd_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking systemd-timesyncd (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Preparing to unpack .../3-systemd_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking systemd (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Preparing to unpack .../4-libsystemd-shared_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking libsystemd-shared:armhf (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Preparing to unpack .../5-libsystemd0_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking libsystemd0:armhf (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Setting up libsystemd0:armhf (252.31-1~deb12u1+rpi1) ...
(Reading database ... 136511 files and directories currently installed.)
Preparing to unpack .../udev_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking udev (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Preparing to unpack .../libudev1_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking libudev1:armhf (252.31-1~deb12u1+rpi1) over (252.30-1~deb12u2+rpi1) ...
Setting up libudev1:armhf (252.31-1~deb12u1+rpi1) ...
Selecting previously unselected package systemd-container.
(Reading database ... 136511 files and directories currently installed.)
Preparing to unpack .../systemd-container_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking systemd-container (252.31-1~deb12u1+rpi1) ...
Selecting previously unselected package libnss-mymachines:armhf.
Preparing to unpack .../libnss-mymachines_252.31-1~deb12u1+rpi1_armhf.deb ...
Unpacking libnss-mymachines:armhf (252.31-1~deb12u1+rpi1) ...
Setting up udev (252.31-1~deb12u1+rpi1) ...
Setting up libsystemd-shared:armhf (252.31-1~deb12u1+rpi1) ...
Setting up systemd (252.31-1~deb12u1+rpi1) ...
Setting up systemd-timesyncd (252.31-1~deb12u1+rpi1) ...
Setting up systemd-container (252.31-1~deb12u1+rpi1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/machines.target → /lib/systemd/system/machines.target.
Setting up systemd-sysv (252.31-1~deb12u1+rpi1) ...
Setting up libnss-mymachines:armhf (252.31-1~deb12u1+rpi1) ...
Setting up libpam-systemd:armhf (252.31-1~deb12u1+rpi1) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u9) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...
Processing triggers for initramfs-tools (0.142+rpt1+deb12u1) ...
update-initramfs: Generating /boot/initrd.img-6.6.51+rpt-rpi-v8
'/boot/initrd.img-6.6.51+rpt-rpi-v8' -> '/boot/firmware/initramfs8'

pi@rpi5:~ $ curl -c - -O https://downloads.raspberrypi.org//raspios_armhf/images/raspios_armhf-2024-11-19/2024-11-19-raspios-bookworm-armhf.img.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1176M  100 1176M    0     0  6939k      0  0:02:53  0:02:53 --:--:-- 5045k
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

pi@rpi5:~ $ xz -v -d 2024-11-19-raspios-bookworm-armhf.img.xz
2024-11-19-raspios-bookworm-armhf.img.xz (1/1)
 72.6 %     855.6 MiB / 3,638.4 MiB = 0.235    25 MiB/s       2:25    1 min 0 s
  100 %   1,176.6 MiB / 5,044.0 MiB = 0.233    22 MiB/s       3:49
pi@rpi5:~ $
pi@rpi5:~ $ sudo sdm --explore 2024-11-19-raspios-bookworm-armhf.img
* Mount IMG '2024-11-19-raspios-bookworm-armhf.img'
mount: /dev/loop0 mounted on /mnt/sdm.
mount: /dev/loop1 mounted on /mnt/sdm/boot/firmware.
% sdm will use qemu 'arm'
? Cannot find update-binfmts; try 'sudo apt install binfmt-support'
umount: /mnt/sdm/boot/firmware unmounted
umount: /mnt/sdm unmounted

pi@rpi5:~ $ sudo apt install binfmt-support
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  binfmt-support
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/52.3 kB of archives.
After this operation, 191 kB of additional disk space will be used.
Selecting previously unselected package binfmt-support.
(Reading database ... 136585 files and directories currently installed.)
Preparing to unpack .../binfmt-support_2.2.2-2_armhf.deb ...
Unpacking binfmt-support (2.2.2-2) ...
Setting up binfmt-support (2.2.2-2) ...
update-binfmts: warning: python3.11 already enabled in kernel.
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.
Processing triggers for man-db (2.11.2-2) ...

<At this point, double checked the EZ install to make sure all the right packages had in fact installed prior to running SDM again>

pi@rpi5:~ $ sudo apt install   binfmt-support qemu-user-static systemd-container
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
binfmt-support is already the newest version (2.2.2-2).
systemd-container is already the newest version (252.31-1~deb12u1+rpi1).
The following NEW packages will be installed:
  qemu-user-static
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/24.2 MB of archives.
After this operation, 268 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Selecting previously unselected package qemu-user-static.
(Reading database ... 136600 files and directories currently installed.)
Preparing to unpack .../qemu-user-static_1%3a7.2+dfsg-7+deb12u7_armhf.deb ...
Unpacking qemu-user-static (1:7.2+dfsg-7+deb12u7) ...
Setting up qemu-user-static (1:7.2+dfsg-7+deb12u7) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for systemd (252.31-1~deb12u1+rpi1) ...
pi@rpi5:~ $ sudo sdm --explore 2024-11-19-raspios-bookworm-armhf.img
* Mount IMG '2024-11-19-raspios-bookworm-armhf.img'

mount: /dev/loop0 mounted on /mnt/sdm.
mount: /dev/loop1 mounted on /mnt/sdm/boot/firmware.
% sdm will use qemu 'arm'
% Add and enable qemu binfmt for 'arm' processor architecture
* Enter IMG '2024-11-19-raspios-bookworm-armhf.img'
/usr/local/sdm/sdm-cparse: line 2069: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 2069: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 2069: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 2069: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 2069: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 2069: /usr/bin/stty: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 1216: /usr/bin/systemctl: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 1227: /usr/bin/systemd-nspawn: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 1900: /usr/bin/findmnt: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 1902: /usr/bin/findmnt: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 1696: /usr/bin/findmnt: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 1696: /usr/bin/findmnt: Too many levels of symbolic links
/usr/local/sdm/sdm-cparse: line 1925: /usr/bin/sync: Too many levels of symbolic links

Is this something you've seen before?

I also tried going back to V13.0 (thinking perhaps a recent regression had occurred, but found no difference).

Thanks,

Matt

gitbls commented 6 days ago

Why are you running an armhf 32-bit OS on a Pi5? It's 64-bit hardware so run the full 64-bit OS.

That said, I was definitely able to repro your scenario running armhf on a Pi5 and just doing a --explore into a 32-bit OS. Impressive failure mode, to say the least!

The problem does NOT repro when exploring a 64-bit OS on that same 32-bit system.

My suggestion: Install the 64-bit OS. on your Pi5 If you need to operate on 32-bit IMGs, add kernel=kernel8.img to your /boot/firmware/config.txt

You'll be able to operate on both 32 and 64 bit IMGs on it.

Someday I'll have a look into what's going on with 32 on 32 (at least) on a Pi5 (need to test others as well) but I consider this a low priority issue unless you can 100% convince me otherwise.

mattie47 commented 6 days ago

Why are you running an armhf 32-bit OS on a Pi5? It's 64-bit hardware so run the full 64-bit OS.

Because the docs say it's supported:

Running on 32-bit RasPiOS sdm can also perform all functions.

https://github.com/gitbls/sdm/blob/master/Docs/Compatibility.md?plain=1#L19

I opted for 32bit to stick with the same environment I'm running on actual Pis (In an attempt to minimize variables).

Why 32bit for the clients? Hardware issues on x64 and I don't have time to address. Because I already have Pis running 32bit in production, I don't want a mix-match without any major benefit for our scenario.

My suggestion: Install the 64-bit OS. on your Pi5 If you need to operate on 32-bit IMGs, add kernel=kernel8.img to your /boot/firmware/config.txt

I see. Thanks for suggesting that. I will try that now.

Someday I'll have a look into what's going on with 32 on 32 (at least) on a Pi5 (need to test others as well) but I consider this a low priority issue unless you can 100% convince me otherwise.

Fair enough. In absence, a doc update would be helpful.

Thanks,

Matt

gitbls commented 6 days ago

Now YOU know, and in the year since the Pi5 was released, you're the only person to run into this, so my motivation to doc it is pretty low. Sorry.

Also FYI, here is a strong recommendation from one of the RPL devs on the subject: https://forums.raspberrypi.com/viewtopic.php?p=2167385#p2167385