Qemu-img resize -raspios-bullseye-arm64-lite.qcow2 4g Qemu-img convert -f raw -O qcow2 -raspios-bullseye-arm64-lite.img -raspios-bullseye-arm64-lite.qcow2 # this replaces the above with the modified versionĮcho 'console=serial0,115200 console=tty1 root=PARTUUID=0ee3e8a8-02 rootfstype=ext4 fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet init=/usr/lib/raspi-config/init_resize.sh ' > boot/cmdline.txt # from console=serial0,115200 console=tty1 root=PARTUUID=0ee3e8a8-02 rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh #edit boot/cmdline.txt to load the usb ethernet drivers: modules-load=dwc2,g_ether Mount -o loop,offset=4194304 -raspios-bullseye-arm64-lite.img bootĮcho 'pi:$6$6jHfJHU59JxxUfOS$k9natRNnu0AaeS/S9/IeVgSkwkYAjwJfGuYfnwsUoBxlNocOn.5yIdLRdSeHRiw8EWbbfwNSgx9/vUhu0NqF50' > boot/userconf boot folder, so we can copy the kernel and dtb out of it, set the 'pi' password as 'raspberry', and ensure usb-ethernet drivers are loaded. # temporarily mount the disk image at the. # do this all as root, sudo isn't enuf for some bits.