• Please review our updated Terms and Rules here

Mounting a unix v6 disk image on linux?

dluck

Experienced Member
Joined
Feb 8, 2015
Messages
138
Location
Campbell, CA
I have some Idris 640k disk images that are look very similar to unix v6 format. If I can convert the image to v6 is their a tool that will allow me to mount the disk image as a v6 format? Alternatively is there a tool that will convert v6 to a modern format? Or maybe a utility that would let me browse it and extract files?

As an aside I tried to search for a posting with unix v6, and the website rejected v6 because it was too short. Thats just plain silly. It would have trimmed down the thousands of results that included unix.
 
I have some Idris 640k disk images that are look very similar to unix v6 format. If I can convert the image to v6 is their a tool that will allow me to mount the disk image as a v6 format? Alternatively is there a tool that will convert v6 to a modern format? Or maybe a utility that would let me browse it and extract files?

As an aside I tried to search for a posting with unix v6, and the website rejected v6 because it was too short. Thats just plain silly. It would have trimmed down the thousands of results that included unix.

Hmmm... Funny, google produces about 16 results....

https://letmegooglethat.com/?q=site:forum.vcfed.org+"unix+v6"
 
Hmmm... Funny, google produces about 16 results....

https://letmegooglethat.com/?q=site:forum.vcfed.org+"unix+v6"
That does produce results for the query, unfortunately the results just indicate there is nothing that does what I'm looking for.
Thats, ok. I've modified some github code I found that was a reasonable enough start/framework and just needed some fixing up.
I can now browse around an Idris file image, cat files, and copy single files out to linux Woohoo, looking at my Amiga src code from 1983.
 
  • Like
Reactions: smj
I see you already solved the problem, but for posterity, NetBSD can do this.


This combined with the vnd pseudo-device allows mounting a v7 filesystem from a file.

Out of curiosity, could you post a link to the Github code you found?
 
Linux also contains a file system driver for V7 (mount -t v7 .....), but I could not mount a UNIX V6 disk image with it.
 
The filesystems are not identical, for instance V7 introduces the concept of multiplexed files for which some changes/additions to inode structure and fields were required. The document "Setting Up UNIX - Seventh Edition" includes guidance for migrating from a Sixth Edition filesystem to a Seventh Edition, implying that the two are not inherently compatible:

Converting Sixth Edition Filesystems
The best way to convert file systems from 6th edition (V6) to 7th edition (V7) format is to use tar(1). How-
ever, a special version of tar must be prepared to run on V6. The following steps will do this:

1. Change directories to /usr/src/cmd/tar
2. At the shell prompt respond

make v6tar

This will leave an executable binary named ‘v6tar’.
3. Mount a scratch tape.
4. Use tp(1) to put ‘v6tar’ on the scratch tape.
5. Bring down V7 and bring up V6.
6. Use tp (on V6) to read in ‘v6tar’. Put it in /bin or /usr/bin (or perhaps some other preferred location).
7. Use v6tar to make tapes of all that you wish to convert. You may want to read the manual section on
tar(1) to see whether you want to use blocking or not. Try to avoid using full pathnames when making the
tapes. This will simplify moving the hierarchy to some other place on V7 if desired. For example

chdir /usr/ken
v6tar c .

is preferable to

v6tar c /usr/ken

8. After all of the desired tapes are made, bring down V6 and reboot V7. Use tar(1) to read in the tapes just
made.
 
I see you already solved the problem, but for posterity, NetBSD can do this.


This combined with the vnd pseudo-device allows mounting a v7 filesystem from a file.

Out of curiosity, could you post a link to the Github code you found?

This appears to be a students effort to complete an assignment to read a v6 filesystrem volume.
I started with that to see how it would do with my 640k image file.
There are several problems with the code, and the code I have now iis from rewritting large parts of the code.
Fortunately I have documents describing the filesystem layout for Idris which is pretty close to v6.
From an Idris 640k floppy volume that I've read using my Stride box and then uploaded to my linux box I can now browse the image, ls directories, I added a command to longlist which is just listing with filesize and dates, yes I see dates in 1983 and 1984.
I can write files out to the linux filesystem for use.
Since the code has basic ability to move around in the Idris/V6 filesystem and can write out single files, either add the ability to transfer all files in a directory, or maybe just create a v7 image from the v6 image. Then this could be mounted on modern linux.
If the BLOCK_SIZE for V7 can be fixed at 512 all that would be needed
1. Convert the v6 superblock to v7
2. convert inodes from v6 to v7
Do I need to convert blk ptrs from 16 to 32 bits?
Do I need to convert inode numbers from 16 to 32?
 
Hmm, I'll check out retro-fuse, maybe all the works been done. Although I think Idris is not exactly v6, maybe making retro-fuse work with Idris is a better idea.
 
The actual V6 kernel code is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V6/usr/sys/ken

alloc.c contains code for initializing the superblock and allocating inodes. nami.c has the path-to-inode algorithm. fio.c is then managing the file descriptors relationship to inodes. Finally iget.c has the code for retrieving inodes from the disk driver itself. Between all this you may be able to clobber together a userland driver for this filesystem.
 
The actual V6 kernel code is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V6/usr/sys/ken

alloc.c contains code for initializing the superblock and allocating inodes. nami.c has the path-to-inode algorithm. fio.c is then managing the file descriptors relationship to inodes. Finally iget.c has the code for retrieving inodes from the disk driver itself. Between all this you may be able to clobber together a userland driver for this filesystem.
This will be useful if it comes time to me wanting to transfer files back to Idris. But I've not brought up Idris yet on the Stride 460. When David sends my Save IVs back to me I'm ho[ping to have a working Idris system, then.
 
Back
Top