This wiki is a community-maintained resource about everything there is to know about IPFire. Join us and help us improving it!
Use the search and find answers to everything about IPFire. If you cannot find what you are looking for, join our community and talk to fellow IPFire users, developers and everybody else involved in the project.
When using a CF-card as the system disk, it is advisable to link permanent writing files to an external media to extend the lifetime of that flash memory. An external hard drive can be for example an USB stick or USB hard drive.
The first step is to connect the device to one of IPFire's USB ports. Then the external media will be tethered by the service ExtraHD via the web interface in the section --> services --> ExtraHD. In the area below the new media /dev/sdb can then be integrated by clicking the red pencil with the "+" symbol.
Now the new media should be listed in the upper section of the "ExtraHD" site and may look similar to the following screenshoot:
UUID=abcd1234-1234-1234-abcd-1234567890 auto /mnt/WhatEverYouEntered
You should enable the SSH service and log in with:
ssh -p 222 root@yourIPFromIPFire
Now the new target directory, where the logs should be placed on the new media, will be shown.
cp -a /var/log/* /mnt/MyNewHD/log/
[user@myipfire~]# ls -l /dev/disk/by-uuid total 0 lrwxrwxrwx 1 root root 10 2012-01-14 12:56 qwertzui-2af7-4729-qrst-123456789012 -> ../../sda4 lrwxrwxrwx 1 root root 10 2012-01-14 12:56 asdfghjk-1318-4239-mnop-123450987650 -> ../../sdb1 lrwxrwxrwx 1 root root 10 2012-01-14 12:56 yxcvbnmä-573a-4713-ijkl-567890543215 -> ../../sdb2 lrwxrwxrwx 1 root root 10 2012-01-14 12:56 üpoiuztr-9231-4524-efgh-098765432109 -> ../../sda1 lrwxrwxrwx 1 root root 10 2012-01-14 12:56 äölkjhgf-fb35-4922-abcd-222223334444 -> ../../sda3
Info: sda1 & 3 & 4 are the sectors of three partitions of the system on the CF Card
Info: sdb1 is on the USB-media which will be used for the log directory
Info: sdb2 is a section on the USB-media which won´t be used in here
Find some additional information how to use Nano here.
UUID=asdfghjk-1318-4239-mnop-123450987650 /var/log ext2 defaults 0 0
mv log logold
cd /var/ rm -rf logold
If you delete the directory, it is possible some functions are bugging out (e.g. cron/logwatch) and statistics may be wrong. So it should only be deleted if you are really sure that the USB-media is used for the log. This can be checked if the Firewall-Logs in the webinterface are up to date.
cd /var/ ln -s /mnt/MyNewHD/log/ /var/log
cd /mnt/MyNewHD/log ls -al
The output should look like:
rwxrwxrwx 1 root root 10 2012-01-14 12:56 log -> /var/log
Now the system can be rebooted and from now on the logs should be written to the USB-media.
After updates the symbolic links will be overwritten and set back to default. Repeat the steps from "mv log logold" --> "ln -s /mnt/MyNewHD/log/ /var/log" and reboot the system to let the changes on the system take effect. That´s it.
If there are update jumps over min. two versions, the log directory should be copied back to the CF-card otherwise faults will be occur.
The IPFire team would like to say thanks to 5p9 for this wiki :-)