Klipper environment paths differ

Basic Information:

Printer Model: Ender 5
MCU / Printerboard: lpc1769 MKS SGEN V1, Fysetc UCAN, BTT EBB42 V1.2. [>v0.12.0-429-g01b0e98ab]
Host / SBC: Raspeberry Pi 4 [v0.12.0-432-gfec3e685c] (gave up on the CM3+)
klippy.log
klippy.log.txt (104.7 KB)

uname -a && getconf LONG_BIT
Linux mainsail 6.6.74+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 GNU/Linux
64

Describe your issue:

Installed via KIAUH:
-Klipper
-Moonraker
-Mainsail
-KlipperScreen
-Crowsnest
-G-Code Shell Command

Also installed:
-python3
-python3-serial
-katapult

I’m having issues with:
~/klipper/scripts/flash-sdcard.sh

Flashing /home/pi/klipper/out/klipper.bin to /dev/serial/by-id/usb-Klipper_lpc1769_1320000C261928AF9E93995BC52000F5-if00
./scripts/flash-sdcard.sh: line 88: /root/klippy-env/bin/python: No such file or directory

path uses /root/ instead of /home/[user_name]/klippy-env

I’m also having issues with:

python3: can't open file '/root/katapult/scripts/flashtool.py': [Errno 2] No such file or directory

Same again, /root/ instead of /home/[user_name]/katapult

I’ve only seen this issue when using KIAUH.

Am I missing something to set the environment paths?
I was also having this issue with the CM3+ and Raspberry OS Lite 32-bit.

My goal is to have the auto update script working again:

service klipper stop
cd ~/klipper/
git pull


#UPDATE MKS SGEN V1
make clean KCONFIG_CONFIG=config.oid-mks-sgenl-v1
make menuconfig KCONFIG_CONFIG=config.oid-mks-sgenl-v1
make KCONFIG_CONFIG=config.oid-mks-sgenl-v1
./scripts/flash-sdcard.sh /dev/serial/by-id/usb-Klipper_lpc1769_1320000C261928AF9E93995BC52000F5-if00 generic-lpc1769

#UPDATE BTT EBB42 V1.2
make clean KCONFIG_CONFIG=config.oid-ebb42
make menuconfig KCONFIG_CONFIG=config.oid-ebb42
make KCONFIG_CONFIG=config.oid-ebb42
python3 ~/katapult/scripts/flashtool.py -i can0 -f ~/klipper/out/klipper.bin -u 76f387ebdd7f

#UPDATE FYSETC UCAN
make clean KCONFIG_CONFIG=config.oid-UCAN
make menuconfig KCONFIG_CONFIG=config.oid-UCAN
make KCONFIG_CONFIG=config.oid-UCAN
python3 ~/katapult/scripts/flashtool.py -i can0 -u 9da2407d323f -r
make KCONFIG_CONFIG=config.oid-UCAN flash FLASH_DEVICE=/dev/serial/by-id/usb-katapult_stm32f072xb_38002C001857435438353920-if00

service klipper start

Edit: forgot to add Mainsail to the list.
Edit: added log

Wow. You have put in a lot of software here.

There’s no klippy.log available?

Could you explain the process you used to install the OS on the rPi as well as Klipper (and everything else)?

If that’s not available, or is impossible to provide, could you try installing everything again, documenting each step (with screenshots if possible) and only do:

  1. rPi OS
  2. KIAUH
  3. Klipper/Moonraker/Mainsail using KIAUH
  4. Katapult
  5. Burn Firmware images into the MKS SGEN V1 & EBB42

Hiya!

Is it not a usual amount?

It’s the Raspberry OS Lite Bookworm 64-bit for Raspberry Pi 4 from the Raspberry Pi Imager Tool.

I can’t seem to upload the logs from my phone, will try later.

I used Kiauh with the stable menu and all installations with default settings. Rebooting when prompted to.

Python vĂ­a the classic apt update and install followed by git cloning Katapult from the repo.

:woman_shrugging: will update when possible!

Edit: added the logs

This seems very strange.
For me, it looks like either:

  • A somehow messed-up Linux installation
  • Previous attempts to run KIAUH or any other installation steps under the root account instead of the correct user account

Depending on your Linux administrative skills, the easiest approach might be to start over and ensure that all installation steps are performed under the intended user account.

1 Like

Hello again!!

It seems it’s the Lite image from the Raspberry Pi imager that is the “issue”. It only has one user (pi) as root even when in /home/ the user pi is there.

I built Armbian Minimal and it guided me to make a user account, so there is root and pi. All the path errors seem to be gone.
And I also have nearly 3GB of free space!!
(I also learnt the hard way that Klipper does NOT like files to be copied and pasted via SCP when they belong to a different owner and user group. I was a matter of changing owner and group but took me a while to figure out because the Pi would lock up)

git clone https://github.com/armbian/build
cd build
./compile.sh build \
BOARD=rpi4b \
BRANCH=current \
BUILD_DESKTOP=no \
BUILD_MINIMAL=yes \
KERNEL_CONFIGURE=no \
RELEASE=bookworm

Glad that it worked out.

I wouldn’t like to have this standing uncommented:

  • SSH root login is disabled on RPis by default. This does not mean it does not exist.
  • The user pi and the user root are different users
  • The pi user is automatically part of sudo and can use root commands if needed, provided they are prepended with sudo.
  • For RPis, the official Raspberry Pi OS is still the most stable and recommended Linux option. I am not aware of any issues regarding Klipper.
  • Nothing in Linux likes it when you mix permissions and ownership, especially when root is involved.
  • SCP works exactly the same as regular SSH login. The files get the ownership of the user used to log in via the SCP client. Therefore, it is recommended to log in with the actual user and not via root.
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.