Ubuntu 22.04 on VIM1 doesn't boot

Hi,

I wonder if anybody got Ubuntu 22.04 working on a VIM1.

I tried the server images available here with linux 6.0 and 6.1: dl.khadas.com - Index of /firmware/vim1/ubuntu/generic/ and also built an image with the Fenix script (GitHub - khadas/fenix: One-stop script set to build Ubuntu/Debian images).

The VIM1 boots, shows the Khadas logo, then screen goes off, logo again… and it’s in that loop forever.

It’s working with Ubuntu 20.04 and just in case I’ve tried another card, power cable, etc. but it’s clearly not that. The other images work just fine.

Any tips on how to troubleshoot the problem would also be very welcomed.

This is the solution for those who may end up here asking themselves the same question.

The problem is that the images for Ubuntu 22.04 under the ‘generic’ folder (dl.khadas.com - Index of /products/vim1/firmware/ubuntu/generic/) which are meant to be for TF cards are in fact for eMMC.

However, those are not images that you would burn with the USB tool. Those are images that you burn with the handy oowow tool. Using oowow you can connect to the internet and download the images from dl.khadas.com - Index of /.images/vim1/ or you can download the image to a pendrive and burn it to the eMMC. I am not going to go into the details of how you go about either of those options but basically you need to burn the oowow image to a microSD card and boot from it, then the rest.

The Fenix script is what I guess they use to build those images, therefore they are also for the eMMC card (tested and confirmed). This is despite all the documentations and script saying to the contrary. It’s quite a shame that all that amount of work to put together so many pieces of code gets ruined by not documenting it at all or incorrectly. Or at least not keeping the documentation up to date.

Lastly, currently the pre-built images for Ubuntu and the Fenix script, use the linux kernel 6.1.y from the Khadas repository and their standard config file doesn’t include the nf_tables module. That is a massive problem in Ubuntu 22.04, and I imagine Debian 11, because it’s their default firewalling framework and according to my testing, the legacy iptables doesn’t work properly without it.

With a bit of editing, you can enable it, and then build the image with the Fenix script. I’m going to send a PR and hopefully they’ll enable it. The file is ./build/linux/arch/arm64/configs/kvims_defconfig and you have to add the following:

CONFIG_NF_TABLES=m
CONFIG_NF_TABLES_INET=y
CONFIG_NF_TABLES_NETDEV=y
CONFIG_NFT_NUMGEN=m
CONFIG_NFT_CT=m
CONFIG_NFT_CONNLIMIT=m
CONFIG_NFT_LOG=m
CONFIG_NFT_LIMIT=m
CONFIG_NFT_MASQ=m
CONFIG_NFT_REDIR=m
CONFIG_NFT_NAT=m
CONFIG_NFT_TUNNEL=m
CONFIG_NFT_OBJREF=m
CONFIG_NFT_QUEUE=m
CONFIG_NFT_QUOTA=m
CONFIG_NFT_REJECT=m
CONFIG_NFT_REJECT_INET=m
CONFIG_NFT_COMPAT=m
CONFIG_NFT_HASH=m
CONFIG_NFT_XFRM=m
CONFIG_NFT_SOCKET=m
CONFIG_NFT_OSF=m
CONFIG_NFT_TPROXY=m
CONFIG_NFT_SYNPROXY=m
CONFIG_NF_DUP_NETDEV=m
CONFIG_NFT_DUP_NETDEV=m
CONFIG_NFT_FWD_NETDEV=m
CONFIG_NFT_REJECT_NETDEV=m

They are also for TF card, but you need to clean up the eMMC storage.

Thanks, we will enable these options.

Hi, i give up with vim1. Only os i can install are unbutu18 and android with usb burning tool. I can install wowoo by booting sd card only if unbuntu 18 is installed.
With wowoo i install ubuntu 22 but after, the boot loop with messages about partition, it is to quick for i can read more. When looping i can’t boot from sd card or usb, i have to reinstall ubuntu 18 with usb burning tool and always the same.
The vim1 is unusable for me.

Hello @Pascal, which image have you tried to install using oowow ?

Hi,
i used https://dl.khadas.com/firmware/vim1/oowow/vim1-oowow-latest-sd.img.gz
I put on sd card with rufus.
My PC is on Windows11 OS

You have said you used Ubuntu 22, is it from images list from OOWOW ?

yes when i success to boot oowow, i use wizard to download ubuntu 22 and install it. But after reboot i got loop

@Pascal can you try this test image and verify if it works ?
Github - vim1-ubuntu–gnome-linux-6.2-fenix-1.5.2-231006-develop.img.xz

In case you want to try the server images, I built these:

Ubuntu 22.04
Debian 11

@Pascal it would help if you gave us a step-by-step account of what you are doing so we can maybe spot something you could try differently.

@Electr1
Thanks to try to help me.
I unzip vim1-ubuntu–gnome-linux-6.2-fenix-1.5.2-231006-develop.img.xz to vim1-ubuntu–gnome-linux-6.2-fenix-1.5.2-231006-develop.img
I try to import in usb burning tool but i have error


Then i burn with rufus file vim1-ubuntu–gnome-linux-6.2-fenix-1.5.2-231006-develop.img.xz on sd, i try to boot, but it loops on
image

@Pascal You need to flash that image to eMMC with OOWOW. it’s not suitable to use on SD card.

Please copy the downloaded .xz image to the dumps folder of the OOWOW sd card. then from OOWOW you can flash the image to the eMMC disk.

@mandolin
hi, your 2 links, are the same : vim1-ubuntu-22.04-server-linux-6.2-fenix-1.5.2-231004.img.xz
i have the same error like i have with Elect1 file (see post before) when i try to import in usb burning tool vim1-ubuntu-22.04-server-linux-6.2-fenix-1.5.2-231004.img
Then i burn vim1-ubuntu-22.04-server-linux-6.2-fenix-1.5.2-231004.img.xz on sd card with rufus, i try to boot and i have the same loop but when i do screenshot, i have capture un very quick message, maybe it can help

@Electr1
on sd card formated with OOWOW the is non ‘dump’ folder, do i need to create it at sd card root ?
if i create a folder, i can not upload img because there only some MO free.
I can not boot to sd with OOWOW, i have the same loop, i need before install ubuntu 18 with usb burning tools and after i could boot from sd to OOWOW

You cannot place it in the root folder, From oowow you can select the option to format the extra space of the SD card.

image
image

After doing these steps, you can remove the SD card to find the dumps partition appearing.

I’ve corrected the link to the Debian image but you’ll get the same error.

The process you’re following to flash the images is all wrong.

Another way of accessing the images from oowow is to copy them to another USB drive which you plug into the VIM1 after oowow boots. You mount it from Advance, Mount dumps storage SD/USB. That’s possibly easier IMHO.

According to another post, if you wipe/format the eMMC you can flash these images to the SD card and they would work, but I don’t remember if I ever tested this. Stick to eMMC for the time being I’d say.

@Electr1
When i try to format OOWOW storage sd i get error
image

@Pascal you can copy the image file into different USB disk and also flash the image using OOWOW, please check that way.

@mandolin
I put usb key in vim1, i ‘Format USB user storage disk’. I put key on my PC, i copy images. I put key in vim1 again.
I format eMMC
Then i ‘Write image to eMMC’, i choose partition where are images (USB-sda1-oowow_dump/’ ), i select image vim1-ubuntu-22.04-server-linux-6.2-fenix-1.5.2-231004.img.xz and then i install it.
I reboot, and now it loop on khadas logo
image

@Pascal can you please go to ‘8 Advanced’ and then ‘3 Internal eMMC storage’ and tell me what options you’ve got there? I’m looking for a way to wipe the eMMC before you flash it.

Also, when you boot after flashing, do you remove the SD card and any other USB memory? I think the boot sequence prioritises eMMC but just in case, you don’t want any other device that the VIM thinks can use to boot.