I have some .IMG files I want to copy to actual floppies. They are installer downloads I found here on NeXTcomputers.org for the QUIX Daydream.
What is the command I use in Terminal that will copy the .IMG to my internal floppy drive on the Cube?
I tried the following below but I must be off as it did not write anything to my floppy.
dd if=/UnTAR/kernel_n_app-v141.img of=/dev/fd0
My .IMG is in a folder at root called UnTAR
I am not sure that I have the of=/dev/fd0 correct. Maybe that is why it did not work. When I did it though, I got some output on screen that says.
2880+0 records in
2800+0 records out
I hear the hard drive reading but then it stops and I get the above text on screen. So, why is it not writing this to floppy?
tj
The floppy is fd0a....
Quotenextcube:3# ls *fd*
fd0a fd1a fdc0 rfd0a rfd0b rfd1a rfd1b
nextcube:4# ls -l fd*
brw-rw---- 1 root 1, 0 Nov 11 1994 fd0a
brw-rw---- 1 root 1, 8 Nov 11 1994 fd1a
crw-r--r-- 1 root 41, 64 Nov 11 1994 fdc0
I lost my scsi floppy so I forget how that shows up... Remember Mach likes to internalize it's stuff... so YMMV as it were....
Google around some, but if you check your /dev directory you'll have a 2.8MB file called fd0...
Well, I am closer now. adding an "a" at the end of my same command as earlier this time makes both the hard drive and floppy do some activity. It seems like the floppy is getting written to but when all is said and done, there is nothing on the floppy at all. hmmmmm.
tj
Quote from: "neozeed"The floppy is fd0a....
Quotenextcube:3# ls *fd*
fd0a fd1a fdc0 rfd0a rfd0b rfd1a rfd1b
nextcube:4# ls -l fd*
brw-rw---- 1 root 1, 0 Nov 11 1994 fd0a
brw-rw---- 1 root 1, 8 Nov 11 1994 fd1a
crw-r--r-- 1 root 41, 64 Nov 11 1994 fdc0
I lost my scsi floppy so I forget how that shows up... Remember Mach likes to internalize it's stuff... so YMMV as it were....
Google around some, but if you check your /dev directory you'll have a 2.8MB file called fd0...
Quote from: "NeXTsociety"Well, I am closer now. adding an "a" at the end of my same command as earlier this time makes both the hard drive and floppy do some activity. It seems like the floppy is getting written to but when all is said and done, there is nothing on the floppy at all. hmmmmm.
tj
Does the OS automount the floppy right after a dd operation? I'm not sure on that, but inserting a floppy should create under the root directory a mount directory where you can access the files of the floppy.
It was already mounted so it stayed mounted. The time it was not mounted already it asked for the floppy, did it's thing, but never mounted later. Actually on reboot the floppy showed bad and would not mount. I had to initialize it to use it again. Weird. Tj
Quote from: "Nitro"Apple has some good articles on creating floppies from images.
http://support.apple.com/kb/TA45687
http://support.apple.com/kb/TA45938
Thanks!
I will give this a whirl.
Funny how it shows rfdb at the end. Not sure if that is meant for NeXT hardware or Intel based running NeXTSTEP or what. My first thought was it would be fd0a. :lol:
I am learning all sorts of good stuff here!
tj
Quote from: "NeXTsociety"
Funny how it shows rfdb at the end. Not sure if that is meant for NeXT hardware or Intel based running NeXTSTEP or what. My first thought was it would be fd0a. :lol:
A file in /dev/ such as fd0a is a 'block special' device (the first letter in its permissions is 'b'). Any reads or writes that take place are done via the operating systems' caching or buffering mechanisms.
A file such as rfd0b is a 'character special' device (first letter in permissions is 'c'). Any reads or writes that take place are done directly to the device without using any operating system caching or buffering mechanisms, thus using character special devices is more efficient for large writes. In this instance, the 'r' translates to 'raw', denoting the lack of caching or buffering.
The reason why they use fd0b is non-trivial and is mostly down to disk labels.
The following is a disk label from a 3.5-in floppy formatted as 4.3BSD:
current label information on disk:
disk label version #3
disk label: my_photo
disk name: Floppy Drive-512
disk type: removable_rw_floppy
ncyls 80 ntrack 2 nsect 9 rpm 300
sector_size 1024 front_porch 96 back_porch 0
ngroups 0 ag_size 0 ag_alts 0 ag_off 0
boot blocks: #1 at 32 #2 at -1
bootfile: mach_kernel
host name: nova
root partition: a
read/write partition: b
part base size bsize fsize cpg density minfree newfs optim automount type
a 0 1344 8192 1024 32 2048 0% yes time yes 4.3BSD
(you would not believe how long it took me to find a floppy that would allow me to format it, all my floppies are 15 years old or older!)This tells us all sorts of useful information about the medium, such as its size and partition layouts -- e.g. we can see that partition 'a' takes up the entire disk.
However, disks that are factory-fresh or formatted to a different file system will not have a disk label (or will have an incompatible disk label), thus the disk will either be treated as unusable by the operating system or mounted as a different file system type (e.g. MS-DOS)
So, the BSD file system architecture includes a special partition called the 'live partition' to rectify this show-stopping problem. On floppies this partition is the 'b' partition and on hard disks it is the 'h' partition, and simply allows one to read and write to disks regardless of the validity or constraints of a disk label. The usual nomenclature is to call such a partition simply 'whole disk.'
So, by using /dev/rfd0b as the target for a 'dd' operation, we are telling 'dd' to use the live partition of the raw unit 0 floppy disk device, which will result in 'dd' being able to use what would could be an invalid/corrupt disk, and in a more efficient manner.
I hope that made sense :)
Note for BSD users. On 'recent' BSDs (e.g. 4.4BSD), hard disk partitions/slices work slightly differently: the 'a' partition is still the root, but 'b' is for swap and 'c' equates to a 'live partition.' Do not let this confuse you in regards to NeXTSTEP and OPENSTEP which does not follow that form of BSD disk label. ;)