Loading ...
Sorry, an error occurred while loading the content.

Updated hacks.tar file for use with USB flash f/w

Expand Messages
  • mrthreeplates
    Edited to fix indenting... ... Hi, For those interested in using only a USB flash drive and using the firmware that I ve uploaded, I m updated the hacks.tar
    Message 1 of 1 , Aug 26, 2004
    View Source
    • 0 Attachment
      Edited to fix indenting...
      ------


      Hi,

      For those interested in using only a USB flash drive and using
      the firmware that I've uploaded, I'm updated the hacks.tar
      file to take advantage of the snapgear 3.0.0 build that
      I've previously posted.

      Note: I realize that this may have a rather limited
      half-life due to rapid progress in the area of direct
      USB flash boot. However, I'm using this for the time
      being and others may find it useful.

      Details:

      1) You should be using the firmware I've loaded, which
      simply runs the file /share/flash/data/hacks/rc.flash
      upon boot. I suppose if you have some other way to run
      rc.flash at boot that would work too.

      2) Untar the hacks_romfs.tar file in the /share/flash/data
      directory. This will create the hacks directory.

      3) (Optional) untar the romfs.tar file in the
      /share/flash/data directory. This will create the romfs
      directory.

      Before you reboot your router, you may want to tweak the
      configuration a bit. Let me go over the files
      in /share/flash/data:

      The rc.d directory contains the individual functions
      run at startup. All output is written to the
      rc.flash.out file for debugging.

      rc.d/000data.sh:

      Simply a test script.

      rc.d/005passwd.sh:

      Copies the passwd file of your choosing to
      the appropriate places. The root and
      ourtelnetrescueuser password will be set
      to "welcome".

      rc.d/006smbpasswd.sh:

      Same as above, only for smbpasswd. I don't use this
      but have included it for completeness.

      rc.d/007/thpasswd.sh:

      Same as above, only for .htpasswd.

      rc.d/010telnet.sh:

      Enables the telnet service. You may
      rename telnetd.conf if you don't want
      telnetd on boot (for whatever reason).

      rc.d/020ftpd.sh:

      Enables ftpd (if romfs is loaded). You
      MUST rename NO_ftpd.conf to ftpd.conf to
      enable this service. I've disabled it by
      default since you will likely want to
      update your passwd file before turning
      this on. For example, you may want to
      disable anonymous ftp by deleting the
      ftp user in your passwd file. You
      may also want to disable the passwd
      fields for admin, guest, and telnetrescueuser.
      You can even disable root's passwd and
      create an alternate root id. However,
      hardening ftpd and the NLSU2 is probably
      a different subject...

      rc.d/040webserver.sh:

      Enables a secondary thttpd webserver. I've
      disabled this by default and you can enable
      it by renaming the .conf file as above. I've
      included the configuration that I use, but
      it assumes that you have already moved the
      admin web server to another port besides 80.
      Edit the conf file as you like.

      rc.d/099inetd.sh:

      Restarts inetd so that telnet, ftpd can
      be enabled.

      rc.d/100rmfs_bin.sh:

      This symlinks a select list of binaries from
      the romfs build into /bin. Edit the list
      romfs_bin.files to your liking. If you haven't
      loaded romfs, this won't do anything.

      rc.d/120busybox.sh:

      This symlinks the busybox from the romfs
      build into /bin. Note that I've chosen to
      leave the existing busybox alone for compatibility
      reasons. I then link in any new functions
      into the /bin directory (e.g. grep, sed, etc).
      See the file busybox.applets for a complete
      list. Some of the links really should have
      gone in another directory, but I was too lazy.
      If you prefer a different or additional busybox,
      just edit this script.

      Notes:

      If you use the webserver, the configuration file
      above assumes you have created the directory
      /share/flash/data/html/<virtual_host> for each
      virtual host you are serving. You, of course,
      don't have to use virtual hosting, but it is
      pretty cool that it works. Make sure you create
      index.htm files for each directory or else
      you will get some wierdness from the built-in
      linksys pages in thttpd.

      File protection is minimal if you are running the
      default vfat filesystem on your FLASH drive. So, take
      care in creating ftp accounts. This also affects
      thttpd as well.

      Now, reboot your router and play with the
      new functions and services.

      If you want to add new startup scripts, just
      put then in the rc.d dirctory and name them
      with a .sh extension and a leading three digit
      number.

      TODO: Cleanup the file system layout.

      TODO2: Create a sym link from /alt to /share/flash/data
      or /share/hdd/data so that I can eliminate all of the
      long ugly paths.

      Enjoy!

      George
    Your message has been successfully submitted and would be delivered to recipients shortly.