Committing to flash
From WL-HDD Wiki
| WL-HDD Contents |
|---|
| What is the WL-HDD |
| Features |
| Pro's/con's |
| Reviews |
| Hacking |
| Inserting the HDD |
| Hacking Guides |
| Basic setup guides |
| Packages guides |
| Requests |
| Troubleshooting |
| This Wiki |
| Credits |
| Editing help |
| Contact Me |
[edit] Prerequisites
To complete this guide, the following is assumed:
| You are running Oleg's firmware (1.9.2.7-6b or later) |
| You have harddisk partitions up and running with an extended filesystem mounted to /opt |
| You have installed the Ipkg package system. |
| You have configured your partitions to automount. |
[edit] For the directory /usr/local/sbin
I imagine that you are creating a post-* file in /usr/local/sbin
Anything that you create in this directory is stored in the temporary flash memory. When the router restarts, this is purged and the files from the permanent flash memory are loaded up again.
To make your changes to files in this directory permanent, you have to commit them to the permanent flash memory.
flashfs save flashfs commit flashfs enable
Then reboot and check that the changes have been committed
reboot
[edit] For other directories such as /etc
The directory /usr/local/sbin is included in a list of directories which will be included when you save and commit to flashfs.
However, directories such as /etc are not included. You may wish to make changes to some files in this directory such as the passwd and group files.
Once you have made your changes, you need to tell the router to include these files in the list of things to be included when you save and commit to flashfs.
For example, lets say we have just modified /etc/group :
echo "/etc/group">>/usr/local/.files flashfs save
you will see something similar to this:
[jono@asus root]$ flashfs save tar: Removing leading '/' from member names etc/group tmp/local/ tmp/local/.files tmp/local/etc/ tmp/local/etc/no-ip2.conf tmp/local/etc/dropbear/ tmp/local/etc/dropbear/dropbear_rsa_host_key tmp/local/etc/dropbear/dropbear_dss_host_key tmp/local/sbin/ tmp/local/sbin/post-boot tmp/local/sbin/post-firewall tmp/local/root/ tmp/local/root/.ssh/ tmp/local/root/.ssh/known_hosts -rw-r--r-- 1 jono root 2340 Jan 12 18:28 /tmp/flash.tar.gz Check saved image and type "/sbin/flashfs commit" to commit changes [jono@asus root]$
if etc/group is included, as it is above then we can commit our changes
flashfs commit flashfs enable
now reboot and check that changes have been made permanently
reboot
