*BSD News Article 69388


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!news.syd.connect.com.au!gidora.kralizec.net.au!not-for-mail
From: bde@zeta.org.au (Bruce Evans)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Wht does my dd to /dev/rsd1a claim it is read only?
Date: 25 May 1996 22:11:31 +1000
Organization: Kralizec Dialup Unix
Lines: 34
Message-ID: <4o6tdk$g5c@godzilla.zeta.org.au>
References: <31A4D266.41C67EA6@systemics.com>
NNTP-Posting-Host: godzilla.zeta.org.au

In article <31A4D266.41C67EA6@systemics.com>,
Gary Howland  <gary@systemics.com> wrote:

>I am running FreeBSD 2.1, and have two _identical_ (including the
>data) SCSI disks.  I am trying to use one disk as a nightly
>backup, but the following commands fails:
>
>	dd if=/dev/rsd0a of=/dev/rsd1a bs=4096k
>
>It fails with:
>
>	dd: /dev/rsd1a: Read-only fileystem
>	1+0 records in
>	0+0 records out

The whole disk (or whole slice) device /dev/rsd1c contains a write
protected label in its second sector.  /dev/rsd1a happens to overlap
/dev/rsd1c, so the write fails when it hits the label sector.

To copy the whole BSD slice, you could try

	dd if=/dev/rsd0c of=/dev/rsd1c bs=4096k

but this should fail for the same reason.  It might work if the target
slice is unlabeled (then the target device would have to be named
/dev/rsd1sN since c partitions don't exist on unlabeled slices).

To copy the whole disk, you could try

	dd if=/dev/rsd0 of=/dev/rsd1 bs=4096k

This bypasses the write protection on the label(s) (this is a bug),
-- 
Bruce Evans  bde@zeta.org.au