OpenWRT + WRT160NL + USB pendrive

I wanted to extend the storage space of the router so I used my old Kingston pendrive.
That is the point when I want to mention, it is very easy to do. Yet even I got stuck at some point.
Firstly you need some packages,
kmod-usb-core , for the core usb
kmod-usb-uhci or kmod-usb-ohci this depends on what kind of usb driver your router has. There won’t be a problem if you install both.
kmod-usb-storage for the storage drive
kmod-usb2 for usb 2 support
kmod-fs-ext3 | kmod-fs-vfat for the filesystem. I used kmod-fs-vfat my pendrive is formatted to this fs.

If you have installed this packages, you need to reboot your router.

When your system is came back, you have to ssh to the router. Then you have to mount the pendrive.
mkdir /mnt/pendrv1
# you will create a directory for the pendrive
mount -t vfat /dev/sda1 /mnt/pendrv1
# where the -t vfat , the type of the filesystem.
# /dev/sda1 is the pendrive
# /mnt/pendrv1 is where it will be mounted.
#######################
# Note you can decide what is the name of the pendrive in the dev directory by listing the devices:
# ls /dev , after that you will put the pendrive in, then another ls /dev , and you can see what new device will show # up. In my case it was sda1 .
########################
# then
cd /mnt/pendrv1
ls
#and you should see the files what was already on.
If you see nothing and you quite sure, there should be something then here is the trouble what I encountered. After some research and reading the log file, I realized there is a problem with the character codec in the pendrive. You can see it in lucy status / system log. It was something like that ” user error : FAT: IO charset iso8859-1 not found . All you have to do is to download the kmod-nls-“charcodectype” in my case: kmod-nls-iso8859-1 . After you installed, you have to mount again. Then if all went good, you should see the files. Next time I will do the booting from the usb pendrive. It is a good thing from many aspect. Like you can create a second os for other thing, it will have a multi os. Another is the flash drives will broke after a lot of writes. It is easier to buy a pendrive then replacing the the flash in the router.

Here are the references:

Basic USB

Usb storage
how to mount

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s