IoT Bytes

Bits and Bytes of IoT

Tiny Core Persistence – Notes

Pradeep Singh | 1st Sep 2017

TinyCore Icon copy

1. How to Make Config Persistent:

1.1 Edit the ‘.filetool.lst‘ File:

The text file “/opt/.filetool.lst” lists all the files and the directories that are supposed to be backed up when you execute ‘filetool.sh -b‘ command. For example, if you wish to preserve your user passwords, you may add Password shadow file path to this file using the following command (or you can manually edit using any text editor)  –

sudo echo '/etc/shadow' >> /opt/.filetool.lst

Following is the console output for the same, along with the “cat” command output to display the final contents of the “.filetool.lst” file –

tc@box:~$ cat /opt/.filetool.lst
opt
home
/etc/shadow
tc@box:~$ 

1. 2 Backup Config Files Defined in ‘.filetool.lst‘ File:

Tiny Core includes the ‘filetool‘ utility for saving personal settings and data using the paths defined in ‘/opt/.filetool.lst‘. You can trigger the backup using the following command –

filetool.sh -b

Following is the console output for this command –

tc@box:~$ filetool.sh -b
Backing up files to /mnt/sda1/tce/mydata.tgztc@box:~$ 
tc@box:~$ 

1.3 Edit the Startup File (Optional Step):

To load a library or execute a command every time the computer boots up,  you need to add it into the ‘/opt/bootlocal.sh‘ file. For example, you can execute the following command to start the Ssh service automatically after system reboot –

sudo echo '/usr/local/etc/init.d/openssh start &' >> /opt/bootlocal.sh

backup the configuration using the following command –

filetool.sh -b

Following is the console output for the same, along with the “cat” command output to display the final contents of the “bootlocal.sh” file –

tc@box:~$ echo '/usr/local/etc/init.d/openssh start &' >> /opt/bootlocal.sh
tc@box:~$ 
tc@box:~$ cat /opt/bootlocal.sh 
#!/bin/sh
# put other system startup commands here
/usr/local/etc/init.d/openssh start &
tc@box:~$ 

2. Persistence for Dummies:

The Tiny Core Wiki page has a very good article on Persistence. Following is the link for the same –

http://wiki.tinycorelinux.net/wiki:persistence_for_dummies

3. YouTube Video:

Following is a good YouTube video that explains different persistence methods used with Tiny Core Linux –

4. Core Book:

The Core Book is about the x86 version in details, but generic parts, like the concept, tools, etc. valid for other ports, like piCore. You can access this book at the following url –

http://tinycorelinux.net/book.html

5. Tiny Core FAQs:

You can also find some good information under FAQ Section –

http://distro.ibiblio.org/tinycorelinux/faq.html


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: