Difference between revisions of "Mounting RW image on VICE"

From Jay's Cafe' Wiki
m
m
 
(3 intermediate revisions by the same user not shown)
Line 19: Line 19:
dd if=/dev/sd<Letter> of=<raw image filename.img>
dd if=/dev/sd<Letter> of=<raw image filename.img>
</pre>
</pre>
To successfully mount the partitions, you need to know the offset. This is done by multiplying the valuse in the "Start" column by the I/O size, in this case, it is 512.
Prerequisite: kpartx
in Debian/Ubuntu:
<pre>
<pre>
Disk BayouBBS_SD8.img: 14.9 GiB, 15931539456 bytes, 31116288 sectors
sudo apt install kpartx
Units: sectors of 1 * 512 = 512 bytes
</pre>
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x10f541c2


Device             Start End Sectors Size Id Type offset =512*Start
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.
BayouBBS_SD8.img1 2048 69631 67584 33M b FAT32 1048576
<br>
BayouBBS_SD8.img2 69632 31115263 31045632 14.8G 5 Extended
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.
BayouBBS_SD8.img5 71680 139263 67584 33M b FAT32 36700160
BayouBBS_SD8.img6 141312 208895 67584 33M b FAT32 72351744
BayouBBS_SD8.img7 210944 278527 67584 33M b FAT32 108003328
BayouBBS_SD8.img8 280576 348159 67584 33M b FAT32 143654912
BayouBBS_SD8.img9 350208 417791 67584 33M b FAT32 179306496
BayouBBS_SD8.img10 419840 31115263 30695424 14.7G b FAT32 214958080


Capturing the card again, but individual partitions.<br>
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.
<hr />
The following, in part, is taken from https://unix.stackexchange.com/questions/9099/how-to-read-one-filesystem-from-a-whole-disk-image-file
<pre>
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
</pre>
</pre>

Latest revision as of 18:25, 8 July 2018

          • 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