Issue making my own distribution with "dietpi-installer"

Details:

  • Date | 2025-05-21 23:31:30
  • Program name | DietPi-Installer
  • Command | /boot/dietpi/func/dietpi-set_software useradd dietpi
  • Exit code | 127
  • DietPi version | v9.12.1 (MichaIng/master)
  • Distro version | bookworm (ID=7,RASPBIAN=0)
  • Kernel version | Linux bananapipro 6.12.23-current-sunxi #1 SMP Thu Apr 10 12:39:41 UTC 2025 armv7l GNU/Linux
  • Architecture | armhf
  • Hardware model | (ID=22)
  • Power supply | (EG: RAVPower 5V 1A)
  • SD card | (EG: SanDisk Ultra 16 GB)

Steps to reproduce:

  1. BananapiPro was installed with ArmbianImage ā€œArmbian_community_25.8.0-trunk.8_Bananapipro_bookworm_current_6.12.23_minimal.imgā€
  2. The ā€œMake your own distributionā€ documentation was executed and ran for several minutes.

Expected behaviour:

  • The ArmbianImage should be ā€œconvertedā€ to Dietpi.

Actual behaviour:

  • The script is reporting an error and stops.

Extra details:

  • …

Additional logs:

Konfigurationsdatei »/etc/issue« existiert auf dem System nicht.
Neue Konfigurationsdatei wird wie gefordert installiert.

Konfigurationsdatei »/etc/issue.net« existiert auf dem System nicht.
Neue Konfigurationsdatei wird wie gefordert installiert.

Konfigurationsdatei »/etc/update-motd.d/10-uname« existiert auf dem System nicht.
Neue Konfigurationsdatei wird wie gefordert installiert.
[  OK  ] DietPi-Installer | APT install --reinstall base-files
[  OK  ] DietPi-Installer | rm -R /var/lock
[  OK  ] DietPi-Installer | ln -s /run/lock /var/lock
[  OK  ] DietPi-Installer | /var/lib/dpkg/info/base-files.postinst configure
[ INFO ] DietPi-Installer | Deleting list of known users and groups, not required by DietPi
[ INFO ] DietPi-Installer | Resetting root user account
[  OK  ] DietPi-Installer | usermod -d /root -s /bin/bash root
[  OK  ] DietPi-Installer | eval chpasswd <<< 'root:dietpi'
[.     ]./dietpi-globals: Zeile 905: /boot/dietpi/func/dietpi-set_software: Datei oder Verzeichnis nicht gefunden
[FAILED] DietPi-Installer | Creating DietPi user account
 - Command: /boot/dietpi/func/dietpi-set_software useradd dietpi

./dietpi-globals: Zeile 905: /boot/dietpi/func/dietpi-set_software: Datei oder Verzeichnis nicht gefunden

can you check if the file exist?

ls -la /boot/dietpi/func/

Hi. It does NOT exist:

# ls -la /boot/dietpi/func/
ls: Zugriff auf '/boot/dietpi/func/' nicht mƶglich: Datei oder Verzeichnis nicht gefunden

Are there any signs for DietPi scripts in /boot/dietpi/?

# ls -la /boot/dietpi/
ls: Zugriff auf '/boot/dietpi/' nicht mƶglich: Datei oder Verzeichnis nicht gefunden

ā€œAccess to ā€˜/boot/dietpi/’ not possible: File or directory not foundā€

I’ve also now installed MC, but I can’t enter ā€œ\bootā€ - no matter if started with or withoud ā€œsudoā€.
Other subdirs (\dev, \etc, \home etc.) can be entered without problems.

Can you share

ls -la /

Of course:

# ls -la /
insgesamt 60
drwxr-xr-x  20 root root 4096 21. Mai 23:30 .
drwxr-xr-x  20 root root 4096 21. Mai 23:30 ..
drwxrwxr-x   3 root root 4096 15. Mai 12:08 armbian
lrwxrwxrwx   1 root root    7  8. Mai 06:12 bin -> usr/bin
drwxr-xr-x   0 root root    0 21. Mai 23:29 boot
drwxr-xr-x  14 root root 3300 21. Mai 23:19 dev
drwxr-xr-x  63 root root 4096 22. Mai 16:06 etc
drwxr-xr-x   2 root root 4096  9. Mai 16:50 home
lrwxrwxrwx   1 root root    7  8. Mai 06:12 lib -> usr/lib
drwx------   2 root root 4096 15. Mai 12:10 lost+found
drwxr-xr-x   3 root root 4096 21. Mai 23:29 media
drwxr-xr-x   2 root root 4096 21. Mai 22:52 mnt
drwxr-xr-x   2 root root 4096  8. Mai 06:12 opt
dr-xr-xr-x 143 root root    0 21. Mai 23:03 proc
drwx------   5 root root 4096 22. Mai 15:57 root
drwxr-xr-x  16 root root  520 21. Mai 23:28 run
lrwxrwxrwx   1 root root    8  8. Mai 06:12 sbin -> usr/sbin
drwxrwxr-x   2 root root 4096 15. Mai 12:08 selinux
drwxr-xr-x   2 root root 4096  8. Mai 06:12 srv
dr-xr-xr-x  12 root root    0 21. Mai 23:03 sys
drwxrwxrwt   9 root root  180 22. Mai 16:06 tmp
drwxr-xr-x  11 root root 4096  8. Mai 06:12 usr
drwxr-xr-x  12 root root 4096 21. Mai 23:30 var

and you are logged in as user root? and you can’t do a

ls -la /boot

I can do, but the result is confusing:

# ls -la /boot
insgesamt 0

probably a missing mount, can you check following pls

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
cat /etc/fstab
# lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
cat /etc/fstab
NAME        FSTYPE LABEL        SIZE RO TYPE MOUNTPOINT     PARTUUID                             UUID
sda                           111,8G  0 disk
└─sda1      ext4              111,8G  0 part /              70327f9d-82c5-4917-b132-2ddfab5cd4f1 f154456e-7d94-44ce-b607-c80edf90ec69
mmcblk0                        29,1G  0 disk
└─mmcblk0p1 ext4   armbi_root  28,8G  0 part /media/mmcboot eabac371-01                          4f645e5c-9749-4e6e-ae54-553d368773a0
# <file system>                                 <mount point>   <type>  <options>                                                       <dump>  <pass>
tmpfs                                           /tmp            tmpfs   defaults,nosuid                                                 0       0
UUID=4f645e5c-9749-4e6e-ae54-553d368773a0       /media/mmcboot  ext4    defaults,noatime,commit=120,errors=remount-ro,x-gvfs-hide       0       1
/media/mmcboot/boot                             /boot           none    bind                                                            0       0
UUID=f154456e-7d94-44ce-b607-c80edf90ec69       /               ext4    defaults,noatime,commit=120,errors=remount-ro,x-gvfs-hide       0       1

ok you have an SD card hosting the boot file system and another external disk for the root file system? Did you moved something from left to right before starting the conversion??

As well quit interesting to have one mount for /media/mmcboot which is remounted to /boot. Maybe a specific of this device?

Anyway the mount for /boot is missing and not present. Can you try to remount

mount /boot

That’s correct - and maybe my mistake: The system was installed on SD-card and later the SSD was added and data moved. Should I do the process again WITHOUT adding the SSD and do this after the script ā€œdietpi-installerā€ ran successfully?

Mounting is a problem:

# mount /boot
mount: /boot: special device /media/mmcboot/boot does not exist.
       dmesg(1) may have more information after failed mount system call.

Can you check this content

It is empty:

# ls -la /media/mmcboot/
insgesamt 8
drwxr-xr-x 2 root root 4096 21. Mai 23:29 .
drwxr-xr-x 3 root root 4096 21. Mai 23:29 ..

I suspect that the media directory was cleared by our conversion script, which then also affects the boot folder. It is unusual that it is mounted there. It is best to restart with the original image. And before the conversion is started, we have to remount the boot folder.

New try, new phenomenons…

I removed the SDD (so that only the SD-card is present) and made a new try with the Armbian-Image. It booted fine and I changed the root-PW and created a new user (the initial steps demanded by Armbian). Then I didi ā€œapt update && apt upgradeā€, and finally startet the steps to create my own ā€œdietpiā€. After a few minutes I got that message and the device froze:

[  OK  ] DietPi-Installer | mkdir -p /etc/apt/sources.list.d
[ INFO ] DietPi-Installer | Enforcing downgrade of Armbian's base-files package to Debian's
[  OK  ] DietPi-Installer | eval echo 'APT::Get::Allow-Downgrades "1";' > /etc/apt/apt.conf.d/dietpi-armbian

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.407467] Internal error: Oops: 80000007 [#1] SMP THUMB2

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.614822] Process kworker/0:0 (pid: 3544, stack limit = 0xfc2159ca)

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.621278] Stack: (0xf15e9ea0 to 0xf15ea000)

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.625653] 9ea0: 00000001 c35d3800 00000000 c0850211 800d0093 c3f2b94c f15e9ec8 c014ad5f

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.633847] 9ec0: f15e9edc c014ad69 c3f2b200 800d0013 c1606754 00000000 f15e9ed8 f15e9ed8

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.642041] 9ee0: f15e9ee0 f15e9ee0 00000008 6fbb7131 eff8dbc0 c35d3aac c35d3a98 c35d3800

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.650234] 9f00: eff8dbc0 00400000 c201b005 c2007970 eff8dc1c c0850b85 c3607480 c35d3ab4

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.658428] 9f20: c201b000 c01348c7 eff8dc1c c01990dd eff84140 eff8dbc0 eff8dc1c c01990ed

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.666621] 9f40: c3607480 eff8dbc0 eff8dbe0 c36074ac 61c88647 eff8dbe0 c4038a00 c0134c61

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.674814] 9f60: c1603d40 eff8dbe0 f0841eb8 c3707780 c4038a00 c0134a75 c3607480 c3707fc0

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.683008] 9f80: f0841eb8 00000000 00000000 c013c02b 000002ab c3707780 c013bf6d 00000000

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.691200] 9fa0: 00000000 00000000 00000000 c0100155 00000000 00000000 00000000 00000000

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.699392] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.707585] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.715773] Call trace:

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.715797]  __thermal_zone_get_temp from __thermal_zone_device_update+0x71/0x4b0

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.725843]  __thermal_zone_device_update from thermal_zone_device_check+0x29/0x34

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.733433]  thermal_zone_device_check from process_one_work+0x123/0x2d0

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.740166]  process_one_work from worker_thread+0x1ed/0x2d4

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.745858]  worker_thread from kthread+0xbf/0xd4

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.750595]  kthread from ret_from_fork+0x11/0x1c

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.755324] Exception stack(0xf15e9fb0 to 0xf15e9ff8)

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.760389] 9fa0:                                     00000000 00000000 00000000 00000000

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.768581] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.776772] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000

Message from syslogd@bananapipro at May 22 20:06:22 ...
 kernel:[  620.783400] Code: bad PC value

I have now questioned what I could change about the process. The SD card was prepared again, booted from it, but now after ā€˜apt update && apt upgrade’ I rebooted manually.
After the script ā€œdietpi-installerā€ was started, it ran for a few minutes without any problems, but now stops at this point:

[  OK  ] DietPi-Set_hardware | systemctl unmask serial-getty@ttyS3
[  OK  ] DietPi-Set_hardware | systemctl enable serial-getty@ttyS3
[   .. ]A dependency job for serial-getty@ttyS3.service failed. See 'journalctl -xe' for details.
[FAILED] DietPi-Set_hardware | systemctl start serial-getty@ttyS3
[  ..  ] DietPi-Set_hardware | systemctl start serial-getty@ttyS3
#### Details:
- Date           | 2025-05-23 12:04:58
- Program name   | DietPi-Set_hardware
- Command        | `systemctl start serial-getty@ttyS3`
- Exit code      | 1
- DietPi version | v9.12.1 (MichaIng/master)
- Distro version | bookworm (ID=7)
- Kernel version | `Linux bananapipro 6.12.23-current-sunxi #1 SMP Thu Apr 10 12:39:41 UTC 2025 armv7l GNU/Linux`
- Architecture   | `armhf`
- Hardware model | Generic Device (armv7l) (ID=22)
- Power supply   | (EG: RAVPower 5V 1A)
- SD card        | (EG: SanDisk Ultra 16 GB)
#### Steps to reproduce:
<!-- Explain how to reproduce the issue -->
1. ...
2. ...
#### Expected behaviour:
<!-- What SHOULD happen? -->
- ...
#### Actual behaviour:
<!-- What IS happening? -->
- ...
#### Extra details:
<!-- Please post any extra details that might help solve the issue -->
- ...
#### Additional logs:

The output from ā€˜journalctl -xe’ is this (I see ā€œā€“moreā€“ā€, but Shift+PgDn doesnt work in Putty):

# journalctl -xe
May 22 23:13:40 bananapipro kernel: Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
May 22 23:13:40 bananapipro kernel: CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
May 22 23:13:40 bananapipro kernel: Setting up static identity map for 0x40100000 - 0x40100054
May 22 23:13:40 bananapipro kernel: rcu: Hierarchical SRCU implementation.
May 22 23:13:40 bananapipro kernel: rcu:         Max phase no-delay instances is 1000.
May 22 23:13:40 bananapipro kernel: Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
May 22 23:13:40 bananapipro kernel: smp: Bringing up secondary CPUs ...
May 22 23:13:40 bananapipro kernel: CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
May 22 23:13:40 bananapipro kernel: smp: Brought up 1 node, 2 CPUs
May 22 23:13:40 bananapipro kernel: SMP: Total of 2 processors activated (96.00 BogoMIPS).
May 22 23:13:40 bananapipro kernel: CPU: All CPU(s) started in HYP mode.
May 22 23:13:40 bananapipro kernel: CPU: Virtualization extensions available.
May 22 23:13:40 bananapipro kernel: Memory: 867680K/1015868K available (10240K kernel code, 1681K rwdata, 9092K rodata, 1024K init, 409K bss, 45924K reserved, 98304K cma-rese
rved, 229436K highmem)
May 22 23:13:40 bananapipro kernel: devtmpfs: initialized
May 22 23:13:40 bananapipro kernel: VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
May 22 23:13:40 bananapipro kernel: clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
May 22 23:13:40 bananapipro kernel: futex hash table entries: 512 (order: 3, 32768 bytes, linear)
May 22 23:13:40 bananapipro kernel: pinctrl core: initialized pinctrl subsystem
May 22 23:13:40 bananapipro kernel: NET: Registered PF_NETLINK/PF_ROUTE protocol family
May 22 23:13:40 bananapipro kernel: DMA: preallocated 256 KiB pool for atomic coherent allocations
May 22 23:13:40 bananapipro kernel: audit: initializing netlink subsys (disabled)
May 22 23:13:40 bananapipro kernel: audit: type=2000 audit(0.100:1): state=initialized audit_enabled=0 res=1
May 22 23:13:40 bananapipro kernel: thermal_sys: Registered thermal governor 'fair_share'
May 22 23:13:40 bananapipro kernel: thermal_sys: Registered thermal governor 'bang_bang'
May 22 23:13:40 bananapipro kernel: thermal_sys: Registered thermal governor 'step_wise'
May 22 23:13:40 bananapipro kernel: cpuidle: using governor ladder
May 22 23:13:40 bananapipro kernel: cpuidle: using governor menu
May 22 23:13:40 bananapipro kernel: hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
May 22 23:13:40 bananapipro kernel: hw-breakpoint: maximum watchpoint size is 8 bytes.
May 22 23:13:40 bananapipro kernel: /soc/lcd-controller@1c0c000: Fixed dependency cycle(s) with /soc/hdmi@1c16000
May 22 23:13:40 bananapipro kernel: /soc/lcd-controller@1c0c000: Fixed dependency cycle(s) with /soc/display-backend@1e40000
May 22 23:13:40 bananapipro kernel: /soc/lcd-controller@1c0c000: Fixed dependency cycle(s) with /soc/display-backend@1e60000
May 22 23:13:40 bananapipro kernel: /soc/lcd-controller@1c0d000: Fixed dependency cycle(s) with /soc/hdmi@1c16000
May 22 23:13:40 bananapipro kernel: /soc/lcd-controller@1c0d000: Fixed dependency cycle(s) with /soc/display-backend@1e40000
May 22 23:13:40 bananapipro kernel: /soc/lcd-controller@1c0d000: Fixed dependency cycle(s) with /soc/display-backend@1e60000
May 22 23:13:40 bananapipro kernel: /soc/hdmi@1c16000: Fixed dependency cycle(s) with /soc/lcd-controller@1c0d000
May 22 23:13:40 bananapipro kernel: /soc/hdmi@1c16000: Fixed dependency cycle(s) with /soc/lcd-controller@1c0c000
May 22 23:13:40 bananapipro kernel: /soc/interrupt-controller@1c81000: Fixed dependency cycle(s) with /soc/interrupt-controller@1c81000
May 22 23:13:40 bananapipro kernel: /soc/display-frontend@1e00000: Fixed dependency cycle(s) with /soc/display-backend@1e40000
May 22 23:13:40 bananapipro kernel: /soc/display-frontend@1e00000: Fixed dependency cycle(s) with /soc/display-backend@1e60000
May 22 23:13:40 bananapipro kernel: /soc/display-frontend@1e20000: Fixed dependency cycle(s) with /soc/display-backend@1e40000
May 22 23:13:40 bananapipro kernel: /soc/display-frontend@1e20000: Fixed dependency cycle(s) with /soc/display-backend@1e60000
May 22 23:13:40 bananapipro kernel: /soc/display-backend@1e40000: Fixed dependency cycle(s) with /soc/lcd-controller@1c0d000
May 22 23:13:40 bananapipro kernel: /soc/display-backend@1e40000: Fixed dependency cycle(s) with /soc/lcd-controller@1c0c000
--More--

My final idea was to install a ā€œrawā€ Debian image. I searched the Debian-site and found ā€œdebian-12.11.0-armhf-netinst.isoā€ (which I thought sould work with the Allwinner A20 CPU).
I used ā€œbalenaEtcher-2.1.3ā€ to write it on SD-card, but the BanapiPro does not boot from it.

1 Like

Our conversion script works to the best of our knowledge and belief. It supports a lot of SBC but it can’t cover everything. Especially with SBCs that are not officially supported, problems can occur.

Probably we would need support from @MichaIng

Hmm, I wonder how to handle the armbian-install moved root partition best. It copies the SD card content to the target drive, then sets up the SD card to mount to /media with a bind mount of the contained boot dir to the new boot dir.

Currently, the default setup with dietpi-drive_manager breaks such in any case. Best would be to remove all but the /boot dir from the SD card, copy the boot dir content to its root, and then mount it to the new boot dir properly. But maybe it is too intrusive? Or we support this boot bind mount setup, but might be some work.

Regarding serial-getty@ttyS3: Currently, if the hardware is not known/generic, it enables serial consoles on all found serial devices. Obviously for some reason one of them fails in your case. When you face this, from the error handler, you can open a subshell and check:

journalcrl -u serial-getty@ttyS3

So get a hint why. Then from the error handler you can run an alternative/replacement command true to continue. This is not critical. The idea was that the relevant debug serial console is active in any case on our images, if needed right from the first boot. But maybe this causes more issues than it solves and we instead should disable all serial consoles in that case, or just not touch the current situation.