Long story short,
Also, I believe all modern DEs are able to handle partitioned disk images out of the box, but I assume you want to do it on the MiSTer itself to avoid copying large image files (works with any Linux system with any supported partition/filesystem).
Updated 2023-08-13 to reflect important remarks from pgimeno.
In other words:
- Set up loopback devices reflecting image partitions:
Code: Select all
/media/fat/games/ZXNext# losetup --show -Pf boot.vhd
- If necessary (or if you get distracted ), double check that everything was detected properly (you can this any time):
Code: Select all
/media/fat/games/ZXNext# losetup -a
/dev/loop0: 0 /media/fat/linux/bluetooth
/dev/loop1: 0 boot.vhd
/dev/loop8: 0
- Just mount it and do whatever you like (NOTE: you mount partition device loop1p1, not the entire loop device)
Code: Select all
/media/fat/games/ZXNext# mount /dev/loop1p1 /mnt/
/media/fat/games/ZXNext# ls /mnt/
demos dot games nextzxos sys TBBLUE.TBU tools
docs extras machines rpi TBBLUE.FW tmp
- PROFIT. But NEVER start the core when the image partition is mounted!!!
- When done, unmount the partition:
Code: Select all
/media/fat/games/ZXNext# umount /mnt/
- And do not forget to release allocated loop device:
Code: Select all
/media/fat/games/ZXNext# losetup -a
/dev/loop0: 0 /media/fat/linux/bluetooth
/dev/loop1: 0 boot.vhd
/dev/loop8: 0
/media/fat/games/ZXNext# losetup -d /dev/loop1
There are technically correct, but completely obsolete guides on those internetz, suggesting to calculate partition(s) offset(s) and explicitly specify it when calling losetup. That's no longer necessary for many years.