Setup USB Support & Swapfile


Basically, I followed the references & guides below: [thank you & credit goes to themSmile]

12Mar'12 Update : Re-test & document USB & Swap, Samba & FTP (vsftpd) HERE based on newer Backfire release


Before starting, read HERE to have some idea and understanding on how to create prepare ext3/4 USB HDD.

Use either EASEUS (Windows-base) or GParted (Linux-base) to prepare a USB2 HDD on either Ext3 or Ext4 (only on GParted) file system with 2 partitions.  The first partition should be around 1GB mainly use for Swapfile purpose, the second partition will be use for storage.


Use PuTTY to SSH access the device.
(Note: First time logon will prompt some messages, just click update/ok to continue.)

Should see this screen after login successfully.


Now can start to install some packages for USB support, type the following, one after another, be patient to wait for it to complete before next line:

opkg update
opkg install kmod-usb-storage-extras
opkg install block-mount
opkg install block-hotplug
cd /etc/init.d
./fstab enable

The result should look something like this:



Plug-in the USB HDD, type "reboot" and exit PuTTY.


After the device re-booted, logon to LuCI, go to "System --> Mount Points", should see the "/dev/sda1 & sda2" as follows:

Under "Mount Points", select "/dev/sda2" (partition 2 - storage) mount point to "/mnt", click Save/Apply


Logon PuTTY, type the following to install & setup Swap partition:

opkg update
opkg install swap-utils
mkswap /dev/sda1
swapon /dev/sda1

The result should look something like this:


Logon using WinSCP


Go to folder "/etc/config", locate the file called "fstab", right-click to edit

This is to enable and mount "/dev/sda1" as Swap partition

Save then close it.
(Note: It will prompt for password, enter accordingly; some error messages will appear, just ignore and "ok" to continue.)


Basically the Swap partition is completed.
Close the WinSCP.
Back to PuTTY, type "reboot" and close it.


After the device re-boot, logon PuTTY, type "free" to check, notice the "Swap" is now enabled.

Logon to the device, go to "System --> Mount Points"

The result should look something like this:


Basically USB support & Swap partition setup is completed now, can proceed to:



Right Click

No right click