USB

From X-Wrt

Jump to: navigation, search

Note: The following is the "easy" way to do it and not the "right" way to do it. As a new user of X-WRT it took me days to figure out all this. I hope it makes your journey easier than mine was!

Setup a USB2 Flash or Hard Drive

OpenWRT article.

Navigate the menu to System, Packages.

Scroll down to Available packages.

Install kmod-usb2

Install kmod-usb-storage

Install kmod-fs-vfat < or other filesystem if not formatted as FAT >

Navigate the menu to System, Startup.

Add the following line to the end:

mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt

Click on Save Changes.

Click on Apply Changes.

Navigate the menu to System, Reboot.

After the reboot the drive will be available as /mnt .

You should SSH into your box to make sure you can see it. Do an ls /mnt and/or df from the SSH console. To make it completely writeable from a windows machine you also need to do a chmod -R 777 /mnt if format is other than FAT.

Setup Samba

OpenWRT article.

Navigate the menu to System, Packages.

Scroll down to Available packages.

Install samba-server

Navigate the menu to System, File Editor.

Click on ect, samba, then edit smb.conf .

Change OpenWrt in the workgroup = line to your windows workgroup name . The Windows default workgroup name is WORKGROUP .

Add these lines to the end of the [global] section:

bind interfaces only = yes

interfaces = 192.168.1.1/24

hosts allow = 192.168.1. 127.0.0.1

Replace three instances of tmp with mnt .

Click on Save Changes.

Navigate the menu to Network, Hosts.

In the first section, enter 192.168.1.1 in the left hand box and OpenWrt in the right hand box, then click Add .

Click on Save Changes.

Navigate the menu to System, Startup.

Add the following line to the end:

/etc/init.d/samba start

Click on Save Changes.

Click on Apply Changes.

Navigate the menu to System, Reboot.

After the reboot the drive will be available to Windows machines as \\OpenWrt\mnt .

Setup Swap

Notes: This may only work if the drive is formatted EXT2 or EXT3 ? I am no longer using swap as the WRTSL54GS has plenty of memory even when running 5 cTorrents! The WRTSL54GS seems more stable to me without swap?

This sets up a 50MB swap file.

Navigate the menu to System, Packages.

Scroll down to Available packages.

Install swap-utils

Now, you have to SSH into your router and execute the following commands:

dd if=/dev/zero of=/mnt/swapfile bs=512 count=100000

mkswap /mnt/swapfile

Close out your SSH session.

Navigate the menu to System, Startup.

Add the following line to the end:

swapon /mnt/swapfile

Click on Save Changes.

Click on Apply Changes.

Navigate the menu to System, Reboot.

After the reboot you can navigate menu to Status, System to see Swap listed under RAM Usage .

Personal tools