Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: emeddleton on April 02, 2012, 03:29:42 PM

Title: Help with persistance with hard drive install.
Post by: emeddleton on April 02, 2012, 03:29:42 PM
I have installed tinycore 4.4 to my hard drive partition sdb1 and set it up using the boot codes home=sdb1 opt=sdb1 norestore.  Now that I have everything working and setup the way I like is it possible to keep the system in this state with no further updates or changes to the home and opt directories.  I am using e17 desktop manager and I would like to keep my /home/tc/.e directory with all its settings and firefox's bookmarks plus all the extensions I have set up.  I edited the file /opt/.filetool.lst to read just /opt/.filetool.lst. 

I have tried different settings and have read the documentation with no success and usually end up boinking my system and having to start over.  I guess I am still not clear on how to achieve the results I am looking for.

If anyone can offer advise I would sure appreciate it.

Thank you,

Eric
Title: Re: Help with persistance with hard drive install.
Post by: gerald_clark on April 02, 2012, 05:06:54 PM
It is hard to help you when you don't tell us what your problem is.
1. The norestore option will prevent you from loading any saved files in .filetool.lst.
2. If you are using the opt= boot option, you should have no opt files in .filetool.lst.
3. If you are using the home= boot option, you should have no home files in .filetool.lst.
4. You should not use advanced boot options until you understand them and have everything else working.
Title: Re: Help with persistance with hard drive install.
Post by: emeddleton on April 02, 2012, 07:23:13 PM
Thank you for responding.

I am trying to use my existing setup which is installed on sdb1 without changing it any further.  I would like to boot tinycore from sdb1 using my home and opt directories on sdb1 but not have anything further written to those directories and have the setup that I have now remain in its current state across reboots.  I do not know if this is possible from reading the documentation but that is what I am trying to achieve.   I do not understand how to install tinycore on my harddrive, set it up to my liking and then keep it in that state across reboots, but not have any changes made to my existing setup after using the system.

I used the home=sdb1 opt=sdb1 norestore boot options because I thought (wrongly) that would boot up my existing setup but not make any changes to it when I shut down. 

I hope I am being more clear this time.

Thank you,

Eric Meddleton
Title: Re: Help with persistance with hard drive install.
Post by: tinypoodle on April 02, 2012, 10:10:50 PM
Your actions seem to go in the exact opposite direction of your purpose...   :o

To achieve what you say, avoid persistent /home and /opt and just do a backup including all the files you want - once you have configured everything to your liking.
Then using the same backup at each boot will give you exactly the same result each time.
Title: Re: Help with persistance with hard drive install.
Post by: Rich on April 02, 2012, 10:32:31 PM
Hi emeddleton
Adding to tinypoodles comments, once the system is set up the way you wish, run a backup just that one time.
Then change the default to no backup on shutdown. You'll need to search the forum on how to do that, I don't
recall how it's done.
Title: Re: Help with persistance with hard drive install.
Post by: tinypoodle on April 02, 2012, 10:59:00 PM
Hi emeddleton
Adding to tinypoodles comments, once the system is set up the way you wish, run a backup just that one time.
Then change the default to no backup on shutdown.

Latter would need to be included in the backup   ;)

Edit: ...or not necessarily so, according to the link Rich provides below
Title: Re: Help with persistance with hard drive install.
Post by: maro on April 02, 2012, 11:29:19 PM
If I'm in this situation where I'm done with TC (or any other live system) and don't want (or need) a proper shutdown I just kill the power supply (either by removing a cable or a battery). I'd like to think that works pretty and is a rather quick solution (plus the joy of doing something you should usually never ever do).
Title: Re: Help with persistance with hard drive install.
Post by: tinypoodle on April 02, 2012, 11:43:22 PM
...but avoid such in case any storage medium is mounted read-write...   :o
Title: Re: Help with persistance with hard drive install.
Post by: Rich on April 02, 2012, 11:58:50 PM
Hi emeddleton
Quote
Then change the default to no backup on shutdown. You'll need to search the forum on how to do that, I don't
recall how it's done.
Here's how to change the default to no backup:
http://forum.tinycorelinux.net/index.php/topic,11211.msg58585.html#msg58585
Title: Re: Help with persistance with hard drive install.
Post by: tinypoodle on April 03, 2012, 02:32:24 AM
Hi emeddleton
Quote
Then change the default to no backup on shutdown. You'll need to search the forum on how to do that, I don't
recall how it's done.
Here's how to change the default to no backup:
http://forum.tinycorelinux.net/index.php/topic,11211.msg58585.html#msg58585
Earlier post edited accordingly   :-[
Title: Re: Help with persistance with hard drive install.
Post by: emeddleton on April 03, 2012, 05:06:01 AM
Thank you all for your help.

With your help I am getting closer.  I set tinycore back up on sdb1.  I removed my boot codes so the pertinent lines in grub just have:

title tinycore
    root (hd1,0)
    kernel /tce/boot/vmlinuz quiet root=/dev/disk/by-id/ata-MAXTOR_STM2500630AS_8RG3WST5-part1 max_loop=255

I edited the file /opt/.filetool.lst to read:
opt/.filetool.lst
home/tc/.e
home/tc/.mozilla/firefox/zypal44u.default/places.sqlite
home/tc/.vimrc
home/tc/.local/share/applications

Now the only problem is that when I reboot, my permissions on /home/tc/.mozilla changes ownership to root.  The same is true for:
/home/tc/.mozilla/firefox
 /home/tc/.mozilla/firefox/zypal44u.default
/home/tc/.local
/home/tc/.local/share

It seems that if the line in .filetool.lst contains more then one sub-directory after the tc directory, the ownership changes to root in all the sub-directories accept the last one in the line.  The file  /home/tc/.mozilla/firefox/zypal44u.default/places.sqlite has the correct ownership as does the directory /home/tc/.local/share/applications.

/opt/.filetool.lst    /home/tc/.e   and   /home/tc/.vmrc have the correct ownership.


I manually change all the wrong ownerships from root back to tc but when I reboot they change back to root again. 

I would appreciate any advice.

Thank you,

Eric Meddleton




Title: Re: Help with persistance with hard drive install.
Post by: tinypoodle on April 03, 2012, 05:40:43 AM
Did you adapt /opt/.xfiletool.lst ?
Title: Re: Help with persistance with hard drive install.
Post by: curaga on April 03, 2012, 05:41:38 AM
That is tar behavior, and has been discussed before. Not something we can really change.

Workaround I can think of would be to have .mozilla and .local, the base folders, in .filetool.lst, but remove anything in them you don't want backed up (or add them to .xfiletool.lst).
Title: Re: Help with persistance with hard drive install.
Post by: emeddleton on April 03, 2012, 05:47:24 AM
Hi emeddleton
Quote
Then change the default to no backup on shutdown. You'll need to search the forum on how to do that, I don't
recall how it's done.
Here's how to change the default to no backup:
http://forum.tinycorelinux.net/index.php/topic,11211.msg58585.html#msg58585
Earlier post edited accordingly   :-[

If I use the bootcode norestore my initial settngs for my home directory are all gone.  Since I am using e17 I have to go through setting everythng back up such as backgrounds, menu settings, and virtual desktops.  It looks like booting up with the norestore bootcode creates a new mydata.tgz file instead of preserving the one with all my settings.



Eric Meddleton
Title: Re: Help with persistance with hard drive install.
Post by: Rich on April 03, 2012, 08:40:41 AM
Hi emeddleton
When you do a backup, all the paths listed in .filetool.lst get saved to a file called mydata.tcz. When you boot,
Tinycore  RESTORES  whatever you backed up into that file. If you use the  norestore  boot code, that doesn't
happen. If you reboot again (without running backup) and omit that boot code, all your settings will be back.
Try this:
1. Place the following two lines in filetool.lst:
home
opt
2. Remove all entries from xfiletool.lst
3. Set the system up the way you want it.
4. Add  export BACKUP=0  to /home/tc/.profile
5. Do a backup.
6. Reboot without the  norestore  boot code.
7. Never run backup again.
Title: Re: Help with persistance with hard drive install.
Post by: gerald_clark on April 03, 2012, 10:12:33 AM
The default .filetool.lst  has

opt
home
Title: Re: Help with persistance with hard drive install.
Post by: Rich on April 03, 2012, 10:20:47 AM
Hi gerald_clark
Yes, and that's all he should have in there for what he is trying to do. But if you look at reply #10, he has been busy
editing it.
Title: Re: Help with persistance with hard drive install.
Post by: gerald_clark on April 03, 2012, 10:51:59 AM
My response was to post #10, most of which makes little sense.
Why the boot= and max_loop boot options?

Get a stock install working first.  Then add options only when you understand what they do and how to use them properly.
Title: Re: Help with persistance with hard drive install.
Post by: Rich on April 03, 2012, 11:15:35 AM
Hi gerald_clark
Well, my apologies to you then. That max_loop definitely does not belong in there. That other option
actually says  root=  not  boot=.
Title: Re: Help with persistance with hard drive install.
Post by: gerald_clark on April 03, 2012, 11:59:02 AM
My typo.  I meant root=.
Title: Re: Help with persistance with hard drive install.
Post by: tinypoodle on April 03, 2012, 07:11:33 PM
Get a stock install working first.  Then add options only when you understand what they do and how to use them properly.

Perhaps something along this lines could go into a sticky post in a prominent place?
It may be an obvious principle to some, but ignored by many as it seems, and thus leading to a lot of unnecessary complications.
Title: Re: Help with persistance with hard drive install.
Post by: emeddleton on April 04, 2012, 10:02:34 PM
Sorry for taking so long to reply but had to go out of town.

I think I have everything working now.  I guess my main problem besides the empty space between my ears was that when using e17 desktop when I used the menu "system/reboot or system/shutdown  I did not get the usual choice to backup or not.  Now that I see if I go to the menu "applications/system/exit" I see the familiar exit with the choice of backup or not.  So now that I have the system setup and backed up to the mydata.tgz file when I boot up I have my settings and when I exit I choose not to backup and everything is kept the way I like. 

I decided to not back up my .mozilla directory to save my bookmark file due to the ownership changing and just save my bookmark file places.sqlite to my home folder.  It takes a couple extra steps but I launch firefox, copy my bookmark file to my firefox default folder and restart firefox and I have the bookmarks working.  After I shut down firefox, if I added more bookmarks, I save the file to my home folder and backup, otherwise no need to backup.

I will test adding export BACKUP=0  to /home/tc/.profile to see if that works for me when I get back to my computer but that will not be for a week.

Thank you all for your help and for making this system possible.

Eric Meddletn