On Wed, Apr 2, 2014 at 8:24 AM, Glen Slick <glen.slick at gmail.com> wrote:
On Apr 2, 2014 12:37 AM, "Roe Peterson"
<roe at liveblockauctions.com> wrote:
In this case, it's /dev/rra8a. Here's what happens with a freshly
formatted floppy:
# dd if=/dev/zero of=/dev/rra8a bs=512
write error: read only file system
2+0 blocks in
2+0 blocks out
#
Does it work if you dd from the rx33 instead of to it? Can you read the
entire disk doing that?
I vaguely remember making a minor modification somewhere in the kernel
source and rebuilding it when I wanted to dd an image to an entire disk.
There is some code somewhere that appeared to want to prevent write access
to the disklabel area. I'll have to see if I can find the details of what I
did there.
I think this is related to the routine partition_check() in the kernel
source file src/sys/sys/ufs_disksubr.c which is used, for example, by
the routine rastrategy() in the source file src/sys/pdpuba/ra.c
I'll have to see if I can find the copy of the source files where I
modified this to work around this issue when I needed to do this.
Possibly I just commented out this section of the partition_check()
routine:
/*
* Check for write to write-protected label area. This does not include
* sector 0 which is the boot block.
*/
if (bp->b_blkno + pi->p_offset <= LABELSECTOR &&
bp->b_blkno + pi->p_offset + sz > LABELSECTOR &&
!(bp->b_flags & B_READ) && !(dk->dk_flags &
DKF_WLABEL))
{
bp->b_error = EROFS;
goto bad;
}