initially i have posted in hk
www.pumb.org forum for this stuff, but i think that's worthy of mentioning here... so i cross post here as well...
you can re-format to the SD / CF in c1k (/dev/mmcblk0 | /dev/hda1) or MD in c3k or above (/dev/hda1 - 3), however, for the sake of housekeeping the original SHARP ROM / cacko configuration, you'd better keep the partition table of MD in c3k or above in hda1 - 2 respectively.
you can make use of
fdisk /dev/mmcblk0 or
fdisk /dev/hda to give the following partition table: -
in c1k,
/dev/mmcblk0p1 Â --> Linux (swap partition) --> suggest to use 128M as the basis....
/dev/mmcblk0p2 Â --> data (ext3 format)
in c3k or above,
/dev/hda1 Â --> leave it as is
/dev/hda2 Â --> leave it as is
/dev/hda3 Â --> Linux (swap partition) --> suggest to use 128M as the basis....
/dev/hda4 Â --> data (ext3 format)
format this swap partiton:-
in c1k,
mkswap /dev/mmcblk0p1
in c3k or above,
mkswap /dev/hda3
format the data partiton:-
in c1k,
echo y | mke2fs /dev/mmcblk0p2
in c3k or above,
echo y | mke2fs /dev/hda4
add the following line in /etc/fstab: -
in c1k,
/dev/mmcblk0p1   swap   swap   defaults  0  0
in c3k or above,
/dev/hda3   swap   swap   defaults  0  0
modify /etc/rc.d/rc.sysinit: -
from this segment: -
for dev in `/sbin/fdisk -l | grep 'Linux Swap' | cut -d ' Â ' -f 1`; do
  action "Found swap on $dev, turn it on:" /sbin/swapon $dev
  break
done
to change to the following line: -
#for dev in `/sbin/fdisk -l | grep 'Linux Swap' | cut -d ' Â ' -f 1`; do
# Â Â action "Found swap on $dev, turn it on:" /sbin/swapon $dev
# Â Â break
#done
action "Found swap, turn it on:" /sbin/swapon -a
(you can # comment these 4 lines, or # comment the 3 lines, and modify the line with 'action' at the end with the text in double quotation marks or whatsoever... )
the reason of changing as that in rc.sysinit, is so simple: you can take a look on the output to fdisk -l...
since the partition listing in fdisk -l has no recognition to "Linux Swap" type, the only way you can make use of auto-mounting is to make use of the /etc/fstab entries coming with the 'swapon -a' command in the sysinit stage... or rc.rofilesys stage which is not recommended here....
for closing the swap partition , you can make use of
swapoff -a to perform mandatory closure.
after this patch, during your pdaxrom booting, your dmesg will see this statement: "Found swap, turn it on..... [OK] " -- that means you are successfully made....
for double checking, you can make use of
free command, or meanie's recommended
cat /proc/swaps command....
for another possible work-around dealing with
/etc/rc.d/rc.rofilesys, personally i don't suggest to do so as the result may NOT be so positive....