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.