Active Topics

 


Reply
Thread Tools
Posts: 211 | Thanked: 3 times | Joined on Oct 2005
#11
Originally Posted by daf
i create a swap partition, i activate it but the nokia didn't use the swap...
i still search for this because i know this could be good
Bummer about the reader

Did you something like mkswap and swapon?

I tried this with a swap file and got a security problem at the swapon stage...

As mk500 says, a step-by-step list of instructions would be much appreciated.
 
Posts: 64 | Thanked: 4 times | Joined on Oct 2005
#12
i create a swap partition on mmc with fdisk (type Linux swap)
i use mkswap to create swap on this partition
i use swapon on this partition
and it's not working...

we must search another way... i didn't know why it doesn't work...
maybe some maemo developer could see this and give us the solution
 
Posts: 64 | Thanked: 4 times | Joined on Oct 2005
#13
i found on mailing list this :
http://maemo.org/pipermail/maemo-dev...er/002029.html
launch theses commands as root :
dd if=/dev/zero of=/media/mmc1/extraswap bs=1024 count=16384
(you must wait a lot for this....)
mkswap /media/mmc1/extraswap 16384
swapon /media/mmc1/extraswap
and it works

i open a lot of window of internet pdf video etc and here is my free memory :
/home/user # free
total used free shared buffers
Mem: 61828 60376 1452 0 20
Swap: 16376 12696 3680
Total: 78204 73072 5132

i've try with 32768 but the nokia reboot... 16Mo more are very good for the nokia but if we can add more...
i think we must add swapon on the startup of the nokia if we want to have it always but i want to test more before doing this...

PS : if you swapoff, it bug and if you plug usb, it bug (when you plug usb, the mmc card is umount...)
 
Posts: 190 | Thanked: 5 times | Joined on Nov 2005 @ Bee-u-tee-ful Garden Home, Oregon
#14
daf-

Great work - both the find of the mailing list post (I did a search but failed to read all the articles) as well as the cfdisk package (I'd found the source package but ignored it because of the utf8 references - I didn't think there would be other useful bits).

I was excited to post that I'd gotten swap working but I see I'm a bit late.

This is much easier than what I did: I partitioned my MMC into a 32MB swap and 32MB ext2fs and am in the process of mounting it at /var/lib/install so all packages get installed on the MMC.

I saw a few odd things at first - the box reported no free memory right after I did a swapon and it shutdown once. You said you had problems with 32MB as well?

I'm not sure I've done everything correctly though - my configuration looks like this:

/home/user # cat /etc/fstab
rootfs / rootfs defaults,errors=remount-ro,noatime 0 0
/dev/mmcblk0p1 none swap sw 0 0
/dev/mmcblk0p2 /brad ext3 defaults 0 0

/home/user # fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 64 MB, 64225280 bytes
4 heads, 32 sectors/track, 980 cylinders
Units = cylinders of 128 * 512 = 65536 bytes

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1 488 31216 82 Linux swap
/dev/mmcblk0p2 489 980 31488 83 Linux

I still need to add 'swapon /dev/mmcblk0p1' somewhere though, and sort out why I have to manually mount my ext2fs file system but otherwise... I'm getting there :-)
 
Posts: 190 | Thanked: 5 times | Joined on Nov 2005 @ Bee-u-tee-ful Garden Home, Oregon
#15
daf-

Well, it worked before but I'm going to try and stick with a 16MB swap now - I hacked the startup sequence to issue a swapon before it mounted my ext2fs partition and the result....well... let's say I now have the pleasure of redoing everything again from scratch.

So I'm going to try and keep better notes :-)
 
Posts: 64 | Thanked: 4 times | Joined on Oct 2005
#16
i don't know why nokia bug when i swapon a 32Mo directly but i've found a solution to fix this problem. I have created a 1Mo swap, swapon on this 1Mo, after swapon on a 32Mo swap file and swapoff the 1Mo swap file and it's working well...
for example, my free mem is now :
free
total used free shared buffers
Mem: 61828 60412 1416 0 16
Swap: 32760 23896 8864
Total: 94588 84308 10280

I will buy a 1Go RS-MMC and test with larger swap after...
i will just add this to the startup i think :
swapon /media/mmc1/1Mo
swapon /media/mmc1/swap
swapoff /media/mmc1/1Mo
with some tests i think...
 
Posts: 190 | Thanked: 5 times | Joined on Nov 2005 @ Bee-u-tee-ful Garden Home, Oregon
#17
daf-

Until I can get a bigger card I'm going to use 24MB of swap (thanks for the workaround on 32MB, I'll be interested in your results).

I'm pretty sure I know the commands to use I'm just not sure where to put them in the startup.... I've tried /etc/rc2.d/S20bradshack (as well as S99bradshack) but I'm not sure what's correct. That's why the script is named 'hack'.
 
Posts: 64 | Thanked: 4 times | Joined on Oct 2005
#18
Originally Posted by daf
swapon /media/mmc1/1Mo
swapon /media/mmc1/swap
swapoff /media/mmc1/1Mo
between the two swapon, we must wait or it doesn't work...
 
Posts: 155 | Thanked: 10 times | Joined on Nov 2005 @ central georgia, usa
#19
Originally Posted by bradb
daf-

Until I can get a bigger card I'm going to use 24MB of swap (thanks for the workaround on 32MB, I'll be interested in your results).

I'm pretty sure I know the commands to use I'm just not sure where to put them in the startup.... I've tried /etc/rc2.d/S20bradshack (as well as S99bradshack) but I'm not sure what's correct. That's why the script is named 'hack'.
Hey Brad,

There should be an rc.local... (I'm charging now, so I can't check..) This is run after the "other" scripts for that runlevel.

now here's now it's supposed to work:

It's call Sys V init for the unix loins from which it sprang. There are several "runlevels." The default "runlevel" is in /etc/inittab as are the scripts/directories to run when the machine comes up in that "runlevel"

example runlevels:

1 - single user command prompt only - great for fixing things when graphics get broken.
2 - single user with X
5 - full multiuser with X
6 - shut your *** down (when a linux box is "shutdown" with the "shutdown" command, another command called telinit is issued, specifically "telinit 6" this tells the kernel to switch to runlevel 6 - shutdown...


init.d (directory) has the actual scripts

rc(x).d have links (shortcuts) to the script in init.d
the number allows some startups to run before others... your inclination to use 99 is right.

so different rc(x).d folders can start different "services" based-on the needs of the "runlevel." They are processed numerically by their links (shortcuts.)

Sorry if you already knew this. All these folders (and most other interesting things) are in the /etc directory.

Paul
 
Posts: 190 | Thanked: 5 times | Joined on Nov 2005 @ Bee-u-tee-ful Garden Home, Oregon
#20
Paul-

Well put. I actually didn't ask the right question, but you helped :-)

I was really wondering how soon in the boot process I should stuff my changes - and in general, S99 is right. But in my (unstated) case:

1. I was tinkering with mounting over /var/lib/install, and I saw that the dropbear ssh server runs at S20. I've found that creating a symbolic link to a directory that isn't mounted yet is a quick trip to a restore.

So, I needed to wedge in and S20bradhack worked well for that - at least for this application. Of course I've now decided that I'd rather mount over /home, but that's another thread ;-)

2. Mounting swap - I'd think you'd want to do it as soon as possible, right? I ended up doing that at S20, since it seemed safe. Or do you think thats bad? (and again, due to what I've been told, I'm not sure swapping to the MMC is a good idea - at least for expensive MMC cards).
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:58.