Subject: Re: Swap on other harddisk?
To: Scott Reynolds <scottr@edsi.org>
From: The Great Mr. Kurtz [David A. Gatwood] <davagatw@mars.utm.edu>
List: port-mac68k
Date: 06/28/1996 17:45:48
On Fri, 28 Jun 1996, Scott Reynolds wrote:

> > I take it there's no swap or swapon command.  Why doesn't the kernel read
> > the fstab file and use all the partitions that are swap swap sw?
>
> There is a swapon command; it reads the fstab file; however, the kernel
> will not recognize arbitrary swap devices.  The reason is quite simple,
> actually -- the code to do this has never been written.  The fix is
> non-trivial, unfortunately.

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*

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?

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

> I've only got one disk. :-/

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

Cheers,

 /---------------------------------------------------------------------\
|David A. Gatwood             And Richard Cory, one calm summer night,  |
|davagatw@mars              Went home and put a bullet through his head.|
|dgatwood@nyx.cs.du.edu              --Edwin Arlington Robinson         |
|http://mars.utm.edu/~davagatw -or- http://nox.cs.du.edu:8001/~dgatwood |
 \---------------------------------------------------------------------/