I've got a Linux embedded system that I'm experimenting with (the Elektor Embedded Linux Made Easy board, based on the GNUBLIN http://en.gnublin.org/index.php/GNUBLIN-Elektor). I'm using the 3.3 kernel provided by them (http://en.gnublin.org/index.php/Kernel_compile_%2B_Module_installation), which I've configured and compiled myself. I built the root file system myself using buildroot.
I've been experimenting with swap on this board (it's only got 8MB RAM!) and I've got it working. However I can't seem to get the system to automatically mount and activate the swap via fstab. My swap is implemented as a dedicated partition on the microSD card (mmcblk0p4). Here is my fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext4 rw,noauto 0 1
/dev/mmcblk0p1 /media/mmc_1 ext2 defaults 0 0
/dev/mmcblk0p4 none swap auto 0 0
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
sysfs /sys sysfs defaults 0 0
swap works, because if I enter swapon -a
in the command line, it becomes activated, as reported by free
. But it just won't activate automatically on boot.
My other entries in fstab work fine – for example, /dev/mmcblk0p1 is auto mounted correctly on boot.
I've pasted the output of the boot process here: http://pastebin.com/0qQ4RAd8
Any thoughts?
Best Answer
Exchange
auto
withsw
in the fstab line. This tells the system to activate it using swapon after booting.