1,723
edits
(Created page with "### USB ############################################################################################################################################### # # Instead of issuing...") |
|||
Line 1: | Line 1: | ||
### USB | <nowiki>###</nowiki> USB ############################################################################################################################################### | ||
<nowiki>#</nowiki> | |||
<nowiki>#</nowiki> Instead of issuing USB related commands via script, the USB services for Flash Drives, etc. are enabled via the GUI | |||
# | <nowiki>#</nowiki> | ||
# The swapon command recommends the following | <nowiki>#######################################################################################################################################################</nowiki> | ||
# chmod 600 /tmp/mnt/sda_part2/SwapFile | |||
<nowiki>###</nowiki> Swap File########################################################################################################################################## | |||
<nowiki>#</nowiki> | |||
<nowiki>#</nowiki> A "raw" swap file must be initially configured | |||
<nowiki>#</nowiki> 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) | |||
<nowiki>#</nowiki> In the following example, a 256 MB file is created | |||
<nowiki>#</nowiki> dd if=/dev/zero of=/tmp/mnt/sda_part2/SwapFile bs=1024 count=262144 | |||
<nowiki>#</nowiki> | |||
<nowiki>#</nowiki> To enable the OS / Router to use a swap file, the swap utilities need to be installed | |||
<nowiki>#</nowiki> opkg install swap-utils: mkswap and swapon | |||
<nowiki>#</nowiki> | |||
<nowiki>#</nowiki> The following command "formats" / prepares the RAW / Blank file as a swap file with the label SwapFile | |||
<nowiki>#</nowiki> mkswap /tmp/mnt/sda_part2/SwapFile --label SwapFile | |||
<nowiki>#</nowiki> The swapon command recommends the following | |||
<nowiki>#</nowiki> chmod 600 /tmp/mnt/sda_part2/SwapFile | |||
<nowiki>#</nowiki> Activates the swap file and makes it available to the OS | |||
swapon /tmp/mnt/sda_part2/SwapFile | swapon /tmp/mnt/sda_part2/SwapFile | ||
# Deactivates the swap file / turns it off | <nowiki>#</nowiki> Deactivates the swap file / turns it off | ||
# swapoff /tmp/mnt/sda_part2/SwapFile | |||
# | <nowiki>#</nowiki> swapoff /tmp/mnt/sda_part2/SwapFile | ||
# 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) | |||
# | <nowiki>#</nowiki> | ||
####################################################################################################################################################### | |||
<nowiki>#</nowiki> 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) | |||
<nowiki>#</nowiki> | |||
<nowiki>#######################################################################################################################################################</nowiki> |