This page is a wiki. Please login or create an account to begin editing.


16 posts / 0 new
Last post
Offline
Joined: 2012 Apr 1
Image a floppy under OS X?

I've looked long and hard for the procedure to dump a HFS floppy under OS X. (I'm under 10.5 now.)

I tried a $ dd if=/dev/disk1 of=~/disk2.img, and the result is a disk image, but it doesn't work if I write that same disk image back out again.

Anybody know the Terminal command for this?

Comments

Offline
Joined: 2010 Apr 10

Have you tried /dev/rdisk1 instead of /dev/disk1, the “raw” device?

Offline
Joined: 2010 Nov 19

Seems to work like below. I took and old HFS floppy "MDP Ulla" as source, target is "Mac".

Format floppy if needed:
Photobucket

Create dmg from source:
Photobucket

Write dmg to target floppy:
Photobucket

HTH!

Offline
Joined: 2012 Apr 1

Huh.

It appears there is an Advanced Image Options for Disk Utility (or Disk Copy, as appropiate) which allows a Disk Copy 4.2 option. I couldn't get it to work.

There could be a method with hdiutils, right?

I know you can create DC 4.2 images with the Advanced Image Options...I suppose then you could $ dd it. So dump it with .dmg, extract the contents, transfer to a new DC 4.2 image, then you'd be set?

IIGS_User's picture
Offline
Joined: 2009 Apr 8

If I remember right, there must be a Terminal command to enable more file formats to use the Advanced Image Options,
because I can't find this setting in the Preferences of the Mac OS X Disk Utility app(lication).

I know I used this before, but can't remember how.

Offline
Joined: 2010 Nov 19

Disk Utiity in 10.6.X Server can write NDIF .img, if that is what you are after.
I made some images for emulators that way.
There is a (fake?) DC4.2 setting too, never tried that. Images must be 400k, 720k, 800k or 1440k for this option.

10.6 can´t write files to HFS floppies, writing a .sit file to a FAT floppy does work, of course.

Offline
Joined: 2012 Apr 1

I was thinking of DC 4.2 compatible disk images. While .dmg as NDIF is probably workable, .image as DC 4.2 is just neater.

Further discussion?

MikeTomTom's picture
Offline
Joined: 2009 Dec 7

There was a recent discussion about similar floppy related problems here. Some of the ideas that emerged involved using hfsutils & other HFS utilities via Fink or MacPorts. Also using a classic Mac floppy disk utility via an emulated session (Bas II/Sheepshaver). There is also the "Penciler" walk-through for using "dd" to image HFS floppy media, which seems fairly comprehensive.

I think a fundamental stumbling block regarding writing exact Disk Copy 4.2 ".image" files from Mac OS X 10.5+ however, will be the Macintosh resource fork. As DC 4.2 always writes info to its own .image files, there.

Offline
Joined: 2012 Apr 1

I don't think you can mount USB FDDs under Basilisk II/SheepShaver?

EDIT: What about converting disk images (NDIF dumped) into DC 4.2 as here? https://developer.apple.com/library/mac/#documentation/Darwin/Reference/...

Offline
Joined: 2010 Nov 19

I don't think you can mount USB FDDs under Basilisk II/SheepShaver?

Yes - and no. Smile
The emulators made by Chris Bauer et al. were done before USB came up,
so they simply don´t know about this bus type.
Still it seems to be possible to mount a USB floppy at least on a OSX host with a emulated MacOS 7.5 or higher.
Mount your floppy in the host OS and define it as shared volume. Floppy should show up as Unix and is read/write on a Leopard host. In the bottom example I choose my "Mac" floppy with MacDraw Pro on it, mounted as Unix in Prefs as /Volumes/Mac. I copied a small "ReadMe first!" file to it to show its working.
Whatever it may be good for... Smile

Photobucket

Offline
Joined: 2009 Apr 18

There's a slightly different trick if you're on 10.5 or lower. Insert your floppy. When the icon shows up on 'Desktop'; start OS X 'Disk Utility'. In 'Disk Utility' mark your floppy then choose 'Remove from Desktop'. Now start Sheepshaver. After startup your floppy should be visible and usable from 'Desktop' within SS. You can also associate the floppy in the USB unit in SS' prefs. It's something like /dev/disk1 You can get the correct setting from OS X 'Disk Utility' with a floppy mounted in your USB device and getting info on it.

However I've never succeded in booting SS from a real floppy. But this can be done with BasiliskII. Go through the procedure with a bootable floppy in your USB floppy and removing it from OS X's Desktop. Start Bas and, after a while, it should be starting from the bootable diskette in your USB unit.

There was a few postings from the guy testing around this on the SS forums at emaculation.com some time ago

Offline
Joined: 2010 Nov 19

Thanks for sharing SwedeBear !
I seemd to have missed that thread on emaculation. Your trick for mounting USB floppies is of course far more elegant.
I had to add my drive in SSprefs as /dev/disk2s2 to let it show up.
Now lets see whether I can boot SS from a 120MB SUPER_Disk...

Works for me with an IMATION USB SuperDisk 120MB. I merely copied my System Folder to the SuperDisk. Maybe a possible way to prepare a boot ATA drive for an otherwise dead PPC Mac. USB to ATA adapters are fairly cheap, SCSI will be more difficult.

Photobucket

Offline
Joined: 2009 Apr 18

Now that's an idea! I've been lucky with my old Macs keeping a stack of replacement floppy drives and they're all SCSIs so the thought never occured to me. But if that works it should be a blessing to those trying to revive their old machines. Smile

Offline
Joined: 2012 Apr 1

There has to be a way to maintain integrity of files under OS X while imaging a disk, translating it, and writing it back out again.

I'll try that and see how it works -- but it wouldn't be the sort of thing I'd upload here or some place -- I'd use a genuine machine with an internal native FDD.

MikeTomTom's picture
Offline
Joined: 2009 Dec 7

Yes. Also with read/writing to HFS floppy media under emulation, you are limited to 1.4MB floppies only. This is a hardware limitation, not the emulators.

Using a genuine old Mac with an internal floppy disk drive is the only way to read/write 400k & 800k media.

Offline
Joined: 2012 Apr 1

Well I tried dumping it with Terminal, then using:

$ hdiutil convert ~/disk1t.dmg -format DC42 -o disk1u

Failed. Reason? Corrupt image. Huh. So then I tried using the Advanced Image Options of Disk Utility -- failed, corrupted image.