Subject: 2.0 Beta, Apple UFS
To: None <port-macppc@netbsd.org>
From: m. kolb <muk@bender.cl.msu.edu>
List: port-macppc
Date: 09/06/2004 11:26:03
Hi guys.

I got a new (second) disk for my quicksilver, and thought that I would
put netbsd 2.0 beta on it.  I also thought it would be neat to setup an
Apple UFS partition that I could share between OSX and netbsd.  So, I
used Apple's Disk Utility to cut the spare drive into two partitions,
both of Apple's type UFS.  I then used pdisk to chop the first partition
into slices of typle APPL_SRV2 (or whatever the AUX name is).  I
installed netbsd 1.6.2 no problem (newfs the slices, extracted the sets,
etc).  I then grabbed the src and built some sets for 2.0Beta.  I built
a kernel and tried to boot it. And it horked.  The problem looks
identical to
http://mail-index.netbsd.org/port-macppc/2004/06/11/0000.html

dbj@ followed up, but there is nothing further in the archives.  i'm
fairly certain this is a problem revolving around apple ufs as, if i
make the partition of type msdos, the thing boots.  anyways, here is the
pertinent debug info:

troll# ./pdisk /dev/wd1c
Edit /dev/wd1c -
Command (? for help): p

Partition map (with 512 byte blocks) on '/dev/wd1c'
 #:                type name                   length   base     ( size
)
 1: Apple_partition_map Apple                      63 @ 1       
 2:      Apple_Driver43*Macintosh                  56 @ 64      
 3:      Apple_Driver43*Macintosh                  56 @ 120     
 4:    Apple_Driver_ATA*Macintosh                  56 @ 176     
 5:    Apple_Driver_ATA*Macintosh                  56 @ 232     
 6:      Apple_FWDriver Macintosh                 512 @ 288     
 7:  Apple_Driver_IOKit Macintosh                 512 @ 800     
 8:       Apple_Patches Patch Partition           512 @ 1312    
 9:          Apple_Boot eXternal booter         17408 @ 1824     (
8.5M)
10:     Apple_UNIX_SVR2 root                   409600 @ 19232
(200.0M) S0 RUFS k0  /
11:     Apple_UNIX_SVR2 swap                  1048576 @ 428832
(512.0M) S1  SFS k0  (swap)
12:     Apple_UNIX_SVR2 tmp                   2097152 @ 1477408  (
1.0G) S2  UFS k0
13:     Apple_UNIX_SVR2 var                   2097152 @ 3574560  (
1.0G) S2  UFS k0
14:     Apple_UNIX_SVR2 home                  4194304 @ 5671712  (
2.0G) S2  UFS k0
15:     Apple_UNIX_SVR2 usr                  23788048 @ 9866016  (
11.3G) S2  UFS k0  /usr
16:          Apple_Boot eXternal booter         17408 @ 33654064 (
8.5M)
17:           Apple_UFS Apple_UFS_Untitled_3 24961856 @ 33671472 (
11.9G)
18:          Apple_Free                            16 @ 58633328

Device block size=512, Number of Blocks=58633344 (28.0G)
DeviceType=0x0, DeviceId=0x0
Drivers-
1:  23 @ 64, type=0x1
2:  36 @ 120, type=0xffff
3:  21 @ 176, type=0x701
4:  34 @ 232, type=0xf8ff


OF boot command i used was: boot hd:,ofwboot.xcf ultra1:10,/netbsd

troll# cat /etc/fstab
/dev/wd1a / ffs rw 0 0
/dev/wd1b none swap sw 1 1
/dev/wd1e /tmp ffs rw 1 2
/dev/wd1f /home ffs rw 1 2
/dev/wd1g /var ffs rw 1 2
/dev/wd1h /usr ffs rw 1 2


dmesg:
MNetBSD 1.6.2 (GENERIC) #0: Tue Feb 10 23:52:52 UT
C 2004
    autobuild@tgm.netbsd.org:/autobuild/netbsd-1-6-PATCH002/macppc/OBJ/autobuild
/netbsd-1-6-PATCH002/src/sys/arch/macppc/compile/GENERIC
total memory = 256 MB
avail memory = 225 MB
using 2048 buffers containing 13208 KB of memory
mainbus0 (root)
cpu0 at mainbus0: 7450 (Revision 2.1), ID 0 (primary)
cpu0: HID0 8450c0bc<EMCP,TBEN,NAP,DPM,ICE,DCE,SGE,BTIC,LRSTK,FOLD,BHT>
cpu0: 800.00 MHz
cpu0: 256KB L2 cache
uninorth0 at mainbus0
pci0 at uninorth0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer UniNorth AGP Interface (rev. 0x00)
ofb0 at pci0 dev 16 function 0: ATI Technologies Radeon 7500
ofb0: 1280 x 1024, 8bpp
wsdisplay0 at ofb0 kbdmux 1: console (std, vt100 emulation)
wsmux1: connecting to wsdisplay0
uninorth1 at mainbus0
pci1 at uninorth1 bus 0
pci1: i/o space, memory space enabled
pchb1 at pci1 dev 11 function 0
pchb1: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
obio0 at pci1 dev 23 function 0: addr 0x80000000
zsc0 at obio0 offset 0x13000: irq 22,23
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
i2s at obio0 offset 0x10000 not configured
adb0 at obio0 offset 0x16000 irq 47: pm_adb_op: timeout. command = 0x0
0 targets
aed0 at adb0 addr 0: ADB Event device
wdc0 at obio0 offset 0x1f000 irq 19: DMA transfer
wd0 at wdc0 channel 0 drive 0: <ST340016A>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 39097 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 80070686
sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1 at wdc0 channel 0 drive 1: <QUANTUM FIREBALLP LM30>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 28629 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 58633344
sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
(using
DMA data transfers)
wd1(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
(using
DMA data transfers)
wdc1 at obio0 offset 0x20000 irq 20: DMA transfer
atapibus0 at wdc1 channel 0: 2 targets
cd0 at atapibus0 drive 0: <PIONEER DVD-RW  DVR-104, MBDDC014342WL, A227>
type 5
cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(wdc1:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
wdc2 at obio0 offset 0x21000 irq 21: DMA transfer
wi0 at obio0 offset 0x30000 irq 57: 802.11 address 00:30:65:21:21:23
wi0: using Lucent Embedded WaveLAN/IEEE
wi0: Lucent Firmware: Station (4.16.1)
ohci0 at pci1 dev 24 function 0: Apple Computer KeyLargo USB Controller
(rev. 0x
00)
ohci0: interrupting at irq 27
ohci0: OHCI version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Apple Computer OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ohci1 at pci1 dev 25 function 0: Apple Computer KeyLargo USB Controller
(rev. 0x
00)
ohci1: interrupting at irq 28
ohci1: OHCI version 1.0
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: Apple Computer OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uninorth2 at mainbus0
pci2 at uninorth2 bus 0
pci2: i/o space, memory space enabled
pchb2 at pci2 dev 11 function 0
pchb2: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
fwohci0 at pci2 dev 14 function 0: Lucent Technologies product 0x5811
(rev. 0x00
)
fwohci0: interrupting at irq 40
fwohci0: OHCI 1.0, 00:03:93:ff:fe:6f:5e:ba, 400Mb/s, 2048 max_rec, 8
iso_ctx
gem0 at pci2 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x01)
gem0: interrupting at irq 41
gem0: Ethernet address 00:03:93:6f:5e:ba, 10KB RX fifo, 4KB TX fifo
brgphy0 at gem0 phy 0: BCM5421 1000BASE-T media interface, rev. 1
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
1000baseT-FD
X, auto
fw0 at fwohci0: 00:03:93:ff:fe:6f:5e:ba:0a:02:20:00:00:00:00:00
uhub2 at uhub1 port 1uhidev0 at uhub0 port 1 configuration 1 interface 0
uhub2: Mitsumi Electric Hub in Apple Extended USB Keyboard, class 9/0,
rev 1.10/
1.22, addr 2

uhidev0: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM), rev
1.10/3.00,
addr 2, iclass 3/1
uhub2: 3 ports with 2 removable, bus powered
ums0 at uhidev0: 3 buttons and Z dir.
wsmouse1 at ums0 mux 0
uhidev1 at uhub2 port 1 configuration 1 interface 0
uhidev1: Mitsumi Electric Apple Extended USB Keyboard, rev 1.10/1.22,
addr 3, ic
lass 3/1
ukbd0 at uhidev1: 8 modifier keys, 6 key codes
wskbd1 at ukbd0: console keyboard, using wsdisplay0
uhidev2 at uhub2 port 1 configuration 1 interface 1
uhidev2: Mitsumi Electric Apple Extended USB Keyboard, rev 1.10/1.22,
addr 3, ic
lass 3/0
uhidev2: 3 report ids
uhid0 at uhidev2 reportid 2: input=1, output=0, feature=0
uhid1 at uhidev2 reportid 3: input=3, output=0, feature=0
boot device: wd1
root on wd1a dumps on wd1b
root file system type: ffs

and finally, the disklabel:
troll# disklabel wd1
# /dev/rwd1c:
type: ESDI
disk: QUANTUM FIREBALL
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 58633344
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

11 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:    409600     19232     4.2BSD      0     0     0   # (Cyl.   19*-
425*)
 b:   1048576    428832       swap                      # (Cyl.  425*-
1465*)
 c:  58633344         0     unused      0     0         # (Cyl.    0 -
58167)
 d:     17408      1824    unknown                      # (Cyl.    1*-
19*)
 e:   2097152   3574560     4.2BSD      0     0     0   # (Cyl. 3546*-
5626*)
 f:   4194304   5671712     4.2BSD      0     0     0   # (Cyl. 5626*-
9787*)
 g:   2097152   1477408     4.2BSD      0     0     0   # (Cyl. 1465*-
3546*)
 h:  23788048   9866016     4.2BSD      0     0     0   # (Cyl. 9787*-
33386*)
 i:     17408  33654064    unknown                      # (Cyl. 33386*-
33404*)
 j:  24961856  33671472    unknown                      # (Cyl. 33404*-
58167*)
 k:        16  58633328    unknown                      # (Cyl. 58167*-
58167)
disklabel: boot block size 0
disklabel: super block size 0


(all this info was taken from the machine while running 1.6.2 (as per
the dmesg output))


Thanks for any help on this issue.  


./muk

-- 
m. kolb  <muk@bender.cl.msu.edu>