PDA

View Full Version : Enabling swap


JeffElkins
2007-12-23, 16:17
I've cloned my OS to /dev/mmcblk0p1 but am having some trouble initializing swap.

1. dd if=/dev/zero of=swapfile bs=1024 count=128000
2. mkswap -c -v1 swapfile 128000
3. swapon -a /swapfile

But top shows zero swap being used. BTW, I'm using 'real' top, not busybox top.

EDIT: Thinking this might be a busybox problem I recreated the swapfile on my pc and moved it to the nokia. Still no dice.

JeffElkins
2007-12-23, 20:10
I solved this problem. It seems related to the busybox swapon.
I compiled it for the tablet and it activates my swapfile w/o problem. Busybox (which I'm growing to hate) fails everytime.

Which makes me wonder: if you're running from SD, why not replace busybox totally?

fnordianslip
2007-12-23, 21:48
what is the easiest way to do that Jeff? a deb to replace the shell and all the tools would be handy.

JeffElkins
2007-12-24, 11:58
what is the easiest way to do that Jeff? a deb to replace the shell and all the tools would be handy.


apt-get install bash
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
bash-doc
The following packages will be REMOVED:
bluez-utils busybox canola2 chavo dnsmasq docpurge dpkg hal
hildon-application-manager hildon-control-panel
hildon-control-panel-personalisation hildon-desktop hildon-home-webshortcut
hildon-home-webshortcut-config hildon-im-hwr-teach hildon-initscripts
hildon-plugins-settings-cpa isearch-applet ke-recv libcodelockui1 libcomapp0
libconbtui0 libosso-certman1 lsb-base lxdoom maemo-extras-domain
maemo-launcher maemoblocks mediaplayer-ui multimedia-applications netbase
nokia-certified-domain nokia-repository nokia-selected-domain
nokia-system-domain openssh openssh-client openssh-server operator-wizard
osso-addressbook osso-af osso-af-base osso-af-hildon-input-method
osso-af-startup osso-af-utils osso-app-killer osso-applet-bluetooth-keyboard
osso-applet-certman osso-applet-datetime osso-applet-device
osso-applet-devicelock osso-applet-display osso-applet-languageregional
osso-applet-location osso-applet-memory osso-applet-screencalibration
osso-applet-sound osso-applet-textinput osso-backup osso-bluez-compat
osso-bookmark-ui osso-browser osso-calculator osso-calculator-ui
osso-chat-ui osso-chess-ui osso-clock-applet osso-clock-ui osso-connectivity
osso-connectivity-ui osso-connectivity-ui-btsettings
osso-connectivity-ui-conndlgs osso-connectivity-ui-connmgr
osso-connectivity-ui-gwsettings osso-connectivity-ui-gwwizard
osso-connectivity-ui-iapsettings osso-connectivity-ui-statusbar osso-core
osso-core-busybox osso-core-config osso-dsm osso-dsm-ui osso-email-ui
osso-filemanager osso-filemanager-ui osso-games-startup osso-global-search
osso-help osso-help-ui osso-ic osso-imageviewer osso-lmarbles osso-mahjong
osso-multimedia osso-notes osso-pdf-viewer osso-rss-feed-reader
osso-rss-feed-reader-applet osso-rss-feed-reader-list osso-sketch
osso-startup-greeting osso-startup-wizard osso-statusbar-alarm osso-systemui
osso-systemui-actingdead osso-systemui-alarm osso-systemui-devlock
osso-systemui-modechange osso-systemui-powerkeymenu
osso-systemui-splashscreen osso-systemui-tklock osso-voip-ui ppp
pre-installed-documentation pre-installed-images pre-installed-sounds
pre-installed-videos sysvinit tablet-browser-default-plugin
tablet-browser-ui wizback
The following NEW packages will be installed:
bash
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
busybox dpkg sysvinit
0 upgraded, 1 newly installed, 121 to remove and 0 not upgraded.
Need to get 635kB of archives.
After unpacking 76.7MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'


Just installing bash looks pretty scary :)