After apt upgrade VIM3 does not boot

Hello,

I’m using the
Fenix 1.6.9 Ubuntu 24.04 LTS Linux 5.15.119

My system is on EMMC.

After ‘apt update && apt upgrade’ the system
does not boot.

I saw that updater reconfigured some boot files:
update-initramfs: Generating /boot/initrd.img-5.15.119
but update process no output any errors.
After upgrade pkgs I have rebooted (sudo reboot).

My full log of booting here:
https://termbin.com/3m4v

Is it possible to fix boot problem (Kresque)?

Thank you in advance!

booting finished (than no eth link)
[burnup]Err:store_get_partition_size,L202:cmd [store  size init_boot 0x00000000d1dcd088 ] size failed Err imgread(L538):Fmt unsupported!genFmt 0x0 != 0x3
dwmac.ff3f0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
dwmac.ff3f0000: No link.
Retrieving file: /extlinux/pxelinux.cfg/00000000-0000-0000-0000-000000000000
dwmac.ff3f0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
dwmac.ff3f0000: No link.
Retrieving file: /extlinux/pxelinux.cfg/01-02-00-00-21-16-01
dwmac.ff3f0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
dwmac.ff3f0000: No link.

and than eth link and connectivity is up:

[burnup]Err:store_get_partition_size,L202:cmd [store  size init_boot 0x00000000d1dcd088 ] size failed Err imgread(L538):Fmt unsupported!genFmt 0x0 != 0x3
Speed: 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 10.78.0.16 (7 ms)
Using dwmac.ff3f0000 device
TFTP from server 10.78.0.1; our IP address is 10.78.0.16
Filename '/extlinux/extlinux.conf'.
Load address: 0x20000
Loading: T T T T T T T T T T 
Retry count exceeded; starting again
Speed: 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 10.78.0.16 (6 ms)
Using dwmac.ff3f0000 device
TFTP from server 10.78.0.1; our IP address is 10.78.0.16
Filename '/extlinux/extlinux.conf'.
Load address: 0x20000
Loading: T T

UPD:

With the Kresque shell (thanks for this function) it is possible to copy data
from /home/ to mounted usb stick, and filesystem /dev/mmcblkp1 is not damaged.

Hello @sergetsp

@ivan.li will help you later.

Hello @sergetsp
Are you using this firmware?
https://dl.khadas.cn/products/vim3/firmware/ubuntu/emmc/ubuntu-24.04/vim3-ubuntu-24.04-gnome-linux-5.15-fenix-1.6.9-240618-emmc.img.xz

I’m using the server edition

vim3-ubuntu-24.04-server-linux-5.15-fenix-1.6.9-240618-emmc.img.xz

@sergetsp
What else have you done? I can’t reproduce this problem here.

khadas@Khadas:~$ cat /etc/fenix-release 
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM3
VENDOR=Amlogic
VERSION=1.6.9
ARCH=arm64
INITRD_ARCH=arm64
INSTALL_TYPE=EMMC
IMAGE_VERSION=1.6.9-240618
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-2015.01-5.15-v1.6.9-release
LINUX_GIT_VERSION=khadas-vims-linux-5.15-v1.6.9-release
FENIX_GIT_VERSION=v1.6.9
#############################################

Thank you for you reply.

before upgrade process (apt upgrade) I try to install speedtest (with repo), but
after it I have disabled the ookla repo, and after apt update.

Here is my commands and log speedtest install process:
https://termbin.com/xc7r

I have disabled ookla repo (see below),
and try to update/upgrade khadas vim3,

Here is my full upgrade log, please look at this:::
https://termbin.com/2grh

In any case, may be exists repair methodics of khadas partitions (fsck, etc)
based on my boot log:
https://termbin.com/3m4v

@sergetsp

If you directly execute “apt update && apt upgrade” on your side, will the system fail to boot?

How I can execute? Vim3 does not boot. You can see my first log,
I don’t see login message.

Agter upgrade the packets I see in uboot part log:

get partition info failed !!

also

cfgload: no /boot.ini or empty file on mmc 0:1
cfgload: reading /boot/boot.ini from mmc 0:1 ...
card out
** Bad device mmc 0 **
cfgload: no /boot/boot.ini or empty file on mmc 0:1
cfgload: reading /boot.ini from mmc 1:1 ...
cfgload: no /boot.ini or empty file on mmc 1:1
cfgload: reading /boot/boot.ini from mmc 1:1 ...
cfgload: no /boot/boot.ini or empty file on mmc 1:1
cfgload: reading /boot/boot.ini from mmc 1:5 ...
** Invalid partition 5 **
cfgload: no /boot/boot.ini or empty file on mmc 1:5
cfgload: failed to read boot.ini on all partitions!

Also
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
222 bytes read in 6 ms (36.1 KiB/s)
Retrieving file: /splash.bmp
1:      Default
Enter choice: 1:        Default
Retrieving file: /initrd.img
emmckey_is_access_range_legal, keys 73760, keye 74785, start 48896, blkcnt 53964
Emmckey: Access range is illegal!
 ** ext4fs_devread read error - block
Skipping Default for failure retrieving initrd
SCRIPT FAILED: continuing...
Scanning mmc 1:2...
card out
** Bad device mmc 0 **
** Invalid partition 5 **
** Invalid partition 5 **
** Invalid partition 5 **
** Invalid partition 5 **
Bad Linux ARM64 Image magic!
** Unrecognized filesystem type **
** Unrecognized filesystem type **
** Invalid partition 3 **
** Invalid partition 4 **
** Invalid partition 5 **
** Invalid partition 6 **
** Invalid partition 7 **
** Invalid partition 8 **
** Invalid partition 9 **
** Invalid partition 10 **
** Invalid partition 11 **
** Invalid partition 12 **
** Invalid partition 13 **
** Invalid partition 14 **
** Invalid partition 15 **
** Invalid partition 16 **
** Invalid partition 17 **
** Invalid partition 18 **
** Invalid partition 19 **
** Invalid partition 20 **
** Invalid partition 21 **
** Invalid partition 22 **
** Invalid partition 23 **
** Invalid partition 24 **

Is it possible to fix partitions in Kresque? Or am I wrong?

Hello @sergetsp
Will reply to you later

Here is my additional info about current state:

I Kresque system I collected the data:

my emmc partition is OK:

root@Krescue:/# fsck.ext4 /dev/mmcblk1p1
e2fsck 1.44.5 (15-Dec-2018)
/dev/mmcblk1p1: clean, 53/64512 files, 25165/64512 blocks
root@Krescue:/# fsck.ext4 /dev/mmcblk1p2
e2fsck 1.44.5 (15-Dec-2018)
/dev/mmcblk1p2: clean, 87981/1875968 files, 1208139/7492044 blocks
root@Krescue:/# mkdir /my-mmcblk1p1
root@Krescue:/# mkdir /my-mmcblk1p2
root@Krescue:/# mount /dev/mmcblk1p1 /my-mmcblk1p1
root@Krescue:/# mount /dev/mmcblk1p2 /my-mmcblk1p2

4.1

root@Krescue:/# ls -la /my-mmcblk1p1
drwxr-xr-x    5 root     root          4096 Aug 18  2024 .
drwxrwxr-x   21 root     root           580 Jan 10 06:45 ..
-rw-r--r--    1 root     root            13 Jul  5  2024 .dtb.tmp
lrwxrwxrwx    1 root     root            16 Jul  5  2024 Image -> vmlinuz-5.15.119
-rw-r--r--    1 root     root       6091768 Jun 20  2024 System.map-5.15.119
-rw-r--r--    1 root     root        225145 Jun 20  2024 config-5.15.119
lrwxrwxrwx    1 root     root            12 Jul  5  2024 dtb -> dtb-5.15.119
drwxr-xr-x    3 root     root          4096 Jun 19  2024 dtb-5.15.119
lrwxrwxrwx    1 root     root            21 Jun 19  2024 dtb.img -> dtb/amlogic/kvim3.dtb
drwxr-xr-x    2 root     root          4096 Jun 19  2024 extlinux
lrwxrwxrwx    1 root     root            19 Aug 18  2024 initrd.img -> initrd.img-5.15.119
-rw-r--r--    1 root     root      27629946 Aug 18  2024 initrd.img-5.15.119
drwxrwxr-x    3 root     root          4096 Jul  5  2024 overlays
-rw-r--r--    1 root     root           603 Jul  5  2024 uEnv.txt
-rw-r--r--    1 root     root      34941440 Jun 20  2024 vmlinuz-5.15.119

4.2

root@Krescue:/# ls -la /my-mmcblk1p2
drwxr-xr-x   20 root     root          4096 Aug  1  2024 .
drwxrwxr-x   21 root     root           580 Jan 10 06:45 ..
lrwxrwxrwx    1 root     root             7 Apr 22  2024 bin -> usr/bin
drwxr-xr-x    2 root     root          4096 Feb 26  2024 bin.usr-is-merged
drwxr-xr-x    2 root     root          4096 Jul  5  2024 boot
drwxr-xr-x    2 root     root          4096 Jul  5  2024 dev
drwxr-xr-x  109 root     root          4096 Aug 18  2024 etc
drwxr-xr-x    4 root     root          4096 Jul  5  2024 home
lrwxrwxrwx    1 root     root             7 Apr 22  2024 lib -> usr/lib
drwxr-xr-x    2 root     root          4096 Apr  8  2024 lib.usr-is-merged
drwxr-xr-x    2 root     root          4096 Jun 16  2024 media
drwxr-xr-x    2 root     root          4096 Jul  5  2024 mnt
drwxr-xr-x    5 root     root          4096 Aug 17  2024 opt
dr-xr-xr-x    2 root     root          4096 Jan  1  1970 proc
drwx------    6 root     root          4096 Aug 18  2024 root
drwxr-xr-x    2 root     root          4096 Jul  5  2024 run
lrwxrwxrwx    1 root     root             8 Apr 22  2024 sbin -> usr/sbin
drwxr-xr-x    2 root     root          4096 Mar 31  2024 sbin.usr-is-merged
drwxr-xr-x    2 root     root          4096 Jun 16  2024 srv
dr-xr-xr-x    2 root     root          4096 Jan  1  1970 sys
drwxrwxrwt    2 root     root          4096 Jul  5  2024 tmp
drwxr-xr-x   11 root     root          4096 Jun 16  2024 usr
drwxr-xr-x   11 root     root          4096 Jun  7  2061 var

But on the boot partition I don’t see the boot.ini (not shure is mandatory file or not)

After this I have switch from kresque to my vim3 (poweroff, eject kresque SD, boot from emmc) and interrupt booting by Ctrl-C and go to uboot shell:

Collected data:

kvim3#store bootlog
Boot logs:
         bl2: 0
        fip: 0
kvim3#mmcinfo
card out
kvim3#showvar
HUSH_VERSION=0.01

It seems u-boot can not access to my emmc partition…

I don’t understand why it can not boot the kernel and
at the end of procedure it can try to load it from tftp.

Here is my current boot log:

https://termbin.com/cce9

Did you get the chance to look into this issue?
Let me know, if anything is required from me.

Hello @sergetsp
1.I tried the following steps but didn’t reproduce your problem.do you have other boards? can you provide steps to 100% reproduce this problem?

1. try to get install script of speedtest

tsp@tester:/opt/tester/bin/spdt$ wget https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh

tsp@tester:/opt/tester/bin/spdt$ ls -la
tsp@tester:/opt/tester/bin/spdt$ chmod 755 script.deb.sh 

2.

install speedtest repo settings

tsp@tester:/opt/tester/bin/spdt$ sudo ./script.deb.sh 
Detected operating system as Ubuntu/noble.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Detected apt version as 2.7.14
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/ookla_speedtest-cli.list...done.
Importing packagecloud gpg key... Packagecloud gpg key imported to /etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg
done.
Running apt-get update... done.

The repository is setup! You can now install packages.

3.

speedtest pkg not found:

tsp@tester:/opt/tester/bin/spdt$ sudo apt-get install speedtest
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package speedtest

4.

normal reboot:

tsp@tester:/opt/tester/bin/spdt$ sudo poweroff

Broadcast message from root@tester on pts/1 (Sat 2024-08-17 23:33:25 MSK):

The system will power off now!


5.

Rebooted OK.

root@tester:/opt/tester# apt update
Hit:1 http://dl.khadas.com/repos/vim3 noble InRelease
Hit:2 http://ports.ubuntu.com noble InRelease                      
Hit:3 http://ports.ubuntu.com noble-security InRelease             
Get:4 http://ports.ubuntu.com noble-updates InRelease [126 kB]         
Hit:5 http://ports.ubuntu.com noble-backports InRelease                           
Get:6 http://ports.ubuntu.com noble-updates/main arm64 Packages [342 kB]
Ign:7 https://packagecloud.io/ookla/speedtest-cli/ubuntu noble InRelease
Get:8 http://ports.ubuntu.com noble-updates/main armhf Packages [224 kB]
Get:9 http://ports.ubuntu.com noble-updates/universe armhf Packages [305 kB]  
Err:10 https://packagecloud.io/ookla/speedtest-cli/ubuntu noble Release       
  404  Not Found [IP: 13.56.23.197 443]
Get:11 http://ports.ubuntu.com noble-updates/universe arm64 Packages [316 kB]
Reading package lists... Done                             
E: The repository 'https://packagecloud.io/ookla/speedtest-cli/ubuntu noble Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


6.

I have disabled ookla speedtest repo
in /etc/apt/sources.list.d/ookla_speedtest-cli.list


apt update and upgrade my khadas 

(please, see  https://termbin.com/2grh )

2.According to the information provided, there is currently no suitable method.