WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tc persistent .profile  (Read 8958 times)

Offline sblass92

  • Newbie
  • *
  • Posts: 15
tc persistent .profile
« on: October 22, 2012, 09:38:34 AM »
Hi all,

I'm have a problem getting .profile to persist between boots.  I've enabled the persistent home and opt directories in the boot codes (home=sda1, opt=sda1)

I'm trying add this line: export PKG_CONFIG_PATH=~/opencv/unix-install to .profile.

However, adding it to ~/.profile and rebooting loads the default .profile.  I tried adding to /mnt/sda1/home/tc/.profile, but it also loads the default .profile.

I'm running TC 4.6.2 and am relatively new to linux.  As this seems to be a persistent problem, I am thinking it is related to a lack of understanding tiny core rather than a lack of understanding linux.

Thanks

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tc persistent .profile
« Reply #1 on: October 22, 2012, 09:42:06 AM »
When you have the home= and opt= boot codes, you must remove home and opt from /opt/.filetool.lst.
You are restoring .profile from your last backup.

Offline sblass92

  • Newbie
  • *
  • Posts: 15
Re: tc persistent .profile
« Reply #2 on: October 22, 2012, 09:57:25 AM »
Thanks for the quick response.

I've deleted the lines home and opt from /opt/.filetool.lst.  However, it is restoring /opt/.filetool.lst upon reboot despite the persistent opt directory.   

Thanks

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tc persistent .profile
« Reply #3 on: October 22, 2012, 10:33:39 AM »
You need to make your changes and do a backup so you don't keep reloading the same old backup.

Offline sblass92

  • Newbie
  • *
  • Posts: 15
Re: tc persistent .profile
« Reply #4 on: October 23, 2012, 06:08:04 AM »
I added "norestore" to the boot options, and it meets my needs.

Thanks

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: tc persistent .profile
« Reply #5 on: October 23, 2012, 07:06:25 AM »
Hi sblass92
That will work for now, but if you install an application that has a config file that you wish to customize, you will
need to back it up.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tc persistent .profile
« Reply #6 on: October 23, 2012, 07:12:11 AM »
We see the same problem over and over here.
Core is not your normal Linux.
You need to learn to walk with core before you can run.
Start with only the waitusb= and tce= boot options until you get persistence and backup working.
Then you can add more advanced options like opt= and home= after reading the applicable wiki pages.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: tc persistent .profile
« Reply #7 on: October 23, 2012, 07:32:55 AM »
We see the same problem over and over here.
Core is not your normal Linux.
You need to learn to walk with core before you can run.
Start with only the waitusb= and tce= boot options until you get persistence and backup working.
Then you can add more advanced options like opt= and home= after reading the applicable wiki pages.

Amongst other this means many users would not peruse the search function of this forum before posting.

Wondering if perhaps upper would deserve a "sticky" subject... (and with an attention grabbing title)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline sblass92

  • Newbie
  • *
  • Posts: 15
Re: tc persistent .profile
« Reply #8 on: October 23, 2012, 08:43:43 PM »
First off, thanks for everyone's responses, they are well appreciated.

You need to make your changes and do a backup so you don't keep reloading the same old backup.
Hi sblass92
That will work for now, but if you install an application that has a config file that you wish to customize, you will
need to back it up.

The above quotes and this experience lead me to believe I need to manually execute a backup whenever I change certain files (.profile, config files, others?), or else I'll just keep reloading the backed-up files. 

As for how I ended up using home= and opt=, I started based on these quotes from the wiki (http://wiki.tinycorelinux.net/wiki:persistence_for_dummies)

Quote
By using the Backup Utility
The default mode of saving your docs and settings is via the backup utility, which comes up when you do a shutdown. This backup utility creates a file called by default mydata.tgz (if it doesn't already exist), which contains your entire $HOME directory contents, and the /opt directory, both compressed. The file mydata.tgz is stored in /tce. So, once you start using the /tce directory, automatically all your stuff becomes persistent.
Quote
Executive summary

To make everything persistent, use the Set button in Appbrowser to set a location for /tce. If using the built-in installer, this is taken care of.
To create permanent /home and /opt directories and reduce backup and restore times, use the boot option ”home=xxx” and optionally, ”opt=xxx” where “xxx” are any valid linux partitions. Manually edit /opt/.filetool.lst to remove the home entry and most /opt entries.

I understood this to mean preservation of /home and /opt would happen automatically upon using /tce and the mydata.tgz file.  My reasoning was that since my apps we're being restored between boots (and I used the GUI installer to install tiny core to sda1 from a USB pendrive), I was using the /tce directory (I did not specify a boot code).  When /home wasn't being backed up, I resorted to using home= and opt= which seemed to fix my problem.  Will setting "tce=sda1" and removing "home=" and "opt=" boot codes maintain my changes to .profile and config files?  My understanding of "home=" & "opt=" vs "tce=" is that "tce=" will read and write a mydata.tgz file from disk on boot and shutdown and therefore can be slower. 


Amongst other this means many users would not peruse the search function of this forum before posting.

Wondering if perhaps upper would deserve a "sticky" subject... (and with an attention grabbing title)

I might suggest updating/improving the wiki page as that is where I usually check first for solutions, but this is a personal preference and some people prefer forums first. 

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tc persistent .profile
« Reply #9 on: October 23, 2012, 09:01:03 PM »
The home= and opt= do not stop the tce directory from containing the backup and the installed extensions.
If you do not specify a tce= option, the first tce directory found on any of your drives will be used.
If you are using USB or any other slow to initialize drive, you will need the waitusb=5 option for your tce directory to be found and used.
http://wiki.tinycorelinux.net/wiki:start#persistence

Offline sblass92

  • Newbie
  • *
  • Posts: 15
Re: tc persistent .profile
« Reply #10 on: October 23, 2012, 09:23:31 PM »
So in summary, I think I want the following:
home= and opt= for persistent directories, but I'll need to remove them from filetool.lst and perform a manual backup once for the changes to filetool.lst to take effect.
Afterwards, all changes made to opt and home should be saved to my specified partition (including .profile and config files)

Correct?

Thanks

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: tc persistent .profile
« Reply #11 on: October 23, 2012, 09:27:53 PM »
Hi sblass92
Correct. You are prompted to run a backup when you shut down or restart, doing it then is sufficient.
« Last Edit: October 23, 2012, 09:52:52 PM by Rich »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tc persistent .profile
« Reply #12 on: October 23, 2012, 09:53:22 PM »
Or you can just run 'backup'  at any time.

Offline sblass92

  • Newbie
  • *
  • Posts: 15
Re: tc persistent .profile
« Reply #13 on: October 24, 2012, 12:20:27 PM »
I'm still having trouble.  Here are the exact steps I've taken:

1. modify /mnt/sda1/tce/boot/extlinux/extlinux.conf so the only code I've added is 'home=sda1' 'opt=sda1'
2. modify /opt/.filetool.lst to remove 'home' and 'opt' from the files to backup
3. perform a backup using the command: filetool.sh -b
4. sudo poweroff

Upon reboot, my changes to .filetool.lst have been reverted to include home and opt, changes to .profile have been overridden. 

Advice?

Thanks


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tc persistent .profile
« Reply #14 on: October 24, 2012, 12:25:57 PM »
Show the output of 'ls -l /etc/sysconfig/tcedir'
It sounds like you still have not accomplished step 1:
Get a persistent tce directory working.