Mounting RW image on VICE

From Jay's Cafe' Wiki
          • WARNING! This is a living document and information will change frequently. Please, subscribe for updates*****

Problem: Running ImageBBS v1.2a+ in VICE using tcpser incurs two problems: REL file corruption and datastream corruption using tcpser.

Hypothesis:

  1. Mount an msdos formatted image file or files to one or more of the available four drives to VICE. Method to be described below.
  2. Route emulated Swiftlink traffic to com port then have com port connected via TelBBS wire to a 2nd PC running BBS Server.

Thoughts:

  • Filesystem:
    • Mounting a directory in VICE allows the underlying operating system hosting VICE access to that directory. I feel this is what is causing the REL file difficulty. By mounting an "img" of the storage device, then access to the file system from the hosting system is denied. All access is through VICE.
  • Internet Connection:
    • I have witnessed datastream corruption in tcpser. The timing between VICE and the outside world doesn't work well consistently with tcpser. BBS Server is a known good. By routing the i/o through the host computers serial port then through the TelBBS wire, to a 2nd PC, you should be able to avoid this timing issue and provide a sustainable data stream.

Method: Run VICE v.3.2 on Ubuntu. Create SD Card with partitions using gparted. Partitions formatted as FAT32, 33MB. Block size of 512 Using DD, capture the image of the SD Card:

dd if=/dev/sd<Letter> of=<raw image filename.img>

Prerequisite: kpartx in Debian/Ubuntu:

sudo apt install kpartx

Using kpartx and a script I'm able to easily mount the partitions in read mode. I may have to put the partitions in fstab to grant permissions correctly as all my other efforts are failing.
What I'm reading leads me to believe it would be easier to split the image up into individual partitions, instead of the whole disk.

Capturing the card again, but individual partitions.
I think this is going to work. I plugged the SD card in and all the partitions automounted. I just have to make the machine do it now.


The following, in part, is taken from https://unix.stackexchange.com/questions/9099/how-to-read-one-filesystem-from-a-whole-disk-image-file

kpartx

sudo apt-get install kpartx
losetup -fs my.raw
sudo kpartx -a my.img
ls /dev/mapper

Output:

/dev/mapper/loop0
/dev/mapper/loop0p1

where loop0p1 is the first partition, so we can do:

mkdir -p d
sudo mount /dev/mapper/loop0p1 d