<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>swap in tomatousb</title>
		<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb</link>
		<description>Posts in the discussion thread &quot;swap in tomatousb&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Thu, 23 May 2013 20:07:45 +0000</lastBuildDate>
		
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-1464606</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-1464606</link>
				<description></description>
				<pubDate>Wed, 30 May 2012 16:19:14 +0000</pubDate>
				<wikidot:authorName>ray123</wikidot:authorName>				<wikidot:authorUserId>522497</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>1) If you are doing things that need swapping (like a torrent client) you probably are using a USB hard drive, not a flash drive. So probably, if you are using only a flash drive, then you won't need swap. I don't know how long it would last.</p> <p>2) Not sure of your question. Linux will use the swap file as it sees fit. Nothing is guaranteed. Windows swapping has nothing in common with Linux kernel swapping.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-1464256</guid>
				<title>(no title)</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-1464256</link>
				<description></description>
				<pubDate>Wed, 30 May 2012 09:41:24 +0000</pubDate>
				<wikidot:authorName>Smith</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I have 2 questions:</p> <p>1) Is it good idea to use swap file on USB flash? I have 32MB RAM and in most cases it is enough. I wonder how long time the flash memory will work when used for virtual memory.<br /> 2) If swap is used for heavy operation and then the necessary RAM fall in range of physical RAM - is it guaranteed that swap file will be freed and not used? For example in Windows I can have 3GB RAM, used 900MB and in most cases some small part of swap file is always used - no idea why.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-1457287</guid>
				<title>(no title)</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-1457287</link>
				<description></description>
				<pubDate>Wed, 23 May 2012 13:45:34 +0000</pubDate>
				<wikidot:authorName>WenleZ</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I have a Linksys E3000 with TomatoUSB from Toastman. It only has one USB port, so I want to use it with an USB Audio Adapter. I set up Cifs, and mount the /opt on the CIFS share. I also created a swapfile in /opt. when I use the command swapon, I get this:</p> <p>swapon: /cifs1/E3000/opt/tmp/swapfile: Invalid argument</p> <p>The CIFS is on a NAS with Ext3 partition, does any one has an idea what went wrong?<br /> i used the dd if=/dev/zero to create the file and mkswap OK.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-1334214</guid>
				<title>(no title)</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-1334214</link>
				<description></description>
				<pubDate>Sat, 24 Dec 2011 00:34:41 +0000</pubDate>
				<wikidot:authorName>Adog</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I activate swap by adding swapon /dev/sda1 in Run after mounting and swapoff /dev/sda1 in Run before unmounting..</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-1295916</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-1295916</link>
				<description></description>
				<pubDate>Wed, 02 Nov 2011 08:40:25 +0000</pubDate>
				<wikidot:authorName>GuruMasters</wikidot:authorName>				<wikidot:authorUserId>1232237</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello Everybody,<br /> <strong>RE: Not sure if setting is correct.</strong></p> <p>I am a new user (about 4 days) of TomatoUSB - Shibby build: [Tomato Firmware 1.28.0905 MIPSR2-070V K26 USB AIO Multilanguage] on ASUS-RT-N16.</p> <p>I was following the tutorial on Optware Installation from tomatousb.org and googled information. I partitioned my usb hard disk to &quot;Optware&quot;, &quot;Swap&quot; and &quot;Data&quot;.</p> <p>After rebooting, all is well except &quot;Swap&quot; was 'not active'. I googled and found this thread and read all the 3 pages as at this date.</p> <p>Being a newbie, I am much overwhelmed.</p> <p>I chose an easy way-out but not sure am I heading into a pitfall ahead.</p> <p>What I did:<br /> i) Add another line into [Administration]-&gt;[Script]-&gt;[Init:] and now my current setting as follows:</p> <div class="code"> <pre> <code>echo &quot;LABEL=Optware /opt ext3 defaults 1 1&quot; &gt;&gt; /etc/fstab echo &quot;LABEL=Swap swap swap&quot; &gt;&gt;/etc/fstab</code> </pre></div> <p>I switched the router off and went for lunch. About an hour later, everything is still working when I power up the router.</p> <p>Thanks in advance.</p> <p>Bob</p> <blockquote> <p>Update 20111106: Well, my original USB-HD went under. Was busy getting another 1 up again. The Swap is still working as expected, optware is installed and 'sftp' is activated by installing openssh-sftp-server using optware.<br /> Update 20111231: Yes, it's kicking and alive! SFTP is working :) and Bittorrent - transmission is working hard for fun ;).</p> </blockquote> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-1074431</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-1074431</link>
				<description></description>
				<pubDate>Tue, 22 Mar 2011 08:07:10 +0000</pubDate>
				<wikidot:authorName>Striatum</wikidot:authorName>				<wikidot:authorUserId>588882</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>@ray123: I know that, but I have only one USB drive connected… If it should change I would change this towards UUID.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-924163</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-924163</link>
				<description></description>
				<pubDate>Sat, 13 Nov 2010 17:06:33 +0000</pubDate>
				<wikidot:authorName>ray123</wikidot:authorName>				<wikidot:authorUserId>522497</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <blockquote> <p>For a standard single swap use, and with no reboot (except problem) I used fstab method:<br /> /dev/sda2 none swap sw 0&nbsp;0<br /> And it it works perfectly for me.</p> </blockquote> <p>That is not safe and it is fragile. "Fragile" means that it will work until it doesn't.</p> <p>In Tomato w/2.4 kernel it's not even right because there are no /dev/sdX's. Dunno about K2.6.</p> <p>With current Linux kernels, the disk name (the X) are completely dynamic and depend on the order that the disks happen to be detected during bootup. On my Ubuntu system (kernel 2.6.32) the same disc gets different names each time I boot up. The exact same disk will sometimes be /dev/sda, sometimes /dev/sdb, etc. I have 4 disks and the only thing predictable is that they'll get names from sda to sdd. FWIW, one is a PATA disk and the other 3 are the same model of SATA.</p> <p>Use LABEL= or UUID= instead of /dev/sdXN and it will work reliably.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-923914</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-923914</link>
				<description></description>
				<pubDate>Sat, 13 Nov 2010 08:02:10 +0000</pubDate>
				<wikidot:authorName>Striatum</wikidot:authorName>				<wikidot:authorUserId>588882</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>For a standard single swap use, and with no reboot (except problem) I used fstab method:</p> <p>/dev/sda2 none swap sw 0&nbsp;0</p> <p>And it it works perfectly for me.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-923649</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-923649</link>
				<description></description>
				<pubDate>Fri, 12 Nov 2010 23:36:23 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <blockquote> <p>i just ticked automount in usb section and message says<br /> partition swap active<br /> no need for scripting doctorate</p> </blockquote> <p>I think that's only the case if there is a swap entry in the /etc/fstab.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-923456</guid>
				<title>(no title)</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-923456</link>
				<description></description>
				<pubDate>Fri, 12 Nov 2010 19:18:18 +0000</pubDate>
				<wikidot:authorName>guest</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>that is right ditto</p> <p>i just ticked automount in usb section and message says<br /> partition swap active<br /> no need for scripting doctorate</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-922613</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-922613</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 23:07:30 +0000</pubDate>
				<wikidot:authorName>DHC_DarkShadow</wikidot:authorName>				<wikidot:authorUserId>468945</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <blockquote> <p>thanks for the work you and teddy_bear put into the firmware; it is awesome!</p> </blockquote> <p>Ditto!!!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-922362</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-922362</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 18:27:53 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Well, I did say it wasn't necessary to do…thanks for the work you and teddy_bear put into the firmware; it is awesome!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-922322</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-922322</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 17:31:30 +0000</pubDate>
				<wikidot:authorName>ray123</wikidot:authorName>				<wikidot:authorUserId>522497</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Actually, it even works if you just yank the drive out instead of umounting it from the GUI.</p> <p>Unless, of course, something has been swapped out. Cause swapoff pulls everything that it has swapped out back into RAM. And if the drive got yanked out, well it can't read anything from it, can it? So be prepared to cycle the router's power so it will reboot. ;-(</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-922311</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-922311</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 17:05:32 +0000</pubDate>
				<wikidot:authorName>ray123</wikidot:authorName>				<wikidot:authorUserId>522497</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Why would you need to do that? (Answer: you don't.)</p> <p>When you unmount via the GUI, it unmounts &amp; swapoff's EVERY partition on the drive. It doesn't bother to look at fstab (since fstab could be lying)-it looks directly at what the kernel says. Which is /proc/swaps &amp; /proc mounts.</p> <p>Ahhhhhhh……..but maybe it doesn't do swapoff of swapfiles on a mounted partition. Haven't checked that.<br /> Never checked that because a swap part is better than a swapfile, so I never use a swapfile. Certainly in 2.4, especially if the filesystem is ext3 (extra journalling, y'know). 2.6 claims that it does stuff special so that there is no difference.</p> <p>[[edit]]<br /> Boy are we clever! (teddy_bear &amp; me)<br /> It <span style="text-decoration: underline;"><strong>does</strong></span> work. It does swapoff on EVERYTHING (every swap thing) that is active on that disk. Doesn't matter if it's a mounted file partition, a swap partition, or a swapfile. If it's active, Tomato gets rid of it (umount or swapoff).</p> <p>Wasn't specifically designed that way. The way we implemented it just automatically does everything right. I love it!<br /> (Now I have to go to the the doctor, 'cause I think I sprained my arm patting myself on the back. ;-) )</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-922191</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-922191</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 14:27:12 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>You could put the following script, naming it <em>99-umount-swap.autostop</em>, in the root directory of the mounted drive:</p> <div class="code"> <pre> <code>#!/bin/sh # $1 - The fully qualified path of the root directory of the mounted drive # (w/o any trailing '/'). # If no parameter, complain and quit. [[ xx == x$1x ]] &amp;&amp; exit # Unmount the swap partition. SWAP_SPACE=`free | grep Swap: | awk '{print $2}'` if [ $SWAP_SPACE -gt 0 ]; then sed -i "/^LABEL=.* swap swap/d" /etc/fstab swapoff -a fi</code> </pre></div> <p>Which will run if unmount performed via web ui.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-921952</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-921952</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 06:04:01 +0000</pubDate>
				<wikidot:authorName>NReale3370</wikidot:authorName>				<wikidot:authorUserId>586732</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I have swapoff /opt/swap.swp listed in the "run before unmounting" section of the USB/NAS area. Then under the buttons section of admin I have the 0-2 second press set to unmount all usb drives. This way I can just press the little WPS button my router and it will cleanly unmount everything. Obviously you can't do this if you don't have any kind of configurable button on your router but on my 610n it works great.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-921884</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-921884</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 04:06:03 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Well, that's a good question. I <em>assume</em> if you initiate a shutdown via the web ui that the swap partition will be unmounted (swapoff -a) automagically as is the case when one unmounts a drive via the web ui. Nothing will save you from instances where the drive is simply unplugged w/o doing it via the web ui/cli.</p> <p>Always use the web ui/cli to unmount, never simply unplug. I have a script that initiates a clean swapoff but I don't use it as it is done under the covers.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-921809</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-921809</link>
				<description></description>
				<pubDate>Thu, 11 Nov 2010 02:38:50 +0000</pubDate>
				<wikidot:authorName>DHC_DarkShadow</wikidot:authorName>				<wikidot:authorUserId>468945</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>@jomcty</p> <p>How do you go about unmounting swap for rebooting and such?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-921528</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-921528</link>
				<description></description>
				<pubDate>Wed, 10 Nov 2010 21:52:16 +0000</pubDate>
				<wikidot:authorName>DHC_DarkShadow</wikidot:authorName>				<wikidot:authorUserId>468945</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>@jomcty</p> <p>Your solution worked perfectly. Thank you.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-921422</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-921422</link>
				<description></description>
				<pubDate>Wed, 10 Nov 2010 20:22:05 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I was under the impression that there performance issues with the swap file approach under the 2.4 kernel. Of course, you could be using the 2.6 kernel where it isn't an issue.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-921349</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-921349</link>
				<description></description>
				<pubDate>Wed, 10 Nov 2010 19:12:00 +0000</pubDate>
				<wikidot:authorName>mememe2345</wikidot:authorName>				<wikidot:authorUserId>613683</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>This is what I did when I need swap for Transmission, MyextHD is my usb sata hard drive. It works no issue after implantation.</p> <p>Install linux swap</p> <p>dd if=/dev/zero of=/mnt/MyextHD/myswap.swp bs=1k count=64000 (create 64mb swap file at external hd MyextHD)</p> <p>cd bin (go to root of router then change dir to bin-this is where busybox is located)<br /> busybox mkswap /mnt/MyextHD/myswap.swp (setup swap file)<br /> busybox swapon /mnt/MyextHD/myswap.swp (enable swapping on it)</p> <p>That is it.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-921052</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-921052</link>
				<description></description>
				<pubDate>Wed, 10 Nov 2010 12:32:58 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I changed the <em>sed</em> regex slightly to be more specific.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-920904</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-920904</link>
				<description></description>
				<pubDate>Wed, 10 Nov 2010 07:42:19 +0000</pubDate>
				<wikidot:authorName>DHC_DarkShadow</wikidot:authorName>				<wikidot:authorUserId>468945</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <blockquote> <p>Thanks for the script ray123! I tweaked it slightly, hope you don't mind. :)</p> </blockquote> <p>What changes did you make and how did they better server you?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-920519</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-920519</link>
				<description></description>
				<pubDate>Tue, 09 Nov 2010 22:54:22 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks for the script ray123! I tweaked it slightly, hope you don't mind. :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-920386</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-920386</link>
				<description></description>
				<pubDate>Tue, 09 Nov 2010 20:21:24 +0000</pubDate>
				<wikidot:authorName>Rodney Hester</wikidot:authorName>				<wikidot:authorUserId>573885</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Good to know!</p> <p>Rodney</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-920375</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-920375</link>
				<description></description>
				<pubDate>Tue, 09 Nov 2010 20:10:47 +0000</pubDate>
				<wikidot:authorName>ray123</wikidot:authorName>				<wikidot:authorUserId>522497</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'm not sure about that being cleaner. I used to do it that way, but changed over to the autorun method after autoruns got put in.</p> <p>Timing, timing, timing. I HATE timing issues. Things work for a while and then something changes and suddenly they don't work.</p> <p>1) Automount processes the partitions in numerical order.<br /> 2) When a swap partition is processed, it executes "swapon -a"<br /> 3) When a fat/ext partition is processed, it executes "mount", then executes the autoruns.</p> <p>Here's the gotchas:<br /> 1) If the swap partition is after file parition(s), then you don't have swapping until <strong>after</strong> the file partition autoruns have been done. But what if one of those autoruns starts something that <span style="text-decoration: underline;">needs</span> swapping enabled? Like a torrent client or mpd? Can you say, "Mysterious occasional lockup at startup?"<br /> 2) Mount can sometimes take a looooong time. Particularly when it's doing journal recovery on an ext3 partition that was not unmounted cleanly.<br /> 3) Busybox's "swapon -a" will choke if fstab has multiple SWAP entries and one of them isn't there. I made a patch for this that AFAIK is now in Tomato but isn't in the busybox distribution. I used to have several USB drives, each with a swap partition, and put them all in fstab. Worked fine, until the day when one drive was unplugged at bootup.</p> <p>So, all in all, doing the swap in the autorun is much more bullet-proof than the fstab method. Much more robust at no additional cost.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-920175</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-920175</link>
				<description></description>
				<pubDate>Tue, 09 Nov 2010 16:19:29 +0000</pubDate>
				<wikidot:authorName>Rodney Hester</wikidot:authorName>				<wikidot:authorUserId>573885</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>A much cleaner way is to put this in /etc/fstab:</p> <p>LABEL=SWAP none swap sw 0&nbsp;0</p> <p>and then execute "nvram setfile2nvram /etc/fstab; nvram commit".</p> <p>This prevents the need for any autorun script. :)</p> <p>Rodney</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-920160</guid>
				<title>Re: swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-920160</link>
				<description></description>
				<pubDate>Tue, 09 Nov 2010 16:11:26 +0000</pubDate>
				<wikidot:authorName>jomcty</wikidot:authorName>				<wikidot:authorUserId>512420</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>1) Partition and format a drive with a swap partition (&gt;= 15MB) and at least one data partition (if FLASH-based drive use ext2, otherwise use ext3).</p> <p>Assign the swap and data partition a single-word descriptive label. For example use the label <strong><em>SWAP</em></strong> for the swap partition. The <em>SWAPNAME</em> variable in the script will have to reflect this label name.</p> <p>2) Create the following script in the root directory of the data partition of the external drive, using vi, naming it "00-start-swap.autorun":</p> <div class="code"> <pre> <code>#!/bin/sh # $1 - The fully qualified path of the root directory of the mounted drive # (w/o any trailing '/'). # See: http://www.linksysinfo.org/forums/showthread.php?p=364690#post364690 # The decriptive label assigned to the swap partition. SWAPNAME=SWAP # If no parameter, complain and quit. [[ xx == x$1x ]] &amp;&amp; exit # Edit fstab to put the swap partition label there. sed -i "/^LABEL=.* swap swap/d" /etc/fstab echo "LABEL=$SWAPNAME swap swap" &gt;&gt;/etc/fstab # Activate the swap partition swapon -a</code> </pre></div> <p>Save the script and make it executable by issuing:</p> <div class="code"> <pre> <code>chmod 0755 00-start-swap.autorun</code> </pre></div> <p>against the newly created script.</p> <p>With the script in place in the root-directory of the mounted drive the swap partition will be mounted whenever the drive is plugged in.</p> <p>The swap partition will auto-unmount when the drive is unmounted via the Tomato GUI.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-282649#post-919917</guid>
				<title>swap in tomatousb</title>
				<link>http://tomatousb.org/forum/t-282649/swap-in-tomatousb#post-919917</link>
				<description></description>
				<pubDate>Tue, 09 Nov 2010 08:46:35 +0000</pubDate>
				<wikidot:authorName>DHC_DarkShadow</wikidot:authorName>				<wikidot:authorUserId>468945</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>In short, how do you enable swap in tomatausb?</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>