Subject: Re: newfs is blowing my hfs
To: parker@zeroecho.net, Bill Studenmund <wrstuden@zembu.com>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-macppc
Date: 02/07/2001 17:29:38
At 5:45 PM -0700 2/7/01, Parker wrote:
>Ding Bill! You're it on the "answer the next question please" round robin
>list! ;)
>
>I've been playing with disklabel -i /dev/rwd0a and was really confused about
>how it reordered things until you mentioned this. Thanks!
>
>Couple quickie questions:
>
>Obviously Disk Setup in MacOS partitions out as A/UX swap and / yet
>'disklabel' sees these as 4.2BSD and 'swap' etc. Okay... but now how can I
>'mount' the proper stuff to install the sets?
>
>As per Henry Hotz's remarks I'm playing with 'mount' (which I know nothing
>about yet.. learning as I go here sorry):
>
>I'm trying to mount /dev/rwd0a to /mnt

OK, I misled you, it should be
mount /dev/wd0a /mnt
without the 'r' in front of the disk device name.  Use the 'r' form 
for fsck and newfs;  use the form without it for the mount command. 
Don't do fsck or newfs while the partition is mounted!!!  (Worry 
about why later.  The reason isn't that important for normal 
operations.)

So the earlier parts of the procedure are:
Under MacOS use Drive Setup to partition the disk like I said.
Boot the install kernel.
newfs /dev/rwd0a
fsck -f /dev/rwd0a		# Probably not necessary, but reassuring.
mount /dev/wd0a /mnt		# ffs is the default file system type
mount_cd9660 /dev/cd0a /mnt2	# ISO 9660 format CD-ROM
Proceed as below.  Note that you didn't need to do a newfs on wd0b.

>then
>
>I'm trying to mount the CD with the sets on it to /mnt2
>
>than I want to:
>
>cd /mnt
>
>tar zxvpf /mnt2/MACPPC/BINARY/SETS/base.tgz etc.
>
>cd /mnt/dev
>./MAKEDEV all
>cd /mnt/etc
>cat >fstab
>/dev/wd0a    /    ffs    rw    1    1
>/dev/wd0b    none    swap    sw    0    0
>^D
>shutdown -h now
>
>Okay the only places I'm stuck are how do I mount the A/UX / partition that
>MacOS made (listed as 4.2BSD in disklabel a.k.a 'a') to /mnt and mount the CD
>to /mnt2? There is no 'man mount' so I'm floundering with the syntax (again
>sorry for newbieness).

See above.  The 4.2BSD type is the default translation of what's in 
the Apple Partition Map when you specify a unix partition.  You might 
take a look at the numbers in disklabel wd0 to make sure they match 
up with what you specified to Drive Setup.  Bill S. raised a good 
point about the disklabel created disklabel overriding the APM if 
they both exist.  The sysinst-specified disklabel I think insists on 
splitting / and /usr into separate partitions so unless you have 
updated the disklabel directly it should be easy to see if NetBSD is 
using information from the wrong source.

>And if I'm not 'newfs'ing' those A/UX partitions how are they going to be
>installable? If I do need to initialize _just_ the swap and / partitions with
>disklabel or newfs how can I do that without blowing the hfs partition out of
>the water.  Keep in mind that concepts are good, actual commands are way
>better!  :-)

See above for actual commands.  To be explicit:  just newfs /, don't 
disklabel, don't sysinst, don't installboot, newfs swap won't hurt 
but isn't needed.  Drive Setup will format the HFS partition so don't 
touch it under NetBSD either.  If this isn't clear yet just come back.


Signature held pending an ISO 9000 compliant
signature design and approval process.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu