Subject: attaching a second disk (identical to the first)
To: None <port-sparc@sun-lamp.cs.berkeley.edu>
From: Daniel Carosone <danielce@ee.mu.oz.au>
List: port-sparc
Date: 08/18/1994 12:06:38
[I'm re-asking this because I didn't see my original post back, and
charles says majordomo ate port-sparc. apologies if you see both posts]

Is it currently possible to label a disk under netbsd/sparc?

I stole another st1480n from my linux pc to put in my 1+. Obviously,
it hasn't got a sunos label on it. I figured I could dd the first disk
onto the second and then newfs from there.

This doesn't work. The disk is recognised at boot time:

: esp0 at sbus0 slot 0 offset 0x800000 pri 3: ESP100, clock = 25 MHz, ID = 7
: tg1 at esp0 target 1
: sd1 at tg1 unit 0: SEAGATE ST1480   SUN0424 8628, 843284 512 byte blocks
: sd1: <SUN0424 cyl 1151 alt 2 hd 9 sec 80>
: sd1: sun_disklabel fails
: tg0 at esp0 target 3
: sd0 at tg0 unit 0: SEAGATE ST1480   SUN0424 8628, 843284 512 byte blocks
: sd0: <SUN0424 cyl 1151 alt 2 hd 9 sec 80>

but dd to /dev/rsd1c says `short write on character device'... it
keeps running, reading from the source disk, but nothing hits the
target disk at all. It looks like (somewhat understandably) it thinks
the partition c is 0 size.

Running sunos `format' with COMPAT_SUNOS doesn't find any disks. oh
well, worth a try.

Is there any way, under NetBSD, to access the basic disk device from
userspace without a label on it? Linux separates the whole-disk device
(eg /dev/sda) from the partitions (eg /dev/sda3), so, at a pinch I
could pull all the hardware apart, put both disks in the linux
machine, and copy them there. I can't do this for a few days, however,
so I thought I'd ask here - it seems like something NetBSD ought to be
able to do. I also can't put the disk in a sunos machine to label
without carting things around more than I'd like.

PS: one reason I wanted to do this was so that I could volunteer to
experiment with the netbsd bootblocks pk was talking about last
week. Since I have two identical disks, I can copy (ahem) and then
scramble one with out loss.

--
Dan.



------------------------------------------------------------------------------