Subject: Re: disklabeling test program
To: None <port-macppc@netbsd.org>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
List: port-macppc
Date: 10/18/1999 03:47:46
Hi,

Bill Studenmund <wrstuden@nas.nasa.gov>wrote:

Bill> I've written a new MacOS disklabel reading routine,
Bill> and I was wondering if folks could test it.

Cool!

Bill> The program will read the disklabel and print out what
Bill> it gets for the partitions. Please compare them with
Bill> your disk labels!

maclabel doesn't show root partition.  Why?

Here's the result of my sd1 which is shown as boot time.

sd1 at scsibus0 targ 1 lun 0: <IBM, DORS-32160, WA6A> SCSI2 0/direct fixed
sd1: 2063 MB, 6703 cyl, 5 head, 126 sec, 512 bytes/sect x 4226725 sectors

I used to use this disk for mac68k.

$ disklabel sd1 | tail
8 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  a:   262140  1026030     4.2BSD        0     0     0   # (Cyl. 1628*- 2044*)
  b:   262140  1550310       swap                        # (Cyl. 2460*- 2876*)
  c:  4226725        0     unused        0     0         # (Cyl.    0 - 6709*)
  d:  1024942     1088        HFS                        # (Cyl.    1*- 1628*)
  e:   819200  1812450     4.2BSD        0     0     0   # (Cyl. 2876*- 4177*)
  f:   819200  2631650     4.2BSD        0     0     0   # (Cyl. 4177*- 5477*)
  g:   262140  1288170     4.2BSD        0     0     0   # (Cyl. 2044*- 2460*)
  h:   775875  3450850     4.2BSD        0     0     0   # (Cyl. 5477*- 6709*)
$ ./maclabel /dev/rsd1c
7 partitions:
#        size   offset     fstype
  a:   262140  1550310       swap
  b:  1024942     1088        HFS
  c:      856      901     unused
  d:   819200  1812450     4.2BSD
  e:   819200  2631650     4.2BSD
  f:   775875  3450850     4.2BSD
  g:        0        0     unused

HD/SC Setup shows the contains as below:

512K		Apple_Driver
512471K		HFS
131070K		A/UX Root&Usr slice 0
131070K		Apple_UNIX_SVR2
131070K		A/UX Swap slice 1
409600K		A/UX Usr slice 2
409600K		A/UX Usr slice 2
387937.5K	A/UX Usr slice 2

in details:

Ttile: Partition Map	31.5K	 @ 1	Num: 0
Name: Apple		Type: Apple_partition_map

Ttile: Apple_Driver	512K	 @ 64	Num: 1
Name: FWB Disk Driver	Type: Apple_Driver43

Ttile: * azarin		512471K	 @ 1088 Num: 2
Name: MacOS		Type: Apple_HFS

Ttile: Partition Map	131070K	 @ 1026030  Num: 3
Name: A/UX Root 	Type: Apple_UNIX_SVR2

Ttile: Apple_UNIX_SVR2	131070K	 @ 1288170  Num: 4
Name: NetBSD Usr 	Type: Apple_UNIX_SVR2

Ttile: A/UX Swap slice 1 131070K @ 1550310  Num: 5
Name: Swap		Type: Apple_UNIX_SVR2

Ttile: A/UX Usr slice 2	409600K	 @ 1812450  Num: 6
Name: Usr file system	Type: Apple_UNIX_SVR2

Ttile: A/UX Usr slice 2	409600K	 @ 2631650  Num: 7
Name: Usr file system	Type: Apple_UNIX_SVR2

Ttile: A/UX Usr slice 2	387937.5K @ 3450850  Num: 8
Name: Usr file system	Type: Apple_UNIX_SVR2

--
SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
Hack on NetBSD, and your code runs on over 20 architectures!