DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default Block device required when mounting a floppy

I need to be able copy files with rsync to maintain the date of the file but when I try to mount using the command: mount /dev/rfd0Fc /mnt/floppy, I get a Block device required error. What do I do instead?
Reply With Quote
  #2   (View Single Post)  
Old 18th June 2018
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Try removing the leading 'r' from the device name, so /dev/fd0Fc. The rfdxx devices, known as "raw", are character devices, while the fdxx versions are block devices. This can be seen by doing a ls -l on them and looking at the first character of the attributes field: b will mean block, c means character.

BTW, welcome to the forum!
Reply With Quote
  #3   (View Single Post)  
Old 18th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

There is no "fd0Fc" drive nomenclature. For diskettes, which are not partitioned, the drive may be mounted with:

# mount /dev/fd0c /my/mount/point

or

# mount /dev/fd0a /my/mount/point

The choice of "c" is nominally correct, as "c" is always reserved for the entire physical storage device. But on diskettes and optical media, which do not have disklabel partitions, the partition "a" may be used for operational convenience.
Reply With Quote
  #4   (View Single Post)  
Old 18th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

How does one mount a partition? I tried the offset option but it's not supported, at least in my version. Also, is there a way to determine what the floppy device is, because it seems like it's randomly changing? I say that because at some point I tried fd0c and the device didn't exist but rfd0Fc worked.
Reply With Quote
  #5   (View Single Post)  
Old 18th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

I should mention that I copied a floppy disk image of OpenBSD to the floppy via dd to the fd0 device and the a: partition is formatted as the 4.2BSD filesystem while the c: and i: partitions are unused and MSDOS formatted respectively.

Quote:
Originally Posted by yetoo View Post
How does one mount a partition?
I think I answered my own question. The letter at the end of the device, /dev/fd0, signifies the partition label shown by disklabel. But, when I try to mount /mnt/floppy to /dev/fd0a, there is nothing in the directory. When I try to unmount the directory and/or the device, I get a message that the directory/device isn't mounted. I'll show the verbose output soon.

A question though, why doesn't disklabel display fd0 when used as an argument but only display when its partitions are used as arguments?
Reply With Quote
  #6   (View Single Post)  
Old 18th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

Here is the command and verbose output:
Code:
mount -v /mnt/floppy /dev/fd0a
/dev/wd0a (cd7c9e4f2c069850.a) on / type ffs (rw, local, ctime=Mon Jun 18 13:42:48 2018)

Last edited by ocicat; 19th June 2018 at 02:20 AM. Reason: Please use [code] & [/code] tags when posting command output.
Reply With Quote
  #7   (View Single Post)  
Old 18th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

  1. There is no partitioning on a diskette. Partitioning is used on mass storage drives: magnetic or solid state.
  2. Diskette geometry types should not normally be needed, but may be used if necessary, if the media size conflicts with BIOS.
  3. You appear to be attempting to use geometry type F. This is a 720KB diskette. Is that the media size you actually have?
  4. If the answer to 3 is "yes" then the drive may be mounted with /dev/fd0Fc or /dev/fd0Fa, if the BIOS drive size conflicts with the media you are using. My apologies for misleading you above, it has been decades since I've used a diskette.
Reply With Quote
  #8   (View Single Post)  
Old 18th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

No this is a 1.44 meg floppy drive.

This is my disklabel output on fd0 (I know I said it wouldn't work if I used this block device, but all of a sudden it started working without error):
Code:
# /dev/rfd0c:
type: vnd
disk: vnd device
label: fictitious
duid: 138b4f2a2e184426
flags:
bytes/sector: 512
sectors/track: 100
tracks/cylinder: 1
sectors/cylinder: 100
cylinders: 7382
total sectors: 2880
boundstart: 1024
boundend: 2880
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:           736256             1024  4.2BSD   2048 16384 16142 
  c:             2880                0  unused                    
  i:              960               64   MSDOS
I tried mounting the devices you provided and they don't mount either, but there is no error stopping it from mounting. The same output occurs in verbose output when mounting.

Last edited by ocicat; 19th June 2018 at 02:21 AM. Reason: Please use [code] & [/code] tags when posting command output.
Reply With Quote
  #9   (View Single Post)  
Old 19th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

For clarity, disklabels are for partitioning mass storage devices, but the disklabel nomenclature is used for diskettes and optical devices which do not normally have partitions. Use "c" for the entire drive, or use "a" on these devices. The result will be the same.

However, the output you posted (from disklabel) indicates that there *is* a disklabel on the device, which is unusual, and also unexpected. There are two disklabel partitions shown: an "a" partition formatted with the FFS filesystem, and an "i" partition with a FAT filesystem.

What is the source of your diskette image? It is not from the floppy63.fs image file.
Reply With Quote
Old 19th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

Maybe I screwed up and used the install63.fs instead. Either way I messed something up. For some reason, when I set the read only/write switch to close I can read and write to the diskette. But, when I set the switch to open I can only read. However, I think it is the opposite when I feed the floppy drive to an external floppy disk drive which is connected to my Linux machine via USB. I'm not sure because it's sporadic when I try to write to it in either state (on the Linux machine). During this testing process, I think I bent the corner of the floppy disk that has the switch so I don't know if I messed something up that way. When I edit the partitions with fdisk on the /dev/rfd0a character device, I was able to reinit the partitions to default values. The partition 4 is the only thing left on the diskette and it is of the type A6, OpenBSD. When I try to boot, I get a floppy disk type error and then a No O/S error as it attempted to boot from the MBR on the floppy disk using drive 0, partition 3. I expected this because the byte size was very low, but I'm just writing that here just in case. I don't have many other floppy disks to test with, but I can try finding them. Do you or anyone else have anything to add before I try to find another floppy drive?
Reply With Quote
Old 19th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by yetoo View Post
Maybe I screwed up and used the install63.fs instead.
Yes, that would make sense, as that mass storage image includes an EFI boot partition that is 960 blocks long, and the FFS partition is 736256 blocks long.

The floppy63.fs image is a 2880 sector (1.44MB) FAT filesystem containing only two files: OpenBSD's diskette bootloader and the OpenBSD RAMDISK kernel.

Is diskette media truly necessary?

OpenBSD/amd64 can be installed from USB-attached mass storage (such as memory sticks), from optical media (CD/DVD), or from Ethernet networks (PXE).
Reply With Quote
Old 19th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

It is necessary because both cd boot and boot disk doesn't want to work on the computer I am working with. I have yet to try PXE boot. I want to avoid it because I never seem to get it working, but it seems easier than correctly using dd to write a floppy image to a floppy. I have one more floppy that I'm going to try. If this doesn't work, then I will try the PXE boot.
Reply With Quote
Old 19th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

If CD or USB mass storage boot does not function, then a circumvention would be to move the hard drive to a platform that will boot from CD or USB storage, and move it back after installation has completed.
Reply With Quote
Old 19th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

The thing is that the drive is IDE and I have no working systems that have IDE cables for IDE data and IDE power molex 4 pin hard drive cable. Then you would say replace the hard drive. The only thing is that the motherboard has a 20 pin connector female on the motherboard and the only power supplies that I have that support both SATA and IDE and/or just SATA are 24 pin. I do not want to buy a 24 pin to 20 pin converter because I do not want to spend money.
Reply With Quote
Old 19th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

If you have an Ethernet LAN, a PXE-boot infrastructure is fairly simple. You only need to serve DHCP and TFTP, and they can be on the same platform.
Reply With Quote
Old 19th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

If I keep on getting read errors and input/output errors with floppy drives, could it be the floppy drive itself? What errors should I look for to determine if the errors are a floppy drive or diskette issue? Could the drive be damaging the diskettes?
Reply With Quote
Old 19th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Of course. Diskette uses physical contact on media. A damaged drive could of course destroy media. Media wear was the major cause of media failure during the era of diskette use.
Reply With Quote
Old 19th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

1. I insert a new floppy drive which I am sure the disk is set to write that has some hard errors and plain_io errors when looking at disklabel and mdir, but all of its contents eventually get displayed.
2. Its partition is 2880 bytes in an unused partition.
3. I execute the mformat command and there's input output errors and hard errors trying to write to the diskette.
4. I try to mount but it doesn't mount.
5. I try issuing the command sudo dd if=floppy63.fs of=/dev/fd0 conv=sync,noerror in my regular user profile.
6. Nothing is written to the disk.
6. I set the disk to read only and try a mformat with no results.
7. I try issuing the command sudo dd if=floppy63.fs of=/dev/fd0 conv=sync,noerror in my regular user profile again and nothing happens to the floppy.
8. I set the floppy to read and write and put it into my portable drive on Linux to find that it was formatted.
9. I try this command in a regular profile: sudo dd if=floppy63.fs of=/dev/sdk conv=sync,noerror.
10. I get an error stating that the disk is read-only.
11. I set the diskette to read-only and put it back into the drive.
12. I try the command: sudo dd if=floppy63.fs of=/dev/fd0 conv=sync,noerror.
13. I get this error:
dd: writing to '/dev/sdk': Operation not permitted
1+0 records in
0+0 records out
0 bytes copied, 0.000256277 s, 0.0 kB/s

What is your response? Now I will try to set up a tftp server for PXE.
Reply With Quote
Old 19th June 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

  • I don't run Linux, and have no operational guidance for managing diskette use on that OS. I have no idea if /dev/fd0 is the correct device. Perhaps a Linux user who still has diskette drives will post.
  • I/O errors are indicative of hardware problems, whether because you are using ancient media or because of drive problems, I cannot determine from the information presented here.
Since you have stated that all other media options (other than PXE) have been explored and have failed, I have questions.

  1. Is it possible this is a 32-bit only platform? (If so, then that might explain both USB disk and optical failures.)
  2. If it is a 64-bit capable platform, why has optical (CD/DVD) failed? What was the failure?
  3. If this system cannot boot USB devices ... are you sure that it is PXE capable? (If not, then deploying a PXE infrastructure would be a wasted effort.)

Last edited by jggimi; 19th June 2018 at 03:00 AM. Reason: typos
Reply With Quote
Old 19th June 2018
yetoo yetoo is offline
Port Guard
 
Join Date: Jun 2018
Posts: 17
Default

Quote:
Originally Posted by jggimi View Post
[*] Is it possible this is a 32-bit only platform? (If so, then that might explain both USB disk and optical failures.)
It could very well be possible, but every time I try a 32-bit medium it doesn't work either accept for a few select times. I need to keep on trying that though.

Quote:
[*]If it is a 64-bit capable platform, why has optical (CD/DVD) failed? What was the failure?
Currently under the assumption that it is 64-bit, one CD/DVD drive failed and the one that does works just doesn't boot from the medium.

Quote:
[*]If this system cannot boot USB devices ... are you sure that it is PXE capable? (If not, then deploying a PXE infrastructure would be a wasted effort.)
I need to look at the BIOS again, but I thought I saw that it was PXE capable.

EDIT 1: The computer is 32-bit, it has a 2.20 GHZ Pentium 4 processor and has the old colorful Intel logo.

Last edited by yetoo; 19th June 2018 at 04:59 PM. Reason: Confirmed information pertaining to the machine subject being 32-bit.
Reply With Quote
Reply

Tags
floppy, mount

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
QEMU on OpenBsd, mounting a vnd0 device PapaParrot OpenBSD Packages and Ports 15 21st April 2018 07:22 PM
HOWTO: mounting an USB device as normal non-root user in OpenBSD J65nko Guides 6 20th May 2017 12:03 PM
Netstart / Required Reboots on Interface Changes dylanz OpenBSD General 0 17th June 2010 05:48 PM
Dos batch file administrator privileges required a6zj6 Other OS 1 12th June 2009 02:02 PM
Required packages for running X enpey FreeBSD Ports and Packages 7 20th August 2008 09:16 AM


All times are GMT. The time now is 09:39 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick