WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Persistence  (Read 12794 times)

Offline Ewidar

  • Newbie
  • *
  • Posts: 2
[SOLVED] Persistence
« on: February 20, 2012, 04: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 !
« Last Edit: February 20, 2012, 04:41:30 PM by Ewidar »

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Persistence
« Reply #1 on: February 20, 2012, 04: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

10+ Years Contributing to Linux Open Source Projects.

Offline Ewidar

  • Newbie
  • *
  • Posts: 2
Re: Persistence
« Reply #2 on: February 20, 2012, 04: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 =)

Offline rprince

  • Newbie
  • *
  • Posts: 2
Re: [SOLVED] Persistence
« Reply #3 on: December 02, 2012, 11: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

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: [SOLVED] Persistence
« Reply #4 on: December 02, 2012, 12:38:13 PM »
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.
10+ Years Contributing to Linux Open Source Projects.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: [SOLVED] Persistence
« Reply #5 on: December 02, 2012, 03: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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline rprince

  • Newbie
  • *
  • Posts: 2
Re: [SOLVED] Persistence
« Reply #6 on: December 02, 2012, 04: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 :-(

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: [SOLVED] Persistence
« Reply #7 on: December 02, 2012, 04:59:54 PM »
boot with the nodhcp option so it does not automatically replace the resolv.conf file.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: [SOLVED] Persistence
« Reply #8 on: December 03, 2012, 11:50:48 AM »
..and the "pause" bootcode should help viewing any backup messages if needed.
The only barriers that can stop you are the ones you create yourself.

Offline dbh97

  • Newbie
  • *
  • Posts: 5
Re: [SOLVED] Persistence
« Reply #9 on: December 03, 2012, 12:19:43 PM »
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)

Offline dbh97

  • Newbie
  • *
  • Posts: 5
Re: [SOLVED] Persistence
« Reply #10 on: December 03, 2012, 08: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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: [SOLVED] Persistence
« Reply #11 on: December 04, 2012, 04: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.
The only barriers that can stop you are the ones you create yourself.

Offline dbh97

  • Newbie
  • *
  • Posts: 5
Re: [SOLVED] Persistence
« Reply #12 on: December 04, 2012, 09: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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: [SOLVED] Persistence
« Reply #13 on: December 04, 2012, 10: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.