DDWRT and Swap Files

Wiki.TerraBase.info
Revision as of 14:48, 14 January 2020 by Root (talk | contribs) (Created page with "### USB ############################################################################################################################################### # # Instead of issuing...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
      1. USB ###############################################################################################################################################
  1. Instead of issuing USB related commands via script, the USB services for Flash Drives, etc. are enabled via the GUI


      1. Swap File##########################################################################################################################################
  1. A "raw" swap file must be initially configured
  2. The following is a BusyBox command that creates a file with the size dictated by the attributes (if is the source file, of is the output file, bs are the number of bytes to read at a time, count is the number of times to repeat the cycle)
  3. In the following example, a 256 MB file is created
  4. dd if=/dev/zero of=/tmp/mnt/sda_part2/SwapFile bs=1024 count=262144
  5. To enable the OS / Router to use a swap file, the swap utilities need to be installed
  6. opkg install swap-utils: mkswap and swapon
  7. The following command "formats" / prepares the RAW / Blank file as a swap file with the label SwapFile
  8. mkswap /tmp/mnt/sda_part2/SwapFile --label SwapFile
  1. The swapon command recommends the following
  2. chmod 600 /tmp/mnt/sda_part2/SwapFile
  1. Activates the swap file and makes it available to the OS

swapon /tmp/mnt/sda_part2/SwapFile

  1. Deactivates the swap file / turns it off
  2. swapoff /tmp/mnt/sda_part2/SwapFile
  3. If the USB related services are installed via OPKG and controlled via the /opt/etc/init.d Directory, then there seems to be documentation that indicates the above can be controlled via the S30 USB service)