Tiny Core Linux

Tiny Core Base => Micro Core => Topic started by: Ewidar on February 20, 2012, 01:10:05 PM

Title: [SOLVED] Persistence
Post by: Ewidar on February 20, 2012, 01:10:05 PM
Hi,

I am currently trying to use Micro Core on a Virtual Machine (VMware Player). I have installed micro core using the Core-4.2.1 iso. My problem is to get my files to be persistent.
Actually, all the files stored in my home folder are persistent as well as my opt/ files (which is a good news as I read that the file /opt/.filetool.lst decide what is persistent).

I've followed all the steps described in the wiki and in several threads that I found on the forum but I can't get to keep any change on the files in my /etc folder (shadow for example) or /usr/local/etc (ssh/ssh_config for example). Here is the content of my .filetool.lst :

Code: (other) [Select]
etc/shadow
opt
home
usr/local/etc/ssh

I also checked and the value of $BACKUP is 1 so the changes I make should be saved after a restart.

I would really appreciate some help on this issue !
Thank you !
Title: Re: Persistence
Post by: roberts on February 20, 2012, 01:20:33 PM
Is the backup being performed?
On Core from the prompt type backup

$ backup

Or you might want to make an alias to perform backup and if successul then shutdown.
Something like this to your .ashrc

alias bo='filetool.sh -b && sudo poweroff`

Then from prompt
$ bo

You can preview a backup by doing a dry run with the following
filetool.sh -d

Title: Re: Persistence
Post by: Ewidar on February 20, 2012, 01:40:22 PM
Hi Roberts,

Infact, seems like the backup was not performed correctly : Only the files in home and opt where saved. Is it possible even if etc was specified in the .filetool.lst ? Or is there something that I didn't get  ?

Anyway by forcing to make a backup as you suggested, it finally works ! Thank you for your help =)
Title: Re: [SOLVED] Persistence
Post by: rprince on December 02, 2012, 08:15:58 AM
@roberts:
Does this imply that by default rebooting/shutting down in MicroCore does not run backup?

A lot of the docs say that backup will happen when you shutdown, but I assume they are referring to TinyCore, though it is not entirely clear.

Is there any way of getting MicroCore to backup automatically upon reboot/shutdown, and restore upon bootup?

Cheers,
Rikki
Title: Re: [SOLVED] Persistence
Post by: roberts on December 02, 2012, 09:38:13 AM
It is assumed that if you are running a CLI only system that you control if a backup occurs or not.
Use the simple backup command, or script it to be included. It has not be a request to change this behavior.

Automatic restore occurs if using standard name and convention for supported location.
Title: Re: [SOLVED] Persistence
Post by: tinypoodle on December 02, 2012, 12:49:16 PM
It would be a good idea to run Tinycore a few times instead of making assumptions.
To be accurate, exittc is prompting for users choice of backup or not with GUI.
A forced automatical backup which could unintentionally overwrite a preexisting backup would be an ultimately bad idea.
Title: Re: [SOLVED] Persistence
Post by: rprince on December 02, 2012, 01:55:08 PM
Thanks for your reply roberts.

I completely appreciate that as a design decision: running CLI only implies you want a level of control over everything. I just wanted to check whether it was the intended behaviour or not :-)

Unfortunately while it appears to try to load from sda1/tce/mydata.tgz (a message briefly appears on the bootup screen, but disappears before I can read it!) the file I am trying to restore (etc/resolve.conf) does not get restored. I definitely back it up, and I've even untarred mydata.tgz to check that the file is correctly backed up. It just does not get restored :-(
Title: Re: [SOLVED] Persistence
Post by: gerald_clark on December 02, 2012, 01:59:54 PM
boot with the nodhcp option so it does not automatically replace the resolv.conf file.
Title: Re: [SOLVED] Persistence
Post by: curaga on December 03, 2012, 08:50:48 AM
..and the "pause" bootcode should help viewing any backup messages if needed.
Title: Re: [SOLVED] Persistence
Post by: dbh97 on December 03, 2012, 09:19:43 AM
Does filetool.sh -r -v report any errors?
Does it say it restores the resolve.conf?
I have been having the same problem. (though not just that particular file)
Title: Re: [SOLVED] Persistence
Post by: dbh97 on December 03, 2012, 05:49:22 PM
Hmmm... There seems to be more going on here.
I forgot to mention it before, but I am also running core in an emulator.
(http://www.holdemanenterprises.com/misc/core_backup_problems.png)
Title: Re: [SOLVED] Persistence
Post by: curaga on December 04, 2012, 01:15:22 AM
It looks like you're using the local bootcode while mixing mounting extensions. While this setup is supported, you're on your own if it breaks.

Try to remove the local bootcode.

edit: It's possible that's also due to backing up the symlinks and not loading the extensions. In that case, please read the Core Concepts.
Title: Re: [SOLVED] Persistence
Post by: dbh97 on December 04, 2012, 06:55:38 PM
 AFAIK, local is not a bootcode option under mc.

My real problem: I entered my volume to back up to in /etc/sysconfig/backup_device rather than specifying tce and restore boot codes.
Sorry for taking up your time.
Title: Re: [SOLVED] Persistence
Post by: gerald_clark on December 04, 2012, 07:56:40 PM
You don't need a restore bootcode.  By default it restores from the tce directory.
You don't need a tce bootcode unless you have more than one device with a tce directory.  It will use the first one it finds.