Help - Search - Members - Calendar
Full Version: Getting Swap To Automount
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
Capn_Fish
I'm trying to get my swap partition to automatically be used on boot, but so far it isn't working. I've tried adding several combinations of stuff to /etc/fstab, including the same format used on my Debian box, but they don't work.

It mounted the first time I booted pdaX FWIW. I don't know if installing SP8 messed it up or if me repartitioning did it. The swap partition is hda5.

Any help would be appreciated.
desertrat
I've never managed to get pdaxrom beta1.3 (and older) to use the /etc/fstab file, it just seems to ignore the entries in there. What I did was modify /etc/rc.d/init.d/pcmcia, I added this to the end of "start":

CODE
SWAPS="hda6 hdc6"
for SWAP in $SWAPS; do
IS_PART=`grep "$SWAP" /proc/partitions 2>/dev/null`
if [ "$IS_PART" ]; then
swapon "/dev/$SWAP"
fi
done


You probably just need a simple "swapon /dev/hdXX". The reason I did it like that was because at that time there was a bug in MD/CF mounting process which meant the MD was assigned either hda or hdc depending on whether there was CF card in the slot at boot time - I believe if you search the forum for "ide.opts" you would find the gory details.
Capn_Fish
Ah, thank you!

I wonder why it mounted right on first boot then?
Meanie
QUOTE(desertrat @ Oct 1 2007, 04:09 PM) *
I've never managed to get pdaxrom beta1.3 (and older) to use the /etc/fstab file, it just seems to ignore the entries in there. What I did was modify /etc/rc.d/init.d/pcmcia, I added this to the end of "start":

CODE
SWAPS="hda6 hdc6"
for SWAP in $SWAPS; do
IS_PART=`grep "$SWAP" /proc/partitions 2>/dev/null`
if [ "$IS_PART" ]; then
swapon "/dev/$SWAP"
fi
done


You probably just need a simple "swapon /dev/hdXX". The reason I did it like that was because at that time there was a bug in MD/CF mounting process which meant the MD was assigned either hda or hdc depending on whether there was CF card in the slot at boot time - I believe if you search the forum for "ide.opts" you would find the gory details.


actually, this is the proper way of detecting and assigning the device name to the internal cf. pdaxrom hacked it to hardcode it to /dev/hdax which is actually wrong and breaks other things...
Capn_Fish
Is that fixed in r198/v2.0.0? If not, it seems like a good thing to add to the bug tracker/trivial to fix.
scottlfa
This worked fine for me, starts up everytime with the system.

goto /etc/rc.d/
create a file, rc.swap
create a symlink from rc.swap to /etc/rc.d/rc5.d/S99swap

add: swapon /path/to/swapfile in the file[rc.swap] and save.

example of rc.swap


#!/bin/sh

if [ -e /path/to/filename ]; then
swapon /path/to/.swapfile
fi
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.