0

I would like to emulate the exact copy of the Rasp berry Pi OS on a virtual machine that can run on my jetson nano. I've found this tutorial and I tried to replicate it :

Building a Virtual machine with the .img file of the raspberry pi stretch

this is what happened :

root@zi-desktop:~/Desktop/Desktop_zi/Work/I9/Arm32# udisksctl loop-setup --file ./raspios/2021-03-04-raspios-buster-armhf-full.img --read-only

Mapped file ./raspios/2021-03-04-raspios-buster-armhf-full.img as /dev/loop1.

root@zi-desktop:~/Desktop/Desktop_zi/Work/I9/Arm32# lsblk -o name,label /dev/loop1

NAME LABEL

loop1

??loop1p1 boot

??loop1p2 rootfs

root@zi-desktop:~/Desktop/Desktop_zi/Work/I9/Arm32# sudo mount -o ro /dev/loop1p2 /media/zi/rootfs

root@zi-desktop:~/Desktop/Desktop_zi/Work/I9/Arm32# sudo tar c -C /media/zi/rootfs . | docker image import - raspios-full:buster

sha256 : 55d475ae76144b9ac360a457b2b3966fe7a3214755d605f10bb07fdee2618cfc

root@zi-desktop:~/Desktop/Desktop_zi/Work/I9/Arm32# docker image ls -aREPOSITORY TAG IMAGE ID CREATED SIZE

raspios-full buster 55d475ae7614 33 minutes ago 6.54GB

hello-world latest a29f45ccde2a 15 months ago 9.14kB

At this point the tutorial says to do this :

4. Allow your computer to emulate and run ARM binaries

docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3

ok,but where can I get that code ? because I tried :

docker run --rm --privileged docker/binfmt: 55d475ae76144b9ac360a457b2b3966fe7a3214755d605f10bb07fdee2618cfc

and :

docker run --rm --privileged docker/binfmt: 55d475ae7614

but :

root@zi-desktop:~/Desktop/Desktop_zi/Work/I9/Arm32# docker run --rm --privileged docker/binfmt:55d475ae7614

Unable to find image 'docker/binfmt:55d475ae7614' locally

docker: Error response from daemon: manifest for docker/binfmt:55d475ae7614 not found: manifest unknown: manifest unknown.

See 'docker run --help'.

root@zi-desktop:~/Desktop/Desktop_zi/Work/I9/Arm32# docker run --rm --privileged docker/binfmt:55d475ae76144b9ac360a457b2b3966fe7a3214755d605f10bb07fdee2618cfc

Unable to find image 'docker/binfmt:55d475ae76144b9ac360a457b2b3966fe7a3214755d605f10bb07fdee2618cfc' locally

docker: Error response from daemon: manifest for docker/binfmt:55d475ae76144b9ac360a457b2b3966fe7a3214755d605f10bb07fdee2618cfc not found: manifest unknown: manifest unknown.

See 'docker run --help'

Marietto
  • 101
  • 1
  • 1
  • 5

1 Answers1

1

You shouldn't replace the tag by the hash of your own image. The binfmt image is independent from your RPi OS image, the tag has nothing to do with your image hash.

You can get the tag of the latest binfmt version here: https://hub.docker.com/r/docker/binfmt/tags?page=1&ordering=last_updated

tttapa
  • 1,006
  • 6
  • 8