ryankurte / docker-rpi-emu

QEMU and helper scripts in a docker container for emulating a raspberry pi environment
MIT License
109 stars 34 forks source link

trying to run raspbian-stretch-lite #15

Closed EngMarcoCaiazzo closed 5 years ago

EngMarcoCaiazzo commented 6 years ago

docker run -it --rm --privileged=true -v /Users/Marco/Downloads:/usr/rpi/images -w /usr/rpi ryankurte/docker-rpi-emu /bin/bash -c './run.sh images/2018-04-18-raspbian-stretch-lite.img /bin/bash' Attempting to mount images/2018-04-18-raspbian-stretch-lite.img to /media/rpi Attached base loopback at: /dev/loop0 Located partitions: p1 (/boot) at 8192 and p2 (/) at 98304 Closed loopback /dev/loop0 mount: /media/rpi/boot: overlapping loop device exists for /usr/rpi/images/2018-04-18-raspbian-stretch-lite.img.

EngMarcoCaiazzo commented 6 years ago

i do not really know why, but now it goes well

root@bcdda394c028:/usr/rpi# uname -a Linux bcdda394c028 4.9.87-linuxkit-aufs #1 SMP Fri Mar 16 18:16:33 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux root@bcdda394c028:/usr/rpi# ./run.sh images/2018-04-18-raspbian-stretch.img Attempting to mount images/2018-04-18-raspbian-stretch.img to /media/rpi Attached base loopback at: /dev/loop6 Located partitions: p1 (/boot) at 8192 and p2 (/) at 98304 Closed loopback /dev/loop6 Mounted to /media/rpi and /media/rpi/boot Bootstrapping Qemu root@bcdda394c028:/#

ryankurte commented 6 years ago

Hmmm that's really interesting, I wonder if the first image was corrupted?

jedahan commented 6 years ago

I'm running into this issue. Will try a new image soon.

ultimatecoder commented 5 years ago

I am facing the same issue. Is there any solution for this? Thanks!

ounis commented 5 years ago

I fixed the issue by commenting this line mount $1 -o loop,offset=$(($P1_START*$BLOCK_SIZE)),rw $2/boot in mount.sh See https://github.com/ounis/docker-rpi-emu/commit/d4c72ddf2b067e3f5220b2d85cf32e418c62bbf2#diff-2f0db0797571151e681c52a1c569f1f4L56

Build: https://travis-ci.org/ounis/docker-rpi-emu/builds/525945664

ryankurte commented 5 years ago

huh, interesting, afaik it should still be possible to mount both. are the block start or size calculations slightly wrong / overlapping on the new images perhaps?

ounis commented 5 years ago

I have no idea, I just traced the error to that line of code, and commented it, then the build didn't fail, no clue what that loop thing is good for :)

ryankurte commented 5 years ago

this is related to #18 and should now be resolved ^_^