Subject: Re: Swap on other harddisk?
To: The Great Mr. Kurtz [David A. Gatwood] <davagatw@mars.utm.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 06/28/1996 20:58:32
> What still puzzles me is, if swapon can read stab and use that to mount
> swap partitions from fstab, why couldn't a couple of calls in the kernel
> be reordered so that the root partition would be mounted, and then
> swapping turned on?  Then, the kernel would just use whichever one it
> found based on the fstab entry?  Or would such a reordering blow ps and
> other such progs apart?  *Bummer*

Read the red book; it should tell. I haven't gotten that far, so I'm
not sure yet.

> Lemme think.  The problem is that it can't find swap on another drive.
> Okay, call me crazy, but couldn't it just read to see which sd devices are
> configured (sd0, maybe sd1, sd2 less likely than sd1, etc.) and use
> (part of) the disklabel code to find partitions of type A/UX swap?  Unless
> somebody's got some other way to use a swap partition, there shouldn't be
> any worry about overwriting any swap partition, right?

Core dumps. Under certain conditions (which I don't know, but I'm sure
we'll get reminded of), the kernel drops core in the swap partitions.

Also, having the kernel decide where to swap to lacks control. Say you
want to STOP swapping to a swap partition for some reason. Right now,
you have to reboot. If on boot the system chose where to swap, you're
hosed. Thogh us mac folks could deal with it (we have another full
operating system lying around somewhere), we need to work with
instalations where the vendor OS is gone as part of the kernel is M.I..

> What am I missing here?  (Probably something blatantly obvious that I'll
> kick myself later for, right?)

The problem (as far as I can tell) is not that swapon won't look at
/etc/fstab, but that the kernel wants to deal with swap structures that
are allocated at config time, not boot time. I don't understand
why this would be a problem. Maybe when I get to that part of the red book
(the 4.4 BSD book), I'll know more.

> Same here, unfortunately.  Like I said, anybody know where I can find
> pinouts for 2.5" internals?

Aren't they industry standard? SCSI pinouts should be the same for all
configurations, no?

Take care,

Bill