Subject: Re: partitions
To: Merideth Johnston <merideth@sky.net>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-mac68k
Date: 01/28/2000 14:53:58
On Fri, 28 Jan 2000, Merideth Johnston wrote:
> 1. How do I find out how the partitions are labeled within NetBSD? The
When running NetBSD: disklabel sd0 or sd1. :-)
> installer lists them, specifically:
> sd0g: USR partition (for the compilers, games, etc, if I can get them there...)
> sd0b: SWAP partition
> sd0a: HFS_PART (MacOS, a little over 4 gig, and I don't want it _touched_
> by NetBSD, ever - how do I ensure that?)
You'll end up editing the /etc/fstab file. Just don't list it.
> sd0d: USR partition (for my /home, if I can get it put there)
> sd1a: ROOT/USR (the only way I could get the installer to install
> _anything_ was to make one partition for both root & usr, and put it on the
> zip drive - I could get absolutely nothing else to work. at all. period.
> _Any_ root partition on my large hard drive causes the installer to fail,
> with the message: error on SCSI read (), #5; failed mountfs (), error 22 -
> whatever that means....)
Error 22 is EINVAL. That probably means that the installer's ideas of what
partitions are where is wrong.
> sd1b: HFS_PART (MacOS, tiny 2meg, required for the Mac to recognize the
> disk. I intend to use it for any Mac files I want to reference from NetBSD)
that's fine. And the package system has hfsutils in it, which can copy
files on and off of this partition.
> 2. How do I configure the swap partition so it can be used? I get the
> message, swapctl:/dev/sd1b: device not configured. Therefore, I have no
> swap partition, until _something_ is done. I don't know what partition it
> _means_ by sd1b, tho I have the bad feeling it is looking for the swap
> partition on the zip disk, and the only thing left there is the HFS
> partition, which the installer refers to as... sd1b. I don't know how to
> tell it where the correct swap partition _is_, or why it doesn't know where
> it is, when the installer so obviously did.
Look in /etc/fstab for lines like:
/dev/wd0b none swap sw 0 0
You won't see wd in there (that's an ide disk from an x86 here at work),
but there will be sd lines. Probably an sd1b line.
Make it sd0b.
You're getting an error message because the partition's marked to be an
HFS partition, not a swap one, so it won't be used for swap.
> 3. How do I mount the various usr partitions, and assign them to be used
> by NetBSD? I need to move stuff off the zip disk, as it is now 75% full,
> and I have not yet done a dang thing but search, and search, and search
> thru the man pages, and all the books from the library, looking for some
> means to manage installing, somewhere _anywhere_ besides the zip disk.
Someone else covered this one. :-) You have to have the installer mount
them. Note that if you do this after you've installed things, you'll need
to do some fixup in single-user mode (which is fine).
i.e. if you make mount points for /usr and /var now, all the files you
have under them are no longer accessable.
What would probably work is that after you update the mount points as
Kadari mentioned, boot into single user mode. Then:
mount -u / Makes root r/w
mv /usr /oldusr
mkdir /usr
mount /usr Mounts /dev/sd0g in /usr
mv /oldusr/* /usr Moves everything over
rm -rf /oldusr Gets rid of old usr
repeat for /var.
> As far as I can tell, this would involve the fstab file, but that requires
> the use of the specific partition designations as seen by NetBSD, and _I
> don't know what they are_, or how to find out what they are, or if they are
> the same as what the installer says they are. (if they are the same, why
> doesn't it recognize them already?) You get the grim picture.
Probably because the installer is rather dumb about the fstab file it
makes. It only makes the fstab file contain the partitions mounted in it
when you made the fstab file. As the /usr and /var partitions weren't
mounted, it didn't add them.
> If someone would be so kind, before they fit me with a rather tight jacket
> and haul me away jibbering quotes from UNIX Unleashed...
>
> and bonking my forehead on the keyboard,
Hope this helps!
Take care,
Bill