OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: Capn_Fish on September 30, 2007, 09:31:19 pm
-
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.
-
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":
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\'] 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[/div]
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.
-
Ah, thank you!
I wonder why it mounted right on first boot then?
-
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":
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\'] 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[/div]
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...
-
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.
-
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