DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

A weird problem: when compiling the arm64 image device use #make-your-own-distribution

Open chips023 opened this issue 3 years ago • 103 comments

bullseye with Armbian Linux SBC device | Generic Device (aarch64) Power supply used | 5V 2A RAVpower SDcard used | SanDisk ultra)

when compiling the arm64 image device use #make-your-own-distribution https://dietpi.com/docs/hardware/#make-your-own-distribution

After I successfully compiled step by step, I pretended to be dead when I entered the system interface after restarting. There was no response. The computer could not be found on the network. I could not enter the system in any way. There was no response!

Output information of reboot:


Welcome to Debian GNU/Linux 11 (bullseye)!

[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-modprobe.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[  OK  ] Set up automount Arbitrary…s File System Automount Point.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Swap.
[  OK  ] Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Reached target Sockets.
         Mounting Huge Pages File System...
         Mounting POSIX Message Queue File System...
         Mounting Kernel Debug File System...
         Starting Restore / save the current clock...
         Starting Set the console keyboard layout...
         Starting Create list of st…odes for the current kernel...
         Starting Load Kernel Module configfs...
         Starting Load Kernel Module fuse...
         Starting Journal Service...
         Starting Load Kernel Modules...
         Starting Remount Root and Kernel File Systems...
         Starting Coldplug All udev Devices...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Finished Restore / save the current clock.
[  OK  ] Finished Create list of st… nodes for the current kernel.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Finished Load Kernel Modules.
[  OK  ] Finished Remount Root and Kernel File Systems.
         Mounting FUSE Control File System...
         Mounting Kernel Configuration File System...
         Starting Load/Save Random Seed...
         Starting Apply Kernel Variables...
         Starting Create System Users...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Finished Create System Users.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Journal Service.
[  OK  ] Finished Create Static Device Nodes in /dev.
         Starting Rule-based Manage…for Device Events and Files...
[  OK  ] Finished Set the console keyboard layout.
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
         Mounting /var/log...
         Starting Helper to synchronize boot up for ifupdown...
[  OK  ] Mounted /tmp.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Mounted /var/log.
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Finished Set console font and keymap.
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
[  OK  ] Started Entropy Daemon based on the HAVEGE algorithm.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Finished Update UTMP about System Boot/Shutdown.
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Basic System.
[  OK  ] Reached target System Time Set.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Reached target Timers.
         Starting DietPi-RAMlog...
         Starting LSB: Lightweight SSH server...
[  OK  ] Found device /dev/ttyS3.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /dev/ttyS1.
[  OK  ] Finished DietPi-RAMlog.
[  OK  ] Found device /dev/ttyS2.
         Starting DietPi-PreBoot...
[  OK  ] Started LSB: Lightweight SSH server.
[    6.404305] DietPi-PreBoot[360]: DietPi-CPU_set | CPU governors are not available on this system. This is probably a virtual machine. Aborting...
[  OK  ] Finished DietPi-PreBoot.
[  OK  ] Reached target Network (Pre).
[  OK  ] Found device /sys/subsystem/net/devices/eth0.
         Starting ifup for eth0...
[  OK  ] Finished Helper to synchronize boot up for ifupdown.
         Starting Raise network interfaces...
[  OK  ] Finished Raise network interfaces.
[  OK  ] Finished ifup for eth0.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Started DietPi-PostBoot.
         Starting Permit User Sessions...
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Serial Getty on ttyS1.
[  OK  ] Started Serial Getty on ttyS2.
[  OK  ] Started Serial Getty on ttyS3.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Finished Update UTMP about System Runlevel Changes.

 ─────────────────────────────────────────────────────
 DietPi v8.11.2 : 20:32 - Thu 11/24/22
 ─────────────────────────────────────────────────────
 - LAN IP : fe80::251:82ff:fe11:2200 (eth0)

 Default Login:
 Username = root
 Password = dietpi (or custom dietpi.txt entry)

 Please hit <return> to login

One year ago, I compiled with reference to the old build link and started to enter the system normally~

chips023 avatar Nov 10 '22 08:11 chips023

Looks like your system is not getting an IP address assigned via Ethernet

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Joulinar avatar Nov 10 '22 08:11 Joulinar

It seems that everything is normal~but the system is not accessible and the device does not respond

chips023 avatar Nov 10 '22 08:11 chips023

yes because it does not get an IP address assigned. You could try to use STATIC IP instead of DHCP.

Joulinar avatar Nov 10 '22 08:11 Joulinar

But I access the device through a serial connection, not through the network Use a serial connection to gain access to the console

Now the serial console also crashes, and there is no response~

chips023 avatar Nov 10 '22 08:11 chips023

Normally, even if there is no network card or the network card is not started, the serial console access will not be affected

chips023 avatar Nov 10 '22 08:11 chips023

Normally, even if there is no network card or the network card is not started, the serial console access will not be affected

Thank you very much for your reply, but I still haven't found the problem... Maybe I'm too stupid...: (

chips023 avatar Nov 10 '22 08:11 chips023

Is it possible that the CPU frequency setting problem caused the system to crash when entering the system?

chips023 avatar Nov 10 '22 08:11 chips023

I have repeatedly tested for 3 times by referring to the build link. Unfortunately, the compiled system cannot enter and crash each time...: (

chips023 avatar Nov 10 '22 09:11 chips023

Which SBC is it, actually? There are some (Amlogic especially) having boot issues with recent Armbian kernel upgrade. Please also try this on the Armbian image before applying the Debian installer, to assure it is not an Armbian issue:

apt update
apt full-upgrade
reboot

Is it possible that the CPU frequency setting problem caused the system to crash when entering the system?

Rare but possible. Try to change it from schedutil to ondemand in /boot/dietpi.txt right after you applied the installer and before reboot.

Now the serial console also crashes, and there is no response~

Which serial console device does it use (like /dev/ttyS0)? And which baud rate does it use (can be usually seen in /boot/boot.cmd)?

MichaIng avatar Nov 10 '22 09:11 MichaIng

The sbc is customized by us.

On the Armbian image(Armbian 22.08 Bullseye), everything is normal. It can be started normally and enter the system interface

it use /dev/ttyS0

chips023 avatar Nov 10 '22 10:11 chips023

The sbc is customized by us.

Which Armbian image do you use then, or which target platform, if you used the Armbian image builder?

Please also go through the other points mentioned above.

MichaIng avatar Nov 10 '22 10:11 MichaIng

Armbian Espressobin It is a reference platform for us We use this for reference to build our target platform is mvebu64

chips023 avatar Nov 10 '22 10:11 chips023

The sbc is customized by us.

Which Armbian image do you use then, or which target platform, if you used the Armbian image builder?

Please also go through the other points mentioned above.

Thank you for all your help. I really like the dietpi system~

chips023 avatar Nov 10 '22 10:11 chips023

Every time I missed the last step of success,,

So sad :(

─────────────────────────────────────────────────────
 DietPi v8.11.2 : 20:32 - Thu 11/24/22
 ─────────────────────────────────────────────────────
 - LAN IP : fe80::251:82ff:fe11:2200 (eth0)

 Default Login:
 Username = root
 Password = dietpi (or custom dietpi.txt entry)

 Please hit <return> to login

。。。。。。。。。。。。

Then there is endless waiting.... No reaction

chips023 avatar Nov 24 '22 20:11 chips023

looks like you don't have a valid IP address. At least it seems to be a link local IPv6 address only

Joulinar avatar Nov 24 '22 21:11 Joulinar

But I access the device through a serial connection, not through the network Use a serial connection to gain access to the console

Now the serial console also crashes, and there is no response~

But I access the device through a serial connection, not through the network Use a serial connection to gain access to the console

Now the serial console also crashes, and there is no response~

chips023 avatar Nov 24 '22 21:11 chips023

It seems that everything is normal, no error message is output... Output information of reboot:

Welcome to Debian GNU/Linux 11 (bullseye)!

[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-modprobe.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[  OK  ] Set up automount Arbitrary…s File System Automount Point.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Swap.
[  OK  ] Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Reached target Sockets.
         Mounting Huge Pages File System...
         Mounting POSIX Message Queue File System...
         Mounting Kernel Debug File System...
         Starting Restore / save the current clock...
         Starting Set the console keyboard layout...
         Starting Create list of st…odes for the current kernel...
         Starting Load Kernel Module configfs...
         Starting Load Kernel Module fuse...
         Starting Journal Service...
         Starting Load Kernel Modules...
         Starting Remount Root and Kernel File Systems...
         Starting Coldplug All udev Devices...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Finished Restore / save the current clock.
[  OK  ] Finished Create list of st… nodes for the current kernel.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Finished Load Kernel Modules.
[  OK  ] Finished Remount Root and Kernel File Systems.
         Mounting FUSE Control File System...
         Mounting Kernel Configuration File System...
         Starting Load/Save Random Seed...
         Starting Apply Kernel Variables...
         Starting Create System Users...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Finished Create System Users.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Journal Service.
[  OK  ] Finished Create Static Device Nodes in /dev.
         Starting Rule-based Manage…for Device Events and Files...
[  OK  ] Finished Set the console keyboard layout.
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
         Mounting /var/log...
         Starting Helper to synchronize boot up for ifupdown...
[  OK  ] Mounted /tmp.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Mounted /var/log.
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Finished Set console font and keymap.
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
[  OK  ] Started Entropy Daemon based on the HAVEGE algorithm.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Finished Update UTMP about System Boot/Shutdown.
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Basic System.
[  OK  ] Reached target System Time Set.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Reached target Timers.
         Starting DietPi-RAMlog...
         Starting LSB: Lightweight SSH server...
[  OK  ] Found device /dev/ttyS3.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /dev/ttyS1.
[  OK  ] Finished DietPi-RAMlog.
[  OK  ] Found device /dev/ttyS2.
         Starting DietPi-PreBoot...
[  OK  ] Started LSB: Lightweight SSH server.
[    6.404305] DietPi-PreBoot[360]: DietPi-CPU_set | CPU governors are not available on this system. This is probably a virtual machine. Aborting...
[  OK  ] Finished DietPi-PreBoot.
[  OK  ] Reached target Network (Pre).
[  OK  ] Found device /sys/subsystem/net/devices/eth0.
         Starting ifup for eth0...
[  OK  ] Finished Helper to synchronize boot up for ifupdown.
         Starting Raise network interfaces...
[  OK  ] Finished Raise network interfaces.
[  OK  ] Finished ifup for eth0.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Started DietPi-PostBoot.
         Starting Permit User Sessions...
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Serial Getty on ttyS1.
[  OK  ] Started Serial Getty on ttyS2.
[  OK  ] Started Serial Getty on ttyS3.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Finished Update UTMP about System Runlevel Changes.

 ─────────────────────────────────────────────────────
 DietPi v8.11.2 : 20:32 - Thu 11/24/22
 ─────────────────────────────────────────────────────
 - LAN IP : fe80::251:82ff:fe11:2200 (eth0)

 Default Login:
 Username = root
 Password = dietpi (or custom dietpi.txt entry)

 Please hit <return> to login

chips023 avatar Nov 24 '22 21:11 chips023

Did you actually hit return key as stated in the pre-login banner?

MichaIng avatar Nov 24 '22 23:11 MichaIng

Sure, but the keyboard has no response. I'm sure it's down and the dietpi host can't be found on the router.

chips023 avatar Nov 25 '22 04:11 chips023

I just see that it failed to set CPU governor settings, which alone is strange on a physical system as well 🤔. However, this rules out that schedutil is the issue.

getty on tty1 and ttyS0 are both started, so there should be a login prompt on both. The UART works with default baud rate 115200 or there is an override in /etc/systemd/system/[email protected]? However, this isn't touched on generic devices by the installer.

Not sure. If you used a fully functional Armbian image as basis, the installer shouldn't break it since kernel, bootloader, boot config, firmware and all such are not touched, or the Espressobin image is composed very differently, e.g. ships with other essential packages.

MichaIng avatar Nov 27 '22 18:11 MichaIng

The UART works with rate 115200 then I mount the sd card on the ubuntu, and then see /etc/systemd/system/ :

root@wu-Ub:/etc/systemd/system# ls
 bluetooth.target.wants
 cloud-final.service.wants
 dbus-fi.w1.wpa_supplicant1.service
 dbus-org.bluez.service
 dbus-org.freedesktop.Avahi.service
 dbus-org.freedesktop.ModemManager1.service
 dbus-org.freedesktop.nm-dispatcher.service
 dbus-org.freedesktop.oom1.service
 dbus-org.freedesktop.resolve1.service
 dbus-org.freedesktop.thermald.service
 dbus-org.freedesktop.timesync1.service
 default.target.wants
 display-manager.service
 display-manager.service.wants
 emergency.target.wants
 final.target.wants
 getty.target.wants
 graphical.target.wants
 multi-user.target.wants
 network-online.target.wants
 nfs-client.target.wants
 oem-config.service.wants
 paths.target.wants
 printer.target.wants
 prltoolsd.service
 prltools-reconfig.service
 remote-fs.target.wants
 rescue.target.wants
 sleep.target.wants
 snap-bare-5.mount
 snap-core20-1587.mount
 snap-core20-1695.mount
 snap-firefox-1635.mount
 snap-firefox-2088.mount
'snap-gnome\x2d3\x2d38\x2d2004-112.mount'
'snap-gnome\x2d3\x2d38\x2d2004-119.mount'
'snap-gtk\x2dcommon\x2dthemes-1535.mount'
 snap-snapd-16292.mount
 snap-snapd-17576.mount
'snap-snapd\x2ddesktop\x2dintegration-14.mount'
'snap-snap\x2dstore-582.mount'
'snap-snap\x2dstore-599.mount'
 sockets.target.wants
 sudo.service
 sysinit.target.wants
 syslog.service
 timers.target.wants
'var-snap-firefox-common-host\x2dhunspell.mount'
root@wu-Ub:/etc/systemd/system# 

chips023 avatar Nov 27 '22 19:11 chips023

I was reading through the notes of Armbian on the image: https://www.armbian.com/espressobin/

There seem to be different models with different (stable) CPU frequency and it states that flashing a matching U-Boot to SPI flash is mandatory. Our installer runs the command to reflash U-Boot, although the one to flash to the image, not to the SPI flash. Not sure what it does exactly on this system where booting without SPI seems to be not possible? I'll check that when I'm home.

MichaIng avatar Nov 27 '22 19:11 MichaIng

Thank you. Look forward to your good news

Cheers!

chips023 avatar Nov 27 '22 19:11 chips023

hi MichaIng: is the any news?

thank u @MichaIng

chips023 avatar Dec 02 '22 10:12 chips023

I just checked the script, and as long it is not a specific board variant, flashing U-Boot is a no-op, so the dietpi-installer does not change anything that end:

DIR=/usr/lib/linux-u-boot-current-espressobin_22.11.1_arm64
write_uboot_platform () 
{ 
    if [[ $BOARD = macchiatobin-doubleshot ]]; then
        dd if=$1/flash-image.bin of=$2 bs=512 seek=1 status=noxfer > /dev/null 2>&1;
    else
        /bin/true;
    fi
}

However, I think I found it. Is the serial console device you access with on Armbian ttyMV0? This serial device name pattern is not part of the serial devices, enabled in dietpi-installer. You can check the used console device via:

tty

MichaIng avatar Dec 02 '22 20:12 MichaIng

hi~

root@wu:~# tty /dev/ttyMV0

Yes, I think the information I gave back was wrong. I used ttyMV0 instead of ttyS0 So Sorry I wonder if this issue can be fixed in dietpi-installer? I want to try dietpi~ Thank you

chips023 avatar Dec 03 '22 04:12 chips023

Seems so. Just to assure this really is the issue. After dietpi-installer has completed, run:

systemctl enable serial-getty@ttyMV0

and see whether you can now login as expected. If so, I'll add this serial device naming scheme to our scripts.

MichaIng avatar Dec 03 '22 12:12 MichaIng

Yes, so I can enter the system. Thank you, please add this serial device naming scheme to scripts.

systemctl unmask serial-getty@ttyMV0 && systemctl enable serial-getty@ttyMV0

 ─────────────────────────────────────────────────────
 DietPi v8.11.2 : Reboot required
 ─────────────────────────────────────────────────────
 - LAN IP : fe80::f2ad:4eff:fe08:0 (eth0)

 Default Login:
 Username = root
 Password = dietpi (or custom dietpi.txt entry)

 Please hit <return> to login


Debian GNU/Linux 11 DietPi ttyMV0

DietPi login:

chips023 avatar Dec 03 '22 17:12 chips023

cheers

chips023 avatar Dec 03 '22 17:12 chips023

The next problem is the network link. It seems that the IP address can not be obtained correctly After the system is installed and reboot, the network cannot be recognized Each reboot stays here for a long time, and I think this problem has something to do with not getting the network address PS: There is no such problem in armbian,Otherwise, the installation dietpi-installer script cannot be executed...

        Starting ifup for eth0...
[  OK  ] Finished Helper to synchronize boot up for ifupdown.
         Starting Raise network interfaces...
[  OK  ] Finished Raise network interfaces.
[*     ] A start job is running for ifup for eth0 (49s / 5min)

When I restart the network, the following message appears... Of course, I think it has something to do with not getting the IPv4 address correctly.

[ INFO ] DietPi-Config | Dropping network connections, please wait...
[ INFO ] DietPi-Config | Restarting network connections, please wait...
[  OK  ] DietPi-Config | Checking IPv4 network connectivity
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/f0:ad:4e:08:00:00
Sending on   LPF/eth0/f0:ad:4e:08:00:00
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

chips023 avatar Dec 03 '22 17:12 chips023