Sunday, July 2, 2006

[Zaurus] pdaXrom 1.1.0 beta 4 - Auto Swap Partition Attachment

initially i have posted in hk http://www.pumb.org forum for this stuff, but i think that's worthy of mentioning in oesf.org, so i double post down there..
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


just use the fdisk /dev/mmcblk0 (for c1k) and fdisk /dev/hda (for c3k or above), modify the /dev/mmcblk0p1 or /dev/hda3 partition's system id (command t) as type '82' (Linux swap / Solaris)..
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 /etc/rc.d/rc.sysinit is capture those descriptors to do so, but, rc.rofilesys stage, which is absent in the booting process is not recommended to add back 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 in /dev/{device name}, turn it on.. [OK] ” — that means you are successfully made..