maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Dedicated Swap Partition (https://talk.maemo.org/showthread.php?t=19663)

MrDowntempo 2008-04-29 23:59

Dedicated Swap Partition
 
I used this page to set up my n800 to boot from the internal mmc. One thing it told me to do was to create a 400mb vfat partition. I went ahead and made it a 512mb partition. Low and behold by the end of the tutorial I find out it isn't being used for anything. I should point out that I don't need a vfat partition for windows compatibilty because I don't run windows on any of my PCs. I'm also having trouble getting the virtual memory tab in the control panel to let me create virtual memory because it thinks I don't have an internal sd card. Can someone help me kill 2 birds with one stone and set up the unused vfat partition as a dedicated swap partition? That would make me uberhappy.

Thanks in advace!

ace 2008-04-30 01:59

Re: Dedicated Swap Partition
 
The typical Linux way would be
  1. Partition
  2. Format a partition with mkswap
  3. Edit the /etc/fstab file to indicate that the swap partition should be activated during boot
  4. Then reboot (not necessary, but you want make sure everything still works ;) )

However, the it seems like OS2008 ignores the /etc/fstab file. So, I'm not sure what the best way to automatically activate the swap partition is. Running a boottime script that calls "swapon" should work, but there may be an OS2008 equivalent to /etc/fstab, which would be a more elegant solution.

MrDowntempo 2008-04-30 02:20

Re: Dedicated Swap Partition
 
Yeah I had gotten that fat before I read your post. bummer about fstab, thats the way it should be handled. I found some blog posts on the subject but they are really old and for the n700 and it's original OS. I've written a script that activates the swap, but I dunno how to run the script automatically at boot.

MrDowntempo 2008-04-30 03:07

Re: Dedicated Swap Partition
 
ooh i fixed it. Gotta softlink to my script into /etc/rc2.d/S99-local-mmcswap.sh If anyone else has this problem, that there is the solution. Now the only problem I'm having is that whenever I boot I get a dialog saying "Memory card corrupted or not formatted" Can I turn that off?

mat 2008-04-30 09:46

Re: Dedicated Swap Partition
 
Yes you can. By creating VFAT partiton as the first partition on your card ;)

fanoush 2008-04-30 11:32

Re: Dedicated Swap Partition
 
And then you can create swap file on it :-)

dd if=/dev/zero of=/media/mmc1/.swap bs=4096 count=32768
mkswap /media/mmc1/.swap

Maybe it even gets autodetected and used. If not, you can enable it in startup script too. As for filling the space - FAT is good enough for media (or any data) files.

MrDowntempo 2008-04-30 13:28

Re: Dedicated Swap Partition
 
What I did was take the memcard out of my n800 and put it into a memcard reader. I then loaded it up in gparted and added a small 16mb VFAT partition in the front, and moved the 512mb swap partition to the end. Had to modify my swap script to point to partition3 now and of course I am wasteing 16mb of vfat but I'm okay with that.

Benson 2008-04-30 13:49

Re: Dedicated Swap Partition
 
I intend to leave a VFAT partition on the front of my 16 GB card for MM maps, music, etc; it'll be easily available to both installs, and also available over USB with any computer (Linux or Windows, as I have to use both), for backup and file dropping purposes.


All times are GMT. The time now is 07:08.

vBulletin® Version 3.8.8