hardillb / rpi-gadget-image-creator

Takes a standard Raspbian Lite image and adds USB Ethernet gadget config
https://www.hardill.me.uk/wordpress/2020/02/21/building-custom-raspberry-pi-sd-card-images/
Apache License 2.0
176 stars 31 forks source link

exit in line 11 of setup.sh? $OFFSET with two values? #10

Closed Modiug closed 8 months ago

Modiug commented 8 months ago

You introduced an exit in line 11 of setup.sh. So, the script actually does nothing.

Another thing: Trying to mount manually I see that for "2023-10-10-raspios-bookworm-armhf-lite.img" OFFSET looks like this:

$ OFFSET=$(fdisk -l 2023-10-10-raspios-bookworm-armhf-lite.img | awk '/^[^ ]*1/{ print $2*512 }')
$ echo $OFFSET
4194304 541065216

That $OFFSET with two values won't work with the mount command:

$ sudo mount -o loop,offset=$OFFSET 2023-10-10-raspios-bookworm-armhf-lite.img boot
mount: bad usage
Try 'mount --help' for more information.
hardillb commented 8 months ago

Should be fixed now.

The exit was a testing thing that slipped out, the other was something that only showed up with the new bookworm image.