Skip to content

Instantly share code, notes, and snippets.

@dferg
Last active January 22, 2024 04:40

Revisions

  1. dferg revised this gist Aug 8, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -84,7 +84,7 @@ Replace the /dev/sdb1 below with the path to your newly created partition.
    mount /opt
    entware-install.sh

    # Install useful packages (optional)
    ## Install useful packages (optional)

    There are a number of useful, general purpose packages that you might want to install. ssh to the router and run the following (these on the list are just some examples):

  2. dferg revised this gist Aug 8, 2014. 1 changed file with 66 additions and 9 deletions.
    75 changes: 66 additions & 9 deletions howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -14,19 +14,75 @@ This howto describes installing [entware](https://github.com/Entware/entware) fo

    # Install entware

    Pick a USB stick that you can dedicate to your router since it will be completely erased by the following process. Plug in the USB stick and ssh to the router. Enter the following commands:
    Pick a USB stick that you can dedicate to your router since it will be completely erased by the following process.

    mkfs.ext3 -L OPTWARE /dev/sdb1
    cat "LABEL=OPTWARE /opt ext3 rw,noatime 1 1" >> /etc/fstab
    nvram setfile2nvram /etc/fstab
    nvram commit
    mount /opt
    entware-install.sh
    ## Configure the GUI for entware

    In the web GUI, go to the "USB and NAS->USB Support" section and tick the following options:

    [x] Core USB Support
    [x] USB 2.0 Support
    [x] USB Storage Support
    [x] Ex2/Ext3 File Systems Support
    [x] Automount

    Paste this text into the "Run after mounting" box:

    #!/bin/sh
    /opt/etc/init.d/rc.unslung start

    Paste this text into the "Run before unmounting" box:

    #!/bin/sh
    /opt/etc/init.d/rc.unslung stop
    sleep 15
    for i in `cat /proc/mounts | awk '/ext3/{print($1)}'` ; do
    mount -o remount,ro $i
    done

    Click the "Save" button and then check the "USB Status" at the bottom of the screen. If your USB stick is mounted, click "Unmount". In subsequent steps, we are going to format the USB stick, so we don't want it mounted.

    Go to the "Administration->Scripts->Init" page. Paste the following into the "Init" script section:

    echo "LABEL=ENTWARE /opt ext3 rw,noatime 1 1" >> /etc/fstab

    Click the "Save" button.

    For reference, most of the above is taking from the [entware USB setup](https://github.com/Entware/entware/wiki/USB-Storage-setup#tomatousb-firmware) instructions.

    In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add this to the "Init" script under "Administration->Scripts":
    ## Prepare the USB stick

    Plug the USB stick in and ssh to the router. Remember, the next steps will completely erase the USB stick!

    ### Find the device name for your USB stick

    Run "fdisk -l" to display all the block devices and their partitions. Here is an example:

    # fdisk -l

    Disk /dev/sdb: 16.2 GB, 16231956480 bytes
    64 heads, 32 sectors/track, 15480 cylinders
    Units = cylinders of 2048 * 512 = 1048576 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 15480 15851504 83 Linux

    You can see that the disk /dev/sdb is a 16GB block device. Since there are no other 16GB devices on my router, I can be pretty sure that the 16GB stick that I plugged in is mapped to /dev/sdb.

    ### Partition the USB stick

    Use fdisk to delete all the partitions on your USB disk. Then create a single partition spanning the entire drive and set its type to 83 (Linux). Write the partition table and exit fdisk.

    ### Format the USB stick

    Replace the /dev/sdb1 below with the path to your newly created partition.

    mkfs.ext3 -L ENTWARE /dev/sdb1

    ## Perform the entware install

    sleep 20
    mount /opt
    entware-install.sh

    # Install useful packages (optional)

    @@ -69,4 +125,5 @@ Reboot the router by clicking the "Reboot..." option in the web GUI. Once it res

    * <http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs>
    * <https://github.com/Entware/entware>
    * <https://github.com/Entware/entware/wiki/USB-Storage-setup#tomatousb-firmware>

  3. dferg revised this gist Aug 8, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Introduction

    This howto describes installing (entware)[https://github.com/Entware/entware] for the Tomato open-source router firmware.
    This howto describes installing [entware](https://github.com/Entware/entware) for the Tomato open-source router firmware.

    ## Requirements

  4. dferg revised this gist Aug 8, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Introduction

    This howto describes installing entware for the Tomato open-source router firmware.
    This howto describes installing (entware)[https://github.com/Entware/entware] for the Tomato open-source router firmware.

    ## Requirements

    @@ -68,3 +68,5 @@ Reboot the router by clicking the "Reboot..." option in the web GUI. Once it res
    # References

    * <http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs>
    * <https://github.com/Entware/entware>

  5. dferg revised this gist Aug 8, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,8 @@ This howto describes installing entware for the Tomato open-source router firmwa

    ## Requirements

    * USB stick - 1G or more in size
    * USB-capable router running TomatoUSB.
    * USB stick - 1G or more in size
    * USB-capable router running TomatoUSB.

    ## This Howto Was Tested With

    @@ -67,4 +67,4 @@ Reboot the router by clicking the "Reboot..." option in the web GUI. Once it res

    # References

    * <http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs>
    * <http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs>
  6. dferg revised this gist Aug 8, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -9,8 +9,8 @@ This howto describes installing entware for the Tomato open-source router firmwa

    ## This Howto Was Tested With

    * Shibby's fork of TomatoUSB version 1.28 build 121
    * ASUS RT-N66U
    * Shibby's fork of TomatoUSB version 1.28 build 121
    * ASUS RT-N66U

    # Install entware

  7. dferg revised this gist Aug 8, 2014. 1 changed file with 9 additions and 6 deletions.
    15 changes: 9 additions & 6 deletions howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -28,12 +28,7 @@ In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add thi
    sleep 20
    mount /opt

    # References

    * (http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs)


    # Install useful packages
    # Install useful packages (optional)

    There are a number of useful, general purpose packages that you might want to install. ssh to the router and run the following (these on the list are just some examples):

    @@ -65,3 +60,11 @@ There are a number of useful, general purpose packages that you might want to in
    opkg install vim-runtime
    opkg install wget
    opkg install unzip

    # Verify the installation

    Reboot the router by clicking the "Reboot..." option in the web GUI. Once it restarts, ssh to the router and run "opkg list". You should get a list of possible packages that you can install. If you don't, something went wrong. Make sure that /opt is mounted (use the df command).

    # References

    * <http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs>
  8. dferg revised this gist Aug 8, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion howto-tomato-install-entware.markdown
    Original file line number Diff line number Diff line change
    @@ -14,12 +14,14 @@ This howto describes installing entware for the Tomato open-source router firmwa

    # Install entware

    Plug in the USB stick and ssh to the router. Enter the following commands:
    Pick a USB stick that you can dedicate to your router since it will be completely erased by the following process. Plug in the USB stick and ssh to the router. Enter the following commands:

    mkfs.ext3 -L OPTWARE /dev/sdb1
    cat "LABEL=OPTWARE /opt ext3 rw,noatime 1 1" >> /etc/fstab
    nvram setfile2nvram /etc/fstab
    nvram commit
    mount /opt
    entware-install.sh

    In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add this to the "Init" script under "Administration->Scripts":

  9. dferg renamed this gist Aug 8, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  10. dferg renamed this gist Aug 8, 2014. 1 changed file with 2 additions and 6 deletions.
    8 changes: 2 additions & 6 deletions gistfile1.md → howto-tomato-install-entware
    Original file line number Diff line number Diff line change
    @@ -33,10 +33,10 @@ In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add thi

    # Install useful packages

    There are a number of useful, general purpose packages that you might want to install. ssh to the router and run the following (these on the list are just some examples):

    opkg install bash
    opkg install bc
    opkg install bind-dig
    opkg install bind-nslookup
    opkg install binutils
    opkg install bzip2
    opkg install coreutils-sha1sum
    @@ -47,8 +47,6 @@ In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add thi
    opkg install gawk
    opkg install gdb
    opkg install hdparm
    opkg install ldconfig
    opkg install ldd
    opkg install less
    opkg install lsof
    opkg install objdump
    @@ -65,5 +63,3 @@ In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add thi
    opkg install vim-runtime
    opkg install wget
    opkg install unzip
    opkg install xxd

  11. dferg revised this gist Aug 8, 2014. 1 changed file with 37 additions and 34 deletions.
    71 changes: 37 additions & 34 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,8 @@ This howto describes installing entware for the Tomato open-source router firmwa

    # Install entware

    Plug in the USB stick and ssh to the router. Enter the following commands:

    mkfs.ext3 -L OPTWARE /dev/sdb1
    cat "LABEL=OPTWARE /opt ext3 rw,noatime 1 1" >> /etc/fstab
    nvram setfile2nvram /etc/fstab
    @@ -26,41 +28,42 @@ In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add thi

    # References

    [cheat sheet](http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs)
    * (http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs)


    # Install useful packages

    opkg install bash
    opkg install bc
    opkg install bind-dig
    opkg install bind-nslookup
    opkg install binutils
    opkg install bzip2
    opkg install coreutils-sha1sum
    opkg install coreutils-sort
    opkg install curl
    opkg install diffutils
    opkg install file
    opkg install gawk
    opkg install gdb
    opkg install hdparm
    opkg install ldconfig
    opkg install ldd
    opkg install less
    opkg install lsof
    opkg install objdump
    opkg install patch
    opkg install perl
    opkg install procps
    opkg install procps-top
    opkg install rsync
    opkg install sed
    opkg install strace
    opkg install tar
    opkg install tcpdump
    opkg install vim
    opkg install vim-runtime
    opkg install wget
    opkg install unzip
    opkg install xxd
    opkg install bash
    opkg install bc
    opkg install bind-dig
    opkg install bind-nslookup
    opkg install binutils
    opkg install bzip2
    opkg install coreutils-sha1sum
    opkg install coreutils-sort
    opkg install curl
    opkg install diffutils
    opkg install file
    opkg install gawk
    opkg install gdb
    opkg install hdparm
    opkg install ldconfig
    opkg install ldd
    opkg install less
    opkg install lsof
    opkg install objdump
    opkg install patch
    opkg install perl
    opkg install procps
    opkg install procps-top
    opkg install rsync
    opkg install sed
    opkg install strace
    opkg install tar
    opkg install tcpdump
    opkg install vim
    opkg install vim-runtime
    opkg install wget
    opkg install unzip
    opkg install xxd

  12. dferg created this gist Aug 8, 2014.
    66 changes: 66 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,66 @@
    # Introduction

    This howto describes installing entware for the Tomato open-source router firmware.

    ## Requirements

    * USB stick - 1G or more in size
    * USB-capable router running TomatoUSB.

    ## This Howto Was Tested With

    * Shibby's fork of TomatoUSB version 1.28 build 121
    * ASUS RT-N66U

    # Install entware

    mkfs.ext3 -L OPTWARE /dev/sdb1
    cat "LABEL=OPTWARE /opt ext3 rw,noatime 1 1" >> /etc/fstab
    nvram setfile2nvram /etc/fstab
    nvram commit

    In the web GUI, disable "Automount" under "USB and NAS->USB Support" and add this to the "Init" script under "Administration->Scripts":

    sleep 20
    mount /opt

    # References

    [cheat sheet](http://tomatousb.org/tut:how-to-set-up-nas-optware-etc-for-total-noobs)


    # Install useful packages

    opkg install bash
    opkg install bc
    opkg install bind-dig
    opkg install bind-nslookup
    opkg install binutils
    opkg install bzip2
    opkg install coreutils-sha1sum
    opkg install coreutils-sort
    opkg install curl
    opkg install diffutils
    opkg install file
    opkg install gawk
    opkg install gdb
    opkg install hdparm
    opkg install ldconfig
    opkg install ldd
    opkg install less
    opkg install lsof
    opkg install objdump
    opkg install patch
    opkg install perl
    opkg install procps
    opkg install procps-top
    opkg install rsync
    opkg install sed
    opkg install strace
    opkg install tar
    opkg install tcpdump
    opkg install vim
    opkg install vim-runtime
    opkg install wget
    opkg install unzip
    opkg install xxd