Patrick Finnegan | 3 Mar 06:13 2008

Problems with disks on port-ofppc

So, I'm having some troubles while playing with port-ofppc.  I don't know 
if it's something that I did, or something that's just not right.

So, I'm trying to label and newfs a disk, but it seems like the raw devices 
don't work:

# disklabel sd0
disklabel: /dev/rsd0c: Device not configured
# disklabel /dev/rsd0c
disklabel: /dev/rsd0c: Device not configured
# disklabel /dev/sd0c
# /dev/sd0c:
type: SCSI
disk: DGHS
...
7 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   4096000     16191     4.2BSD      0     0     0  # (Cyl.      7*-   1886*)
 b:   4096000   4112191       swap                     # (Cyl.   1886*-   3765*)
 c:  17774160         0     unused      0     0        # (Cyl.      0 -   8153*)
 e:   9565969   8208191     4.2BSD      0     0     0  # (Cyl.   3765*-   8153*)
 g:     16128        63       boot                     # (Cyl.      0*-      7*)

-----------------
and for newfs...
-----------------
# newfs /dev/sd0a
newfs: /dev/sd0a: open for write: Device busy
# newfs /dev/rsd0a
newfs: /dev/rsd0a: open for read: Device not configured
(Continue reading)

Tim Rightnour | 3 Mar 07:53 2008
Picon

RE: Problems with disks on port-ofppc


On 03-Mar-2008 Patrick Finnegan wrote:
> So, I'm trying to label and newfs a disk, but it seems like the raw devices 
> don't work:
> 
># disklabel sd0
> disklabel: /dev/rsd0c: Device not configured

Thats really bizzare.  Do your device nodes for /dev/rsd match the ones from
/dev/sd ?

I'm not seeing anything like that on either of my boxes, and my disklabel looks
more or less similar to yours.  Only difference is that I have an fdisk setup
on mine.  I don't see why that should matter though.

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  77092848     22621     4.2BSD   2048 16384     0  # (Cyl.     22*-  76503*)
 b:   1049891  77115469       swap                     # (Cyl.  76503*-  77544)
 c:  78165360         0     unused      0     0        # (Cyl.      0 -  77544)
 e:     20480        63      MSDOS                     # (Cyl.      0*-     20*)
 f:        30     20543    unknown                     # (Cyl.     20*-     20*)
 g:      2048     20573       boot                     # (Cyl.     20*-     22*)

Partition table:
0: reserved (sysid 33)
    start 63, size 20480 (10 MB, Cyls 0-1/71/5)
1: NetBSD (sysid 169)
    start 22621, size 78142739 (38156 MB, Cyls 1/104/5-4865/144/63), Active
        PBR is not bootable: Bad magic number (0x6749)
(Continue reading)

Michael Lorenz | 3 Mar 13:40 2008
Picon

Re: Problems with disks on port-ofppc


Hello,

On Mar 3, 2008, at 01:53, Tim Rightnour wrote:

>
> On 03-Mar-2008 Patrick Finnegan wrote:
>> So, I'm trying to label and newfs a disk, but it seems like the  
>> raw devices
>> don't work:
>>
>> # disklabel sd0
>> disklabel: /dev/rsd0c: Device not configured
>
> Thats really bizzare.  Do your device nodes for /dev/rsd match the  
> ones from
> /dev/sd ?

What did yo use to create the device nodes? Maybe the numbers are  
(partially) wrong.

have fun
Michael
Patrick Finnegan | 3 Mar 17:20 2008

Re: Problems with disks on port-ofppc

On Monday 03 March 2008 01:53, you wrote:
> On 03-Mar-2008 Patrick Finnegan wrote:
> > So, I'm trying to label and newfs a disk, but it seems like the raw
> > devices don't work:
> >
> ># disklabel sd0
> > disklabel: /dev/rsd0c: Device not configured
>
> Thats really bizzare.  Do your device nodes for /dev/rsd match the
> ones from /dev/sd ?

I think so, but I'm not familiar enough with NetBSD to be sure.  Tim,
this is the kernel that you sent me, running off a nfs root on a Debian
Linux box.  I exploded the tarballs (except for the x11 stuff and 
kern-GENERIC.tgz) from 
ftp.netbsd.org:/pub/NetBSD-daily/netbsd-4/200802280000Z/ofppc/binary/sets

Here's an ls -l of the first few sd0/rsd0 device nodes in /dev (created
on mfs by whatever does that at boot):

crw-r-----  1 root  operator  15, 0 Mar  3 04:54 rsd0a
crw-r-----  1 root  operator  15, 1 Mar  3 04:54 rsd0b
crw-r-----  1 root  operator  15, 2 Mar  3 04:54 rsd0c
brw-r-----  1 root  operator   4, 0 Mar  3 04:54 sd0a
brw-r-----  1 root  operator   4, 1 Mar  3 04:54 sd0b
brw-r-----  1 root  operator   4, 2 Mar  3 04:54 sd0c
# mount | grep dev
mfs:3 on /dev type mfs (synchronous, local)

> I'm not seeing anything like that on either of my boxes, and my
(Continue reading)

Michael Lorenz | 3 Mar 17:32 2008
Picon

Re: Problems with disks on port-ofppc


Hello,

On Mar 3, 2008, at 11:20, Patrick Finnegan wrote:

> On Monday 03 March 2008 01:53, you wrote:
>> On 03-Mar-2008 Patrick Finnegan wrote:
>>> So, I'm trying to label and newfs a disk, but it seems like the raw
>>> devices don't work:
>>>
>>> # disklabel sd0
>>> disklabel: /dev/rsd0c: Device not configured
>>
>> Thats really bizzare.  Do your device nodes for /dev/rsd match the
>> ones from /dev/sd ?
>
> I think so, but I'm not familiar enough with NetBSD to be sure.  Tim,
> this is the kernel that you sent me, running off a nfs root on a  
> Debian
> Linux box.  I exploded the tarballs (except for the x11 stuff and
> kern-GENERIC.tgz) from
> ftp.netbsd.org:/pub/NetBSD-daily/netbsd-4/200802280000Z/ofppc/ 
> binary/sets
>
> Here's an ls -l of the first few sd0/rsd0 device nodes in /dev  
> (created
> on mfs by whatever does that at boot):
>
> crw-r-----  1 root  operator  15, 0 Mar  3 04:54 rsd0a
> crw-r-----  1 root  operator  15, 1 Mar  3 04:54 rsd0b
(Continue reading)

Havard Eidnes | 3 Mar 17:55 2008
Picon

Re: Problems with disks on port-ofppc

> I tihnk I see the problem - arch/powerpc/conf/majors.powerpc shows this:
> device-major    sd              char 13  block 4        sd
>
> so rsd* should be major number 13, not 15, which explains the errors  
> you get. No idea why that would happen though, must be a bug in the  
> script that populates /dev on mfs.

As far as I can see, init execs "sh /etc/MAKEDEV -MM init" (or
/etc/MAKEDEV if /dev/MAKEDEV doesn't exist, as would be the case
for the ramdisk images), and MAKEDEV is copied into the
installation ramdisk from ${DESTDIR}/dev/MAKEDEV during the build
as far as I can tell.

At least in my local build results, ofppc's MAKEDEV uses 13 for
the rsd device nodes, so I'm not sure how 15 got in there. The
etc/MAKEDEV.awk script appears to parse the various appropriate
majors.* files to pick up the correct values for the platform,
and judging by my local result it does this correctly.

Regards,

- Håvard

Tim Rightnour | 3 Mar 18:02 2008
Picon

Re: Problems with disks on port-ofppc


On 03-Mar-2008 Havard Eidnes wrote:
> At least in my local build results, ofppc's MAKEDEV uses 13 for
> the rsd device nodes, so I'm not sure how 15 got in there. The
> etc/MAKEDEV.awk script appears to parse the various appropriate
> majors.* files to pick up the correct values for the platform,
> and judging by my local result it does this correctly.

Yeah.. I did an upgrade install recently, and it worked fine.  IIRC the install
kernel uses mfs dev too, so it must have been OK there.

Oh.. I just realized where this all went wrong..

>> I exploded the tarballs (except for the x11 stuff and 
>> kern-GENERIC.tgz) from 
>> ftp.netbsd.org:/pub/NetBSD-daily/netbsd-4/200802280000Z/ofppc/binary/sets

Thats 4.0.  4.0 on ofppc is broke, and you are trying to install -current
kernel.  You need the tarballs from HEAD.

---
Tim Rightnour <root <at> garbled.net>
NetBSD: Free multi-architecture OS http://www.netbsd.org/
Genecys: Open Source 3D MMORPG: http://www.genecys.org/

Patrick Finnegan | 4 Mar 02:09 2008

Re: Problems with disks on port-ofppc

On Monday 03 March 2008 12:02, Tim Rightnour wrote:
> Thats 4.0.  4.0 on ofppc is broke, and you are trying to install
> -current kernel.  You need the tarballs from HEAD.

Any pointers to where that might be?  There aren't any ofppc directories 
that I can see under ftp.netbsd.org:/pub/NetBSD-daily/HEAD/

Pat
--

-- 
Purdue University ITAP/RCAC       --- http://www.rcac.purdue.edu/
The Computer Refuge               --- http://computer-refuge.org

Tim Rightnour | 4 Mar 05:29 2008
Picon

Re: Problems with disks on port-ofppc


On 04-Mar-2008 Patrick Finnegan wrote:
> Any pointers to where that might be?  There aren't any ofppc directories 
> that I can see under ftp.netbsd.org:/pub/NetBSD-daily/HEAD/

Sometimes the autobuilds have a bad week, and don't produce anything useable. 
Looks like ofppc had a few bad weeks in a row, and there isn't one up right now.

Email me off list and maybe I can set you up with one of my older ones, at
least for base.tgz and etc.tgz.

---
Tim Rightnour <root <at> garbled.net>
NetBSD: Free multi-architecture OS http://www.netbsd.org/
Genecys: Open Source 3D MMORPG: http://www.genecys.org/

Michael Lorenz | 4 Mar 05:33 2008
Picon

Re: Problems with disks on port-ofppc


Hello,

On Mar 3, 2008, at 23:29, Tim Rightnour wrote:

> On 04-Mar-2008 Patrick Finnegan wrote:
>> Any pointers to where that might be?  There aren't any ofppc  
>> directories
>> that I can see under ftp.netbsd.org:/pub/NetBSD-daily/HEAD/
>
> Sometimes the autobuilds have a bad week, and don't produce  
> anything useable.
> Looks like ofppc had a few bad weeks in a row, and there isn't one  
> up right now.
>
> Email me off list and maybe I can set you up with one of my older  
> ones, at
> least for base.tgz and etc.tgz.

A macppc userland might just work, IIRC there's nothing special in  
the ofppc one.

have fun
Michael

Gmane