Subject: Re: NetBSD on PW G3 locks up hard
To: David Wetzel <dave@turbocat.de>
From: Andreas Wrede <andreas@planix.com>
List: port-macppc
Date: 08/01/2000 09:57:26
On Tue, 1 Aug 2000, David Wetzel wrote:

> > From: Manuel Bouyer <bouyer@antioche.lip6.fr>
> 
> > I've finally managed to get NetBSD on a powerbook G3 (G3 bronze with 128MB
> > RAM), on the same drive as MacOS. I'm booting from HD using 'boot
> > hd:,netbsd'
> 
> Hm. according to the FAQ, shared partitions are not supported.
> Is this now possible without major hacking sessions over a day?
> 
> I have an PB G3 Wallstreet without floppy, black Keyboard and 128 mb. I  

I have a PB G3 Series (bronze keyboard) and it can tripple boot
MacOS9, MacOS10 DR4 and NetBSD 1.5B.

I used MacOS9's Drive Setup utility to create the the different
partitions:
	a HFS+ partition for MacOS9
	a HFS+ partition for MaxOS10
	a HFS (small) partition as a boot helper partition for ofwboot.
	a A/UX Root (Apple_UNIX_SVR2) partition for NetBSD /
	a A/UX Swap (Apple_UNIX_SVR2) partition for NetBSD swap

If your Drive Setup utility does not offer the A/UX partitions types
then you need to get a new version.

I netboot the machine to NetBSD and manually newfs'd 'A/UX Root' as
NetBSD's root.

ofwboot.elf is in the very small (30Mb) HFS partition and the NetBSD
kernel on a NetBSD ffs partition. It could also reside in either
of the two HFS+ partitions. From OpenFirmware, boot with
 
boot ide0/disk@0:8,ofwboot.elf ide0/disk@0:13,/netbsd

To boot back into MacOS9 I use

boot ide0/disk@0:9,\\:tbxi

You can use                                                                    
                                                                                                
setenv boot-device ide0/disk@0:8,ofwboot.elf                                                    
setenv boot-file ide0/disk@0:13,/netbsd                                                         
setenv boot-command boot                                                                        
                                                                                                
to make those setting permanent.                                                                

The 8 and 13 in the boot line are the Mac partition ids. I got those
from 'maclabel' (ftp://ftp.planix.com/pub/misc/maclabel*). IIRC,
Bill Studenmund sent maclabel to me when he did the work on
mapping Mac partitions to a NetBSD disklabel. Mac's use a number of
additional small partitions to store driver and other information.

# maclabel /dev/wd0c
14 partitions
part 2: name Macintosh type Apple_Driver43 start 64 len 54
part 3: name Macintosh type Apple_Driver43 start 118 len 74
part 4: name Macintosh type Apple_Driver_ATA start 192 len 54
part 5: name Macintosh type Apple_Driver_ATA start 246 len 74
part 6: name Macintosh type Apple_Driver_IOKit start 320 len 512
part 7: name Patch Partition type Apple_Patches start 832 len 512
part 8: name untitled type Apple_HFS start 1344 len 65536
part 9: name untitled 2 type Apple_HFS start 66880 len 4897933
part 10: name MOSX_OF3_Booter type Apple_Boot start 4964813 len 16384
part 11: name SecondaryLoader type Apple_Loader start 4981197 len 1024
part 12: name Hard Drive type Apple_HFS start 4982221 len 4880549
part 13: name A/UX Root type Apple_UNIX_SVR2 start 9862770 len 2174782
part 14: name Swap type Apple_UNIX_SVR2 start 12037552 len 648128
[SNIP]


This will result in the following NetBSD diskabel:

10 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  a:  2174782  9862770     4.2BSD        0     0     0   # (Cyl. 10436*- 12738*)
  b:   648128 12037552       swap                        # (Cyl. 12738*- 13423)
  c: 12685680        0     unused        0     0         # (Cyl.    0 - 13423)
  d:      512      320    unknown                        # (Cyl.    0*- 0*)
  e:      512      832    unknown                        # (Cyl.    0*- 1*)
  f:    65536     1344        HFS                        # (Cyl.    1*- 70*)
  g:  4897933    66880        HFS                        # (Cyl.   70*- 5253*)
  h:    16384  4964813    unknown                        # (Cyl. 5253*- 5271*)
  i:     1024  4981197    unknown                        # (Cyl. 5271*- 5272*)
  j:  4880549  4982221        HFS                        # (Cyl. 5272*- 10436*)

So, Mac part 13 (A/UX Root) becomes wd0a, and Mac part 14 becomes
wd0b. 

Hope this help.

-- 
    - aew