Create rootfs for the gateway DSGW-210

I tried the commands you suggested, but there are probably some missing commands. After loading the image using chroot you can use aptitude?

dd if=/dev/zero of=rootfs.img bs=1M count=4000

mkfs.ext4 -b 4096 rootfs.img

mkdir -p ./debian11

sudo mount rootfs.img ./debian11 -o loop

cd ./debian11

sudo debootstrap --foreign --arch arm64 bullseye . http://ftp.cn.debian.org/debian

sudo LC_ALL=C LANGUAGE=C LANG=C chroot .

apt-get update

apt-get upgrade libc6

apt-get install openssh-server

apt-get install net-tools

apt-get install sudo

apt-get install vim

Is there a command missing from this list?

First make sure the OS you’re using is ubuntu 20.04
Then type in the following commands

sudo cp /usr/bin/qemu-aarch64-static ./mnt/usr/bin/

One line was missing doing the chroot:

“/debootstrap/debootstrap --second-stage”

I think I finally was able to generate the rootfs, still doing some quick tests