How do you measure this boot time?
Yes, I am using Radxa Ubuntu 20.04.5 LTS with kernel 4.4.154-116-rockchip-g86a614bc15b3.
How do you measure this boot time?
Yes, I am using Radxa Ubuntu 20.04.5 LTS with kernel 4.4.154-116-rockchip-g86a614bc15b3.
My kernel is 5, not 4. I power the system, it takes 30 seconds until Linux starts showing boot messages, and then enters the main desktop screen. Until that moment, screen is dark.
I don’t know kernel in version 5. Maybe you use some services that has long start. Try using fresh image.
I just did the fresh image right now and it is still 30 seconds till boot. Image name: rockpi-4b-ubuntu-focal-server-arm64-20220801-0355-gpt from https://github.com/radxa-build/rockpi-4b/releases/tag/20220801-0227
Kernel version is 5.10.131-2-rockchip-g8802564cbf09
Use kernel options:
append earlyprintk console=tty1
to see the whole boot process.
Then you can see what slows it down.
I did
append earlyprintk console=tty1
On Kernel 4.4, it looks to be faster:
First 16 seconds are dark screen. From 16 to 20 are boot logs. After 20 seconds comes login screen.
On Kernel 5:
First 30 seconds are dark screen. From 30 to 40 are boot logs. After 40 seconds comes login screen.
Why so much time in dark screen. Is it normal?
I don’t have eMMC or SD card on Rock, only NVME.
What /var/log/syslog
says?
There is no directory/file called syslog in this path. Below you can find the screenshot showing contents of /var/log/ :
Try first running once unminimize
script to make written image working properly. Maybe at boot time (before login) the script is run and fails. Without syslog there can’t be much said about what happens in boot time.
Also run:
apt update
apt upgrade
for all packages after that reboot and search for syslog file.
Thank you. I’ll do apt-update & upgrade, meanwhile can you please tell me how to run unminimize script? If it is the one that expands the image file so that there is no unallocated space on storage device, lsblk shows that it is expaned (uses full memory).
I did update/upgrade. Unfortunately it didn’t help. There is still no file called syslog.
Only things that are found:
This is strange that you don’t have /var/log/syslog
file. Seems like this is imprinted in this kernel 5 image. To find unminimize
script do:
find / -name unminimize
There might be no such script in this image. I’ve tried this image recently and there was missing many things. I think it would be good advice to use older image with version 4 kernel.
EDIT: unminimize script is for getting ready whole image, all files on the file system to work properly, not only expand partition. Mostly it does the two commands I’ve shown you. Additionally it installs some other packages.
Thank you. I tried 4.4 image, there are no such files there as well. Image file: rockpi-4b-ubuntu-focal-server-arm64-20220401-0346-gpt from https://github.com/radxa-build/rockpi-4b/releases/tag/main-df04b3af
This is offical Radxa 4.4 Linux for Ubuntu Server
In the attached file you can find UART logs collected during boot via Putty. UART_LOGS.zip (16.6 KB)
If Radxa minimized this version 4 image that means you need to use older, bigger image.
Seems I can’t help you with that, because I used very old image over a year ago and still it is working properly since. Updated it and everything works fine.
That’s strange that version 4 kernel image is downsized too much.
7.6 seconds take place some init process as you can see in the log file. Later everything goes fine up to further 6.7-7.2 seconds which ends the log.
Nothing suspicious I can see in the log file.
Maybe NVMe is the problem that before Pi boots from it there is check for other media, which can take much time.
I have boot from microSD which redirects booting process to USB 3.0 SSD attached drive, so I have quick boot process. Also you can have newer Rock Pi which automatically boots from NVMe but it takes time. I would try to build microSD from which you will boot kernel and redirect to root file system on NVMe to boot it further.
That’s all I can help.
EDIT: For 4.4 image you need to unminimize it and update/upgrade to make syslog file visible as I remember. But if it is recent version - it may be too much minimized by Radxa. I don’t understand why Radxa is giving this kind of images.
I appreciate your help and time a lot. Thank you very much for helping this far. I will wait for more feedback from Radxa team.
The logs enumerated with time (0-7 secs) start 13 seconds after powering the board. That’s why it takes 20 seconds in case of Linux 4.4 in order to reach login screen.
I also think that maybe system looks for SD/eMMC image before NVME, but as I have read in the forum SPI flash has highest priority (and I believe SPI flash is responsible for NVME), so that is kind of strange.
By the way, my NVME is not connected through USB3, but directly through M.2. slot.
Anyway, thanks again, I will wait for Radxa’s response.