Journalling Flash File System/zh cn - Revision history http://wiki.dd-wrt.com/wiki/index.php?title=Journalling_Flash_File_System/zh_cn&action=history Revision history for this page on the wiki en MediaWiki 1.10.1 Thu, 28 Mar 2024 20:21:51 GMT Wufangzhuo: /* Options for Increasing JFFS Space */ http://wiki.dd-wrt.com/wiki/index.php?title=Journalling_Flash_File_System/zh_cn&diff=36821&oldid=prev <p><span class="autocomment">Options for Increasing JFFS Space</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 04:51, 27 October 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 103:</strong></td> <td colspan="2" align="left"><strong>Line 103:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Afterwards you can delete these variables with &quot;nvram unset &lt;variable&gt;&quot;.</td><td> </td><td style="background: #eee; font-size: smaller;">Afterwards you can delete these variables with &quot;nvram unset &lt;variable&gt;&quot;.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">=<del style="color: red; font-weight: bold; text-decoration: none;">Options for Increasing JFFS Space</del>=</td><td>+</td><td style="background: #cfc; font-size: smaller;">=<ins style="color: red; font-weight: bold; text-decoration: none;">增加JFFS空间的方法</ins>=</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">== Add a 1GB flash memory card ==</td><td> </td><td style="background: #eee; font-size: smaller;">== Add a 1GB flash memory card ==</td></tr> </table> Wed, 27 Oct 2010 04:51:13 GMT Wufangzhuo http://wiki.dd-wrt.com/wiki/index.php/Talk:Journalling_Flash_File_System/zh_cn Wufangzhuo: /* 说明 */ http://wiki.dd-wrt.com/wiki/index.php?title=Journalling_Flash_File_System/zh_cn&diff=36820&oldid=prev <p><span class="autocomment">说明</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 04:46, 27 October 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 2:</strong></td> <td colspan="2" align="left"><strong>Line 2:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">= 说明 =</td><td> </td><td style="background: #eee; font-size: smaller;">= 说明 =</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">'''[[Glossary#Journalling Flash File System (JFFS)|Journalling Flash File System]]''' (JFFS/JFFS2) <del style="color: red; font-weight: bold; text-decoration: none;">is a re-writable area within a DD</del>-WRT-enabled <del style="color: red; font-weight: bold; text-decoration: none;">device</del>.</td><td>+</td><td style="background: #cfc; font-size: smaller;">'''[[Glossary#Journalling Flash File System (JFFS)|Journalling Flash File System]]''' (JFFS/JFFS2) <ins style="color: red; font-weight: bold; text-decoration: none;">是DD</ins>-WRT-enabled <ins style="color: red; font-weight: bold; text-decoration: none;">设备中一块可反复写的区域</ins>.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* Located in ''/jffs''.</td><td> </td><td style="background: #eee; font-size: smaller;">* Located in ''/jffs''.</td></tr> </table> Wed, 27 Oct 2010 04:46:49 GMT Wufangzhuo http://wiki.dd-wrt.com/wiki/index.php/Talk:Journalling_Flash_File_System/zh_cn Leangjia: /* Enable JFFS: Create ''/jffs'' */ http://wiki.dd-wrt.com/wiki/index.php?title=Journalling_Flash_File_System/zh_cn&diff=36221&oldid=prev <p><span class="autocomment">Enable JFFS: Create ''/jffs''</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 04:50, 7 October 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 21:</strong></td> <td colspan="2" align="left"><strong>Line 21:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* JFFS must be Enabled for certain /jffs-dependent applications.</td><td> </td><td style="background: #eee; font-size: smaller;">* JFFS must be Enabled for certain /jffs-dependent applications.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">= <del style="color: red; font-weight: bold; text-decoration: none;">Enable JFFS: Create </del>''/jffs'' =</td><td>+</td><td style="background: #cfc; font-size: smaller;">= <ins style="color: red; font-weight: bold; text-decoration: none;">启用JFFS:创建 </ins>''/jffs''<ins style="color: red; font-weight: bold; text-decoration: none;">挂载点 </ins>=</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">==<del style="color: red; font-weight: bold; text-decoration: none;">Prerequisites</del>==</td><td>+</td><td style="background: #cfc; font-size: smaller;">==<ins style="color: red; font-weight: bold; text-decoration: none;">前提条件</ins>==</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">To enable JFFS you will need a router with at least 4MB flash, a build that supports JFFS such as the Mini build which is the smallest build to support JFFS thus leaving the most space for the JFFS partition, and your build must leave at least 324KB of flash free for the JFFS file system structure which will not be usable space. v24 pre-SP2 Standard builds no longer leave enough space for JFFS on 4MB devices so use the Mini build or one of Eko's specialty builds.</td><td> </td><td style="background: #eee; font-size: smaller;">To enable JFFS you will need a router with at least 4MB flash, a build that supports JFFS such as the Mini build which is the smallest build to support JFFS thus leaving the most space for the JFFS partition, and your build must leave at least 324KB of flash free for the JFFS file system structure which will not be usable space. v24 pre-SP2 Standard builds no longer leave enough space for JFFS on 4MB devices so use the Mini build or one of Eko's specialty builds.</td></tr> <tr><td colspan="2" align="left"><strong>Line 93:</strong></td> <td colspan="2" align="left"><strong>Line 93:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">A user comments: I tried the previous commands under La Fonera firmware v24 RC4 and corrupted all my settings. I had to recover my unit with the procedures on La Fonera flashing page. I am not sure if this is a bug or these commands are not suited for La Fonera. Please try to use the web interface above. It works for me.</td><td> </td><td style="background: #eee; font-size: smaller;">A user comments: I tried the previous commands under La Fonera firmware v24 RC4 and corrupted all my settings. I had to recover my unit with the procedures on La Fonera flashing page. I am not sure if this is a bug or these commands are not suited for La Fonera. Please try to use the web interface above. It works for me.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">To unmount the JFFS: </del></td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">要卸载 JFFS: </ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> nvram set sys_enable_jffs2=0</td><td> </td><td style="background: #eee; font-size: smaller;"> nvram set sys_enable_jffs2=0</td></tr> </table> Thu, 07 Oct 2010 04:50:13 GMT Leangjia http://wiki.dd-wrt.com/wiki/index.php/Talk:Journalling_Flash_File_System/zh_cn Leangjia: /* Introduction */ http://wiki.dd-wrt.com/wiki/index.php?title=Journalling_Flash_File_System/zh_cn&diff=36220&oldid=prev <p><span class="autocomment">Introduction</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 04:46, 7 October 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">{{languages|Journalling_Flash_File_System}}</td><td> </td><td style="background: #eee; font-size: smaller;">{{languages|Journalling_Flash_File_System}}</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">= <del style="color: red; font-weight: bold; text-decoration: none;">Introduction </del>=</td><td>+</td><td style="background: #cfc; font-size: smaller;">= <ins style="color: red; font-weight: bold; text-decoration: none;">说明 </ins>=</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">'''[[Glossary#Journalling Flash File System (JFFS)|Journalling Flash File System]]''' (JFFS/JFFS2) is a re-writable area within a DD-WRT-enabled device.</td><td> </td><td style="background: #eee; font-size: smaller;">'''[[Glossary#Journalling Flash File System (JFFS)|Journalling Flash File System]]''' (JFFS/JFFS2) is a re-writable area within a DD-WRT-enabled device.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* Located in ''/jffs''.</td><td> </td><td style="background: #eee; font-size: smaller;">* Located in ''/jffs''.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">Contents stored:</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">内容存储:</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* On DD-WRT Device main flash directly on the device (''/jffs''), or</td><td> </td><td style="background: #eee; font-size: smaller;">* On DD-WRT Device main flash directly on the device (''/jffs''), or</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* ''mount --bind /storagelocation /jffs''.&lt;br&gt;Where ''storagelocation'' is</td><td> </td><td style="background: #eee; font-size: smaller;">* ''mount --bind /storagelocation /jffs''.&lt;br&gt;Where ''storagelocation'' is</td></tr> <tr><td colspan="2" align="left"><strong>Line 20:</strong></td> <td colspan="2" align="left"><strong>Line 20:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* Many other things.</td><td> </td><td style="background: #eee; font-size: smaller;">* Many other things.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* JFFS must be Enabled for certain /jffs-dependent applications.</td><td> </td><td style="background: #eee; font-size: smaller;">* JFFS must be Enabled for certain /jffs-dependent applications.</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">= Enable JFFS: Create ''/jffs'' =</td><td> </td><td style="background: #eee; font-size: smaller;">= Enable JFFS: Create ''/jffs'' =</td></tr> </table> Thu, 07 Oct 2010 04:46:48 GMT Leangjia http://wiki.dd-wrt.com/wiki/index.php/Talk:Journalling_Flash_File_System/zh_cn Leangjia: New page: {{languages|Journalling_Flash_File_System}} = Introduction = '''Journalling Flash File System''' (JFFS/JFFS2) is a re-writable area withi... http://wiki.dd-wrt.com/wiki/index.php?title=Journalling_Flash_File_System/zh_cn&diff=36219&oldid=prev <p>New page: {{languages|Journalling_Flash_File_System}} = Introduction = '''<a href="/wiki/index.php/Glossary#Journalling_Flash_File_System_.28JFFS.29" title="Glossary">Journalling Flash File System</a>''' (JFFS/JFFS2) is a re-writable area withi...</p> <p><b>New page</b></p><div>{{languages|Journalling_Flash_File_System}}<br /> <br /> = Introduction =<br /> '''[[Glossary#Journalling Flash File System (JFFS)|Journalling Flash File System]]''' (JFFS/JFFS2) is a re-writable area within a DD-WRT-enabled device.<br /> <br /> * Located in ''/jffs''.<br /> <br /> Contents stored:<br /> * On DD-WRT Device main flash directly on the device (''/jffs''), or<br /> * ''mount --bind /storagelocation /jffs''.&lt;br&gt;Where ''storagelocation'' is<br /> ** Off-board supplemental flash, see [[SD/MMC_mod]], (''/mmc/jffs'').<br /> ** Network Area Storage [NAS], or Server. (''//servername/sharename'')<br /> ** JFFS reports as it's own free space, the free space on Share or SD Card, in the Web Interface<br /> <br /> '''Examples of the kind of programs and data are''':<br /> * Custom configuration files<br /> * NoCat splash pages and configuration<br /> * [[Ipkg|ipkg]] (Requires JFFS. See ipkg.)<br /> * Web-site hosting<br /> * Many other things.<br /> * JFFS must be Enabled for certain /jffs-dependent applications.<br /> <br /> <br /> = Enable JFFS: Create ''/jffs'' =<br /> <br /> ==Prerequisites==<br /> <br /> To enable JFFS you will need a router with at least 4MB flash, a build that supports JFFS such as the Mini build which is the smallest build to support JFFS thus leaving the most space for the JFFS partition, and your build must leave at least 324KB of flash free for the JFFS file system structure which will not be usable space. v24 pre-SP2 Standard builds no longer leave enough space for JFFS on 4MB devices so use the Mini build or one of Eko's specialty builds.<br /> <br /> ''Very old versions of some Linksys routers (no longer manufactured for many years) contained 8MB of Flash and 32MB of RAM, many DD-WRT-capable devices today contain 4MB of Flash memory; a few models from certain manufacturers contain more flash (La Fonera, [[ASUS WL-500g Premium|ASUS WL-500GP]]), some contain less (2MB). See [[Supported_Devices|Supported Devices]].&lt;br&gt;<br /> <br /> Note that '''DD-WRT v24sp1 VPN builds have the JFFS feature removed''', presumably due to conflicts that Brainslayer found between JFFS and bandwidth monitoring. See [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=31932&amp;postdays=0&amp;postorder=asc&amp;highlight=jffs+menu&amp;start=0 this thread] for more information. Users interested in v24sp2 can opt:<br /> <br /> # Use a build other than VPN, both MINI and MEGA still have JFFS<br /> # Use an older build of DD-WRT<br /> # Use a custom build, either homemade or [http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24_TNG/svn10086/dd-wrt.v24-10086_NEWD_openvpn_jffs_small.bin dd-wrt.v24-10086_NEWD_openvpn_jffs_small.bin], which is described [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=36037&amp;p=200431#200431 here] as missing &quot;snmp, all languages, some GUI styles and more.&quot;.<br /> <br /> '''NOTE FOR ASUS WL500W'''<br /> <br /> As of October 7th, 2009, consider the following or you may BRICK you router:<br /> <br /> Brainslayers mega flash size - 7.33MB<br /> <br /> Eko's Big Flash size - 5.9MB<br /> <br /> Now, the error only occurs when JFFS2 is enabled and the router reboots, so you are safe if you DONT enable JFFS2.<br /> <br /> Total available JFFS2 size for BS's build is 640KB which overwhelms the kernel and causes a panic. Even using a storage device with the command mount -o bind /mnt/jffs /jffs will still cause a kernel panic.<br /> <br /> Eko's JFFS2 partition size is 1640KB+, allowing much more room.<br /> <br /> I tested this on BS's 12996,12874 and 12533 builds and partially bricked my router several times. (A simple power disconnect for 30 secs will allow it to recover)<br /> <br /> Eko's build however works flawlessly AND provides the SAME features (except for connection warning) as BS's.<br /> <br /> One thing I am still unsure of is why this particular model Asus router is subject to this bug, but in the mean time, I suggest using Eko's Big build until the dev's can work it out..<br /> <br /> == Flash Wear: A Warning ==<br /> Take care not to store frequently changing files (i.e. often-changing log files) on Flash as this can cause flash wear-out over time.<br /> * A journalling flash file system is specifically designed to minimize frequent overwrites.<br /> * Files which are read many times but written infrequently work well on main flash. <br /> * Using the space provided by [[SD/MMC_mod]] places wear on replaceable secondary flash storage.<br /> <br /> <br /> == Directions for (normal) users: using Web-GUI Interface==<br /> ''The steps to enable JFFS through the router web page are very specific. To avoid having to reset and reprogram your router, it's smart to make a backup here of your settings. If you follow these steps exactly, it should not lock up.'' <br /> # On the router web page click on ''Administration''. <br /> # Scroll down until you see ''JFFS2 Support'' section.<br /> # Click ''Enable JFFS''.<br /> # Click ''Save''.<br /> # Wait couple seconds, then click ''Apply''. <br /> # Wait again. Go back to the ''Enable JFFS'' section, and enable ''Clean JFFS''. <br /> # '''Do not click &quot;Save&quot;.''' Click '''Apply''' instead.&lt;br&gt;&lt;br&gt;The router formats the available space.&lt;br&gt;&lt;br&gt;<br /> # Wait till you get the web-GUI back, then disable &quot;Clean JFFS&quot; again.<br /> # Click &quot;Save&quot;.<br /> # It may be wise to Reboot the router, just to make sure<br /> <br /> <br /> ==Directions for (freaky) Linux Gurus: CLI==<br /> Enter the following commands from the CLI:<br /> <br /> nvram set jffs_mounted=1<br /> nvram set enable_jffs2=1<br /> nvram set sys_enable_jffs2=1<br /> nvram set clean_jffs2=1<br /> nvram set sys_clean_jffs2=1<br /> nvram commit<br /> reboot<br /> <br /> Note: Device might reboot/hang after cleaning which might take long; be patient.<br /> <br /> '''WARNING'''<br /> <br /> A user comments: I tried the previous commands under La Fonera firmware v24 RC4 and corrupted all my settings. I had to recover my unit with the procedures on La Fonera flashing page. I am not sure if this is a bug or these commands are not suited for La Fonera. Please try to use the web interface above. It works for me.<br /> <br /> To unmount the JFFS: <br /> <br /> nvram set sys_enable_jffs2=0<br /> nvram set sys_clean_jffs2=0<br /> nvram set jffs_mounted=0<br /> nvram commit<br /> reboot<br /> <br /> Afterwards you can delete these variables with &quot;nvram unset &lt;variable&gt;&quot;.<br /> <br /> =Options for Increasing JFFS Space=<br /> <br /> == Add a 1GB flash memory card ==<br /> * Add the [[SD/MMC mod]]<br /> ** up to (at least) 1GB storage using common swappable SD memory cards (built-in support with DD-WRT v2.4 and later).<br /> ** create the folder /mmc/jffs<br /> ::: ''mkdir /mmc/jffs''<br /> :* Use the Mount Bind command to point /jffs to the storage card:<br /> ::: ''mount --bind /mmc/jffs /jffs''<br /> :* with v24 enable JFFS2 support (tab: Administration -&gt; tab: Management -&gt; section: JFFS2 Support)<br /> :: or command ''nvram set sys_enable_jffs2=1''<br /> :* To use ipkg also create folder /jffs/tmp/ipkg<br /> :::''mkdir /jffs/tmp''<br /> :::''mkdir /jffs/tmp/ipkg''<br /> * For Windows: [[WinSCP]] can be used to transfer files to and from the router, eliminating the need to pull the card out and put it in a card reader on a PC.<br /> * For Linux, Mac OS X: Other SCP transfer applications exist.<br /> * Removed cards can be accessed natively in Linux or OS X, or on Windows with the Ext2FS driver ([http://www.fs-driver.org] or [http://ext2fsd.sourceforge.net]). <br /> * On older firmware (v2.3), the limited JFFS space can be used to hold the drivers to load support for the SD card.<br /> <br /> <br /> == Add USB Storage ==<br /> * Routers with USB storage like [[Linksys WRTSL54GS]] or [[ASUS WL-500g Premium]] can have firmware with built-in USB support and then /jffs mounted on the USB device. To enable USB on these devices see: [[USB_storage]]<br /> ** V24 and later firmware: USB support is available within Mega and some Mini builds.<br /> <br /> *Using V24SP1 Mega on an Asus WL-500W with external USB HDD:<br /> <br /> :To mount the USB drive, and enable /jffs<br /> mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt<br /> mkdir /mnt/jffs<br /> mount /mnt/jffs /jffs<br /> <br /> *Also enable JFFS2 support in either web-GUI (tab: Administration -&gt; tab: Management -&gt; section: JFFS2 Support)<br /> : or with the command <br /> nvram set sys_enable_jffs2=1<br /> *To use ipkg also create folder /jffs/tmp/ipkg<br /> mkdir /jffs/tmp<br /> mkdir /jffs/tmp/ipkg<br /> <br /> ==Using [[CIFS]] (Client Samba): Storing ''/jffs'' content remotely==<br /> One option is to create a share on the network and mount it on the router at ''/jffs'' using [[CIFS]]. Exact steps at [[CIFS]]<br /> <br /> Overview:<br /> * Enable JFFS in the web-GUI or put the following command in a Script or Startup Command.<br /> nvram set sys_enable_jffs2=1<br /> * Create a share on a CIFS-capable server called ''jffs''.<br /> ** Standard Microsoft Windows Shared Folder<br /> ** Other operating systems may refer to SMB or Samba<br /> * In the Web GUI mount the [[CIFS]] share at ''/jffs''.<br /> * Folder ''/jffs'' appears locally, while<br /> : Content actually saved remotely, on<br /> :* NAS (Network Attached Storage)<br /> :* Server (PC or some type of file server)<br /> * To use ipkg also create folder /jffs/tmp/ipkg<br /> ::''mkdir /jffs/tmp''<br /> ::''mkdir /jffs/tmp/ipkg''<br /> '''Costs:'''<br /> * ! Setting up a NAS or Server only for router maybe not economical.<br /> ** Equipment Costs: Requires existing NAS or PC Server<br /> ** Electricity Costs: if entire Server is only serving router<br /> * Availability Demands: CIFS share must be available<br /> ** 24/7, or whenever the DD-WRT Device is on, and<br /> ** Storing JFFS Share on quality equipment is required (i.e. Raid, Power Backup)<br /> *** ! Remote storage down means /jffs down, could mean DD-WRT Device down (increases the weak points).<br /> * Security Limitations: CIFS is limited to Microsoft's SMB protocol, offering up to only 128-bit security.<br /> ** Poor Microsoft Protocol Security is not a problem if the LAN is physically and electronically protected from outside or inside intrusion (i.e. Guards, Guns, Locks, Dogs, Mines, Cameras, Firewalls)<br /> * LAN Connection Required: NAS cannot be wirelessly attached to DD-WRT Device.<br /> * Hassle: Using Microsoft Windows as the ''jffs'' Server<br /> ** ! Symbolic links in ''/jffs'' may not work.<br /> ** ! Rename (mv) commands on the ''/jffs'' mount may not work.<br /> <br /> '''Most people only own an (inexpensive) Windows PC. A common Desktop PC does not a 24/7 Server make.'''<br /> <br /> <br /> '''The following non-updated (as of 20080520) examples may be out of date:'''<br /> * CIFS was broken on many builds this update author tried. Although other people have reported it working - It may be a limitation of ''BusyBox'' CIFS when using NTLMv2 and 128-bit encryption.<br /> * (Mostly) only structural and spelling mistakes were corrected below (20080522)<br /> <br /> ===Use a Startup Script: Example 1===<br /> # Read how to use [[Startup Scripts]]. Then place the following into your startup script to mount the JFFS partition:<br /> <br /> umount /jffs #unmounts existing /jffs if existing<br /> mount.cifs //&lt;server's IP&gt;/jffs /jffs -o username=&lt;the username&gt;,password=&lt;the password&gt;<br /> nvram set sys_enable_jffs2=1 # fake-enable JFFS. Enable but do not commit. Makes ipkg think jffs2 is enabled.<br /> <br /> NOTE: Username is ''Guest'' when hosted on Windows XP &amp; 'Simple File Sharing' is enabled - This is the default on Windows XP Home.<br /> <br /> ===Use Startup Scripts: Example 2===<br /> This method uses 2 scripts: The first will be started from /tmp/smbshare &amp; mount the samba share under /jffs and start the other script. The second will be started from /jffs and unmount /tmp/sambashare.<br /> <br /> Instructions:<br /> <br /> # Enable [[CIFS]] (see also [[Jffs_sharing_in_a_Linux_server]]).<br /> # Create a script called &quot;startup.smb.sh&quot; on the share:<br /> <br /> #!/bin/sh<br /> <br /> #smb settings: same as the settings in the webgui<br /> # change these to mount a different share than the current at /jffs<br /> SMBSHARE=`nvram get samba_share`<br /> SMBUSER=`nvram get samba_user`<br /> SMBPASS=`nvram get samba_password`<br /> <br /> #script to start in /jffs once we're done mounting<br /> JFFS_SCRIPT=startup.jffs.sh<br /> <br /> #where to log what is happening<br /> export SMBLOG=/tmp/smblog<br /> <br /> ####### ok, here we go... ;) #######<br /> echo &quot;&quot; &gt; $SMBLOG<br /> cd /<br /> <br /> #make sure JFFS is unmounted.<br /> echo &quot;umounting /jffs if necessary...&quot; &gt;&gt; $SMBLOG<br /> umount /jffs &gt;&gt; $SMBLOG 2&gt;&amp;1<br /> <br /> #mount our smbshare at /jffs<br /> echo &quot;mounting $SMBSHARE at /jffs...&quot; &gt;&gt; $SMBLOG<br /> mount.cifs $SMBSHARE /jffs -o username=$SMBUSER,password=$SMBPASS &gt;&gt; $SMBLOG 2&gt;&amp;1<br /> <br /> #hand over startup to the JFFS part<br /> /jffs/$JFFS_SCRIPT &amp; &gt;&gt; $SMBLOG 2&gt;&amp;1<br /> 4. create a script called &quot;startup.jffs.sh&quot; on the share:&lt;br&gt;<br /> #!/bin/sh<br /> <br /> #wait a sec, just to be sure the smb startup script has quit<br /> sleep 1<br /> <br /> #unmount the smbshare, its identical to /jffs now anyway :)<br /> umount /tmp/smbshare<br /> <br /> #to enable ipkg, we fake JFFS enabled.<br /> #since theres no commit, this wont actually create a /jffs at Startup.<br /> nvram set sys_enable_jffs2=1<br /> <br /> #ready to do specific stuff, like starting services<br /> #or other commands from /jffs<br /> <br /> 5. in the webinterface, enable [[CIFS]] with appropriate share/user/pass settings from step 2.&lt;br&gt;<br /> * Enter &quot;startup.smb.sh&quot; as the script&lt;br&gt;<br /> 6. Apply Changes&lt;br&gt;<br /> 7. reboot&lt;br&gt;<br /> &lt;br&gt;<br /> Now you should have the share configured in the web interface mounted at /jffs and should also be able to run 'ipkg' !<br /> <br /> *NOTE: If you are a Linux newbie, and you have problems with file permissions, look at [http://wrt-wiki.bsr-clan.de/index.php?title=Jffs_sharing_in_a_Linux_server this ]<br /> <br /> *Script files must be saved in UNIX format, not DOS. Windows editors that can do this are UltraEdit. EditPadPro and Crimson Editor, are free.<br /> *[[WinSCP]] can be used to easily change the execute flags on the scripts.<br /> <br /> ===Use Startup Script: Example 3 ===<br /> This method requires 2 shares available for DD-WRT, but allows you to have 2 different areas of storage for the router. Some might find it useful. It is an amalgamation of the previous 2 methods.<br /> <br /> Things you need:<br /> <br /> * 2 writeable shares on an NAS or Server.<br /> <br /> Procedure:<br /> <br /> 1. Enable [[CIFS]]&lt;br /&gt;<br /> 2. Create a shell script in the network share, as follows:&lt;br /&gt;<br /> <br /> #!/bin/sh<br /> nvram set sys_enable_jffs2=1 # fake-enable JFFS<br /> umount /jffs # unmount /jffs if it exists<br /> mount.cifs //&lt;server's IP&gt;/&lt;jffs share name&gt; /jffs -o username=&lt;your username&gt;,password=&lt;your password&gt;<br /> <br /> 3. Enter the name of the script in the CIFS-Samba startup script box in the Web Interface.&lt;br&gt;<br /> 4. Apply changes.&lt;br&gt;<br /> 5. Reboot<br /> <br /> As an example network setup:<br /> <br /> * '''/tmp/smbshare''' located in a shared folder on the NAS called '''ddwrt''', which contains scripts (including '''startup.sh''' containing the above commands), yet to be installed packages and other static data<br /> * '''/jffs''' located in a shared folder called '''jffs''', which contains program data for installed packages<br /> <br /> = Testing [[ipkg]]=<br /> Log in to the CLI (via Telnet or SSH) and enter the following commands:&lt;br&gt;<br /> cd /jffs<br /> mkdir -p /jffs/tmp/ipkg<br /> ipkg update<br /> ipkg list<br /> It is recommended that you reboot the router after running the above commands.<br /> <br /> [[Category:Advanced end user]]<br /> [[Category:Advanced tutorials]]</div> Thu, 07 Oct 2010 04:45:42 GMT Leangjia http://wiki.dd-wrt.com/wiki/index.php/Talk:Journalling_Flash_File_System/zh_cn