Linux-u-boot-vim3-mainline_1.3-v2021.04_arm64.deb is broken

Which Khadas SBC do you use?

VIM3 Pro

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu Server 20.04 LTS

Which version of system do you use? Khadas official images, self built images, or others?

Installed from OOWOW (before Krescue)

Please describe your issue below:

I can’t run apt-get dist-upgrade anymore. We are using Ansible to manage nodes, so I need to shorten the logs for readability. The relevant lines are:

xxx | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "msg": "'/usr/bin/apt-get dist-upgrade ' failed: E: Failed to fetch http://dl.khadas.com/repos/vim3/pool/main/l/linux-u-boot-vim3-mainline/linux-u-boot-vim3-mainline_1.3-v2021.04_arm64.deb  File has unexpected size (599816 != 599856). Mirror sync in progress? [IP: 135.181.182.36 80]\n   Hashes of expected file:\n    - SHA256:81c666a6fb7169000aa2ccdd67d7a4833a14de673c5f57c7f202695b11821e2d\n    - SHA1:e62f96854b4b1522a4d40a931fde9c7cecfc4753 [weak]\n    - MD5Sum:200ff6119e79441dccc6de2135771165 [weak]\n    - Filesize:599856 [weak]\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n",
    "rc": 100,
    "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nCalculating upgrade...\nThe following packages will be upgraded:\n  fenix-updater-package-focal-vim3-mainline libnss-myhostname libpam-systemd\n  libsystemd0 libudev1 linux-board-package-focal-vim3\n  linux-dtb-amlogic-mainline linux-headers-amlogic-mainline\n  linux-image-amlogic-mainline linux-u-boot-vim3-mainline systemd systemd-sysv\n  udev\n13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 600 kB/36.5 MB of archives.\nAfter this operation, 2597 kB of additional disk space will be used.\nGet:1 http://dl.khadas.com/repos/vim3 focal/main arm64 linux-u-boot-vim3-mainline arm64 1.3-v2021.04 [600 kB]\nErr:1 http://dl.khadas.com/repos/vim3 focal/main arm64 linux-u-boot-vim3-mainline arm64 1.3-v2021.04\n  File has unexpected size (599816 != 599856). Mirror sync in progress? [IP: 135.181.182.36 80]\n  Hashes of expected file:\n   - SHA256:81c666a6fb7169000aa2ccdd67d7a4833a14de673c5f57c7f202695b11821e2d\n   - SHA1:e62f96854b4b1522a4d40a931fde9c7cecfc4753 [weak]\n   - MD5Sum:200ff6119e79441dccc6de2135771165 [weak]\n   - Filesize:599856 [weak]\n",
    "stdout_lines": [
        "Reading package lists...",
        "Building dependency tree...",
        "Reading state information...",
        "Calculating upgrade...",
        "The following packages will be upgraded:",
        "  fenix-updater-package-focal-vim3-mainline libnss-myhostname libpam-systemd",
        "  libsystemd0 libudev1 linux-board-package-focal-vim3",
        "  linux-dtb-amlogic-mainline linux-headers-amlogic-mainline",
        "  linux-image-amlogic-mainline linux-u-boot-vim3-mainline systemd systemd-sysv",
        "  udev",
        "13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.",
        "Need to get 600 kB/36.5 MB of archives.",
        "After this operation, 2597 kB of additional disk space will be used.",
        "Get:1 http://dl.khadas.com/repos/vim3 focal/main arm64 linux-u-boot-vim3-mainline arm64 1.3-v2021.04 [600 kB]",
        "Err:1 http://dl.khadas.com/repos/vim3 focal/main arm64 linux-u-boot-vim3-mainline arm64 1.3-v2021.04",
        "  File has unexpected size (599816 != 599856). Mirror sync in progress? [IP: 135.181.182.36 80]",
        "  Hashes of expected file:",
        "   - SHA256:81c666a6fb7169000aa2ccdd67d7a4833a14de673c5f57c7f202695b11821e2d",
        "   - SHA1:e62f96854b4b1522a4d40a931fde9c7cecfc4753 [weak]",
        "   - MD5Sum:200ff6119e79441dccc6de2135771165 [weak]",
        "   - Filesize:599856 [weak]"
    ]
}

This looks like a server or package content issue to me - any clues?

Easy fix which I found today:

Download the 1.3 package. I downloaded through Chrome and WinSCP’d the file to the VIM3.

You could probably just do:

wget https://dl.khadas.com/repos/vim3/pool/main/l/linux-u-boot-vim3-mainline/linux-u-boot-vim3-mainline_1.3-v2021.04_arm64.deb

sudo dpkg -i linux-u-boot-vim3-mainline_1.3-v2021.04_arm64.deb

That should let you install it without issues. Worked for me and survived a reboot as well.

It is fixed now, can you try again?

I just run apt-get dist-upgrade via Ansible again and the same issue is still present - unfortunately.

Please run sudo apt update first.

Sorry for not being more explicit: In fact, we do that. However, nothing has changed - the command is still failing with the exact same output. I even ran apt-get clean - the result is still the exact same error message.

Hello @christian5271

Could you tell me what’s your current image? Please post the result of cat /etc/fenix-release.

$ cat /etc/fenix-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM3
VENDOR=Amlogic
VERSION=1.1.1
ARCH=arm64
INITRD_ARCH=arm64
INSTALL_TYPE=SD-USB
IMAGE_VERSION=1.1.1-220725
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-v2015.01-v1.1.1-release
LINUX_GIT_VERSION=khadas-vims-linux-4.9-v1.1.1-release
FENIX_GIT_VERSION=v1.1.1
#############################################

Hello @christian5271

Just check on my side with a fresh installation fo image vim3-ubuntu-20.04-server-linux-5.18-fenix-1.1.1-220725.img.xz and it works now, could you please check again?

sudo apt-get update
sudo apt-get dist-upgrade
1 Like

It works again - awesome! Thank you so much!

Also having the same issue but with Ubuntu 22.04

Err:1 dl.khadas.com - Index of /repos/vim3/ jammy/main arm64 linux-u-boot-vim3-mainline arm64 1.3-v2021.04
File has unexpected size (599856 != 599816). Mirror sync in progress? [IP: 135.181.182.36 80]
Hashes of expected file:

  • SHA256:e92c7edc9298274a9d3bcfe8e09873e3499dc1aea7b70533029f48cd27c3d06f
  • SHA1:808de864b19be841909414964c83b5f8eba0559f [weak]
  • MD5Sum:5b74617f3875a8d786c6e12c2be2d28b [weak]
  • Filesize:599816 [weak]

cat /etc/fenix-release

# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM3
VENDOR=Amlogic
VERSION=1.3
ARCH=arm64
INITRD_ARCH=arm64
INSTALL_TYPE=SD-USB
IMAGE_VERSION=1.3-221118
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-v2015.01-v1.3-release
LINUX_GIT_VERSION=v5.19-rc5-17764-ge0fc1fe
FENIX_GIT_VERSION=v1.3
#############################################

Hello @fengrun

Just remake the repo, it should be fine now.

@numbqq Thanks for the quick fix