Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Panther Compatiblity' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Panther Compatiblity
Authored by: Craig Jones on Dec 03, '03 12:25:54PM
At least on my system, I have figured out why I couldn't get swap to work. The mount -vat nfs command wouldn't mount the LABEL= diskname partitions, and NetInfo is apparently not up far enough for /Swap to be mounted. (I suspect this is part of the trouble when using Apple updates--they look to rely on fstab working right, so I may change the suggestion of using the Labels to using the /dev/disk0sxx format in /etc/fstab). So I adapted some of the notes posted elsewhere for Panther to get this to work. Note that I have /Swap as slice 10 on my machine (one way to see this, in the Terminal, run df -k to see the positions of your partitions), so replace disk0s10 with whatever you use locally. Go down in /etc/rc to where swapdir is set and make it

swapdir=/Swap/vm
(or /Swap/.vm if you so desire, just be sure you are consistent) After the netboot check, insert this:

#Make sure swap is put on the partition
umount -v /Swap 
#above avoids accidents
if [ -d /Swap ]; then
  rm -rf /Swap
#this flushes junk accidentally put on root drive
fi
mkdir /Swap
#now mount the Swap partition
/sbin/mount_hfs /dev/disk0s10 /Swap
sleep 1
There is now a chunk of text that tests for the swapfile existing and cleans out any left over swapfiles. After that are "dynamic_pager" and appprofile commands. Change these to:

dynamic_pager -F ${swapdir}/swapfile

appprofiledir=${swapdir}/app_profile
Make these modifications and otherwise use the instructions above in this tip and you should get swap to work.

Note that it can seem as though you are making swapfiles on Swap even when you are not: if /Swap is not mounted when /etc/rc is running, a directory you cannot see is created under your /Swap mount. This leads to really odd things: if you do a global search from the Finder for "swapfil" (visible and invisible), you will turn up the current swapdir files shown with a parent of vm (or .vm), but clicking on the file to see the full path locks up the Finder, apparently because the directory isn't accessible from the Finder (nor indeed from Unix until you unmount the Swap partition).

[ Reply to This | # ]