Solved Trying to mount /dev/md14

file -s /dev/md14

/devmd14: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "*P%5!IHC" cached by Windows 9M, sectors/cluster 2, root entries 112, sectors 1440 (volumes <=32 MB), sectors/FAT 3, sectors/track 18, serial number 0x124b0cf8, label: "DISK 1", FAT (12 bit), followed by FAT

mount -o ro -t msdosfs /dev/md14 /media

mount_msdosfs: /dev/md14: Invalid argument
What am I missing?
 
What is md14? And what does its partition table look like?
Does "gpart show md14" show something?
It's just a random number, it could have been md1, md5 ....etc.

It looks like I have messed up with making things read only.

I think I've sorted it now.
 
It's just a random number, it could have been md1, md5 ....etc.

It looks like I have messed up with making things read only.

I think I've sorted it now.
Md devices are backed by something physical like RAM storage or a file loaded as virtual device. What's behind md14?
 
Here is another image I can't mount. Seems like '-t msdosfs' is not appropriiate.

file -s /dev/md0

/dev/md0: floppy image data (IBM SaveDskF), 2848 clusters, checksum 0x324f05f2, sectors 2775, 1st sector at 0x29

The image is from Disk 1 of PC-DOS_2000.iso
 
Here is another image I can't mount. Seems like '-t msdosfs' is not appropriiate.

file -s /dev/md0



The image is from Disk 1 of PC-DOS_2000.iso
What's the type of the first partition on md14? It should be FAT or FAT32, otherwise it's not compatible with MS-DOS. The partition table itself should be MBR.
If you know this information, you can check out ports to see if there's anything compatible. (I'd look at FUSE first) Also, any working PC floppy image should boot in emulators like Qemu.
qemu-system-i386 -m 32 -snapshot -fda <disk image>

I've seen FAT 12 once but I don't remembr what it was and if it somehow worked. Isn't that very old, like from the VMS time, late 70's?
 
those are not pure disk images
here is how to fix it

dd if=PCDOS_1.DSK of=z1.img bs=41 skip=1
dd if=/dev/zero bs=512 count=105 >> z1.img

now mdconfig z1.img and mount it

Code:
[root@utmbox ~/builds/other/z/IMAGES]# ls /mnt/
ATTRIB.EXE    COUNTRY.SYS    EGA.CPI        KEYB.COM    SETUP.INI    WINA20.386
AUTOEXEC.BAT    DEBUG.COM    EHELP.HLP    KEYBOARD.SYS    SETUP.MSG    XDF.COM
AV1        DISK.NUM    FDISK.COM    MEM.EXE        SETUP1.OVL    XDFCOPY.EXE
BLISTLAY.OUT    DISKCOPY.COM    FILES.TXT    MODE.COM    SETUP2.OVL
CHKDSK.COM    DISPLAY.SYS    FIXCHGLN.COM    PCM1        SETUP2.TXT
CHOICE.COM    E.EX        FORMAT.COM    QCONFIG.EXE    SETUP3.OVL
COMMAND.COM    E.EXE        IBMBIO.COM    README.TXT    SYS.COM
CONFIG.SYS    E.INI        IBMDOS.COM    SETUP.COM    UNPACK2.EXE
 
oh! there's a header on it. the mdconfig manpage suggests skipping the header using gnop create -o 41 md14 and then mounting the resulting md14.nop devicenvm that won't work
 
not sure if gnop can skip non sector multiple but if it works is better.
but you also need to pad it do the size of 2880 sectors otherwise wont work
 
What's the type of the first partition on md14? It should be FAT or FAT32, otherwise it's not compatible with MS-DOS. The partition table itself should be MBR.
If you know this information, you can check out ports to see if there's anything compatible. (I'd look at FUSE first) Also, any working PC floppy image should boot in emulators like Qemu.
qemu-system-i386 -m 32 -snapshot -fda <disk image>

I've seen FAT 12 once but I don't remembr what it was and if it somehow worked. Isn't that very old, like from the VMS time, late 70's?
If there are partitions they show up when running gpart show, but since none show up there are no partitions.
 
if you need to mount the other disks images use the same method just the padding size (2nd dd) will be different.
the final image has to have 2880 sectors to work (may probably use truncate instead of dd for padding)
 
here is how i did it
after the first failure (normal mdconfig on the original disk image) i fsck_msdos /dev/md0 and it complained on bad magic on last 2 bytes of the boot sector
those shoud be 0x55 0xaa. i hexdumped and saw they where 41 bytes down the road
the padding to original media size was by speculation (fsck worked and reported the number of files so i knew i was close)
 
Back
Top