How to Prepare USB Disk for Optware Installation on Tomato Firmware
Tool needed
-Router with USB support
-Router install with TomatoUSB firmware
-Putty program (for telnet)
Instructions
1) Open Tomato menu. On the USB Support page, be sure to check Core USB Support, USB 2.0 Support, USB Storage Support, Ext2/Ext3, and Automount. Save this. Your disk should appear lower on the page under Attached Devices. On the right hand side, if it is Mounted, click Unmount.
2) Telnet to the router (I use Putty program)
Code:
fdisk -l
3) Use fdisk to create the partitions. In the following lines, # and after are comments.
Code:
fdisk /dev/sda # adjust for disk if necessary
p # to see existing partitions
d # to delete partition if any
n # new partition
p # primary partition
1 # a one for partition 1 for Optware# start at default 1 block
+368M # size of Optware partition in MB; can be larger
p # check partition
n # new swap
p # primary
2 # partition 2 Swap# start at default block
+64M # size of Swap in MB; can be larger
t # set type of Swap partition
2 # partition 2 is Swap
82 # swap type
p # check partitions
n # new Data for remaining
p # primary
3 # partition 3 Data# default start block # default remaining blocks
p # check partitions
w # write it all out and exit
Code:
mke2fs -j -L Optware /dev/sda1
mkswap -L Swap /dev/sda2
mke2fs -j -L Data /dev/sda3
6) Then add the following script in Run after mounting (just below Automount checbox) to mount the Optware partition as /opt for use with Optware.
Code:
if [ -d /mnt/Optware ]; then
mount -o bind /mnt/Optware /opt
transmission-daemon -g /opt/share/transmission/config
fi