Preparing Linux
---------------
I have an H8 with Norberto's Z37 controller and a 3.5 inch 720k floppy
drive. You can use 1.4M drives as long as they will properly detect 720k
disks. I have a 1.4M drive in my Linux machine.
So we start with the drive specs for the Z37 on the H8 using CP/M:
3.5 Inch drive,
80 Tracks,
Double Density,
16 Sectors per Track,
256 Bytes per Sector
Capacity of 620k
Use format under CP/M, chose Double Density and Double Sided and format
a disk.
Now on your Linux machine, what you don't have Linux! Well it's about
time you stepped up to a better operating system don't you think:-)
First we make the device node:
You must choose an unused device number from the Geometry table below, I
chose device 20, it is listed as an 880k, 5.25" drive. I will never have
or use such a drive so I can easily replace the device node.
mknod /dev/fd0z620 b 2 80
^ ^ ^ ^
| | | Minor device number (format number * 4 +
| | | drive + controller*128)
| | Major device number (always 2!)
| Blockdevice
A name that you choose for the format. I
recommend to base the name on the capacity,
but you may choose any name you want.
I chose floppy device fd0 and added a z for z37 and 620 for the
capacity.
So to replace device 20 in the geometry table, I end up with device node
80 for my device. It works out like so (20*4+0+(0*128)) = 80
Then we redefine the geometry of the new device with setfdprm:
setfdprm /dev/fd0z620 sect=16 dd ssize=256 dtr=2 cyl=80
Finally we tell the floppy driver to autodetect the new format when
using just the short version of the Linux floppy device name, /dev/fd0
floppycontrol --autodetect 20,7,8,4
This says, try the z37 620k format first then, 720k,1440k and 2880k
If you want to restore the autodetection to default this is what it is:
floppycontrol --autodetect 7,8,4,25,22,31
Finished! Easy right. You can now happily use your floppy drive, well
at least until the next time you boot, then you will loose all your
changes. To make it permanent see the Boot Time section next.
Boot time
-----------
To make your settings stick you must tell Linux to set this up every
time you boot. Fortunately that is dead simple. Just put the commands
we just configured into your /etc/rc.local file and make sure it's
executable.
Step 1 - Add this to your /etc/rc.local file
mknod /dev/fd0z620 b 2 80
setfdprm /dev/fd0z620 sect=16 dd ssize=256 dtr=2 cyl=80
floppycontrol --autodetect 20,7,8,4
Step 2 - Make sure it's executable
chmod +x /etc/rc.local
Of course you must do all this as "root" or with the sudo command.
Copying images
--------------
You can now copy images of your floppies or make new floppies of an
image stored on your Linux box. What! You don't have Linux!!
Good old dd comes to the rescue here.
Make an image from the floppy:
dd if=/dev/fd0z620 of=<filename>
Copy image to floppy:
dd if=<filename> of=/dev/fd0z620
I use a file name that is descriptive and also has the format in it,
such as: h17-h37-cpm-2.2.04_z37-620k,img
Using the cpmtools package
--------------------------
You can use the cpmtools package to work with floppies under Linux.
Use your package manager and install cpmtools.
Add this to your /etc/cpmtools/diskdefs file
diskdef h37
seclen 256
tracks 80
sectrk 16
blocksize 2048
maxdir 256
boottrk 2
os 2.2
end
Now you can use the CP/M tools software to:
cmpls - list files on CP/M disks
cpmcp - copy files to and from CP/M disks
cpmrm - remove files on CP/M disks
cpmchmod - change file mode on CP/M files
cpmchattr - change file attributes on CP/M files
for example, to list the files on a disk:
cpmls -f h37 /dev/fd0z620
Because we set the autodetect list above you can now just use the base
device and not the full device name, like so:
cpmls -f h37 /dev/fd0
Geometry Table
--------------
This is the original Linux geometry table
1 360KB, 5.25" DD drive
2 1200KB, 5.25" HD drive
3 360KB, 3.5" DD drive
4 720KB, 3.5" DD drive
5 360KB, 5.25" DD disk in HD drive
6 720KB, 5.25" DD disk in HD drive
7 1440KB, 3.5" HD drive
8 2880KB, 3.5" ED drive
9 3120KB, 3.5" ED drive
10 1440KB, 5.25" HD drive
11 1680KB, 3.5" HD drive
12 410KB, 5.25" DD disk in HD drive
13 820KB, 3.5" DD drive
14 1476KB, 5.25" HD drive
15 1722KB, 3.5" HD drive
16 420KB, 5.25" DD disk in HD drive
17 830KB, 3.5" DD drive
18 1494KB, 5.25" HD drive
19 1743KB, 3.5" HD drive
20 880KB, 5.25" DD drive
21 1040KB, 3.5" DD drive
22 1120KB, 3.5" DD drive
23 1600KB, 5.25" HD drive
24 1760KB, 3.5" HD drive
25 1920KB, 3.5" HD drive
26 3200KB, 3.5" ED drive
27 3520KB, 3.5" ED drive
28 3840KB, 3.5" ED drive
29 1840KB, 3.5" HD drive
30 800KB, 3.5" DD drive
31 1600KB, 3.5" HD drive
Cheers everyone and happy imaging!!!
I'll put all this up on my web site when I get a chance.
http://h8trans.cowlug.org
George
All was going well until:
setfdprm /dev...
This command was not recognized on my Ubuntu 10.4 system.
-- ken
--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To post to this group, send email to se...@googlegroups.com.
To unsubscribe from this group, send email to sebhc+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sebhc?hl=en.
Sorry folks the setfdprm command is in the "fdutils" package.
A simple sudo apt-get install fdutils" will do it Ken.
Cheers
George
I had to upgrade with floppyutils. Now, setfdprm works.
-- ken
On Wed, 2012-01-18 at 19:16 -0500, Kenneth L. Owen wrote:
I have an Ubuntu (11.10) laptop. That's where I tried this first. When I
run setfdprm I get the error "/dev/fd0z620: no such device or address".
The device is there and has the right major and minor device numbers,
permissions etc. the floppy drive works; Ubuntu runs some kind of daemon
that watches the drive and automatically mounts it. When I put in, for
example, a DOS formatted diskette it detects it and pops up a file browser.
Perhaps this is interfering with access to the device? Anyone know how to
temporarily disable it?
I also have a fedora core system running on a Pentium III box. Its plenty
peppy but pretty old (ca. 2005). The problem there is that it has an older
version of setfdprm, one which has very different options. E.g. I don't
even see an option to set sector size (it seems fixed at 512). I suppose I
could update it but am not sure how to do that any more - I've gotten
spoiled by boxes that automatically update themselves. Suppose I could
download a gz file somewhere and manually install.
What I'd really like is to find a decent "plain" linux system that'll run
nicely on my old pIII system but is modern and up to date. I tried
downloading the latest Fedora ISO image but it is apparently now bloatware.
Sorry for the ramble. Any suggestions? What's a good lightweight linux
distro for someone who isn't trying to run all the glitzy desktop stuff?
George: what distro are you running?
Thanks for any help!
- Glenn
Preparing Linux
---------------
floppycontrol --autodetect 20,7,8,4
floppycontrol --autodetect 7,8,4,25,22,31
Boot time
-----------
chmod +x /etc/rc.local
Copying images
--------------
cpmls -f h37 /dev/fd0
Geometry Table
--------------
George
I'm running various versions of Ubuntu and Debian. The one I figured out
the setfdprm stuff on is a regular GNOME desktop of Ubuntu 10.10. I did
have to down grade Compiz but that was simple and it just concerned
desktop effects.
I would start with Debian and just install the base system. It's a very
nice minimal install but you can add everything you want after the fact
even a full blown desktop.
It's all nicely done with apt-get or aptitude. Debian has good docs on
the site as well and almost every thing documented about Ubuntu that is
not specific to their changes, can be done on Debian since that where
Ubuntu starts from.
Cheers
George
-----Original Message-----
From: se...@googlegroups.com [mailto:se...@googlegroups.com] On Behalf Of
George Farris
Cheers
George
mknod /dev/fd0z620 b 2 80
works fine but when I try to do:
setfdprm /dev/fd0z620 sect=16 dd ssize=256 dtr=2 cyl=80
I get /dev/fd0z620: No such device or address.
I also looked at the output from dmesg to see if it finds a floppy drive but
I see no evidence of that. the floppy drive is enabled in the BIOS because
previously this machine was able to see and mount the floppy drive (that was
with Ubuntu).
Could it be that the default kernel doesn't have floppy support enabled? Do
I have to build a custom kernel? Should I see a module in the output from
lsmod? (there's nothing that looks like floppy or fd)
Tx.
- glenn
-----Original Message-----
From: se...@googlegroups.com [mailto:se...@googlegroups.com] On Behalf Of
George Farris
Cheers
George
You should be able to do an lsmod and see if you have a floppy driver
loaded. I usually sort it so: lsmod | sort | less
If not try modprobe floppy or insmod floppy
Cheers
George
Tx. I’m trying loading it on another old machine I have. If that fails I may go to slackware…
For more options, visit this group at
http://groups.google.com/group/sebhc?hl=en.
--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sebhc/-/sGIfcgnH6nAJ.
To post to this group, send email to se...@googlegroups.com.
To unsubscribe from this group, send email to sebhc+un...@googlegroups.com.
I've switched to another system and so far so good. Will know more
tomorrow.
Thanks!
Too bad the install messed up my Win XP on that box (I want to dual boot).
The windows partition is still there but GRUB doesn't know about it.
another thing to fix...
steve