WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Difficulty with having a Persistent home directory  (Read 5439 times)

Offline shail.dw

  • Newbie
  • *
  • Posts: 34
Difficulty with having a Persistent home directory
« on: March 02, 2012, 09:36:27 AM »
I have joined the forum just now to begin my journey with Tinycore (indeed the Linux itself).

I have tinycorelinux (only base system with X) on partition sda9 (ext3 type), and there is nothing on it except tinycore. The arrangement is as follows:

1) sda9/boot/grub directory: with only grub installed here along menu.lst. Nothing else in grub or in parental boot directory. I will not be using extlinux, at least for the time being.

2) sda9/core_os directory: where I have placed vmlinuz and core.gz, The OS itself! Nothing else in it.

3) sda9/apps directory: where extensions are installed with onboot.lst and optional and/or ondemand directory etc. With tce=sda9/apps boot option, upto this point I have no trouble. During reboot tce=sda9/apps shows itself up nicely as backup directory.

4) sda9/shail directory (shail being my name): This I want to make my persistent home directory. When I use home=sda9/shail boot option, this gives a boot time failure message "Skipping..... Invalid home directory specified" etc. Cann't I make a home directory of xyz name?

5) sda9/core_os/opt directory: which I am ready to make persistent opt directory, if with persistent home a persistent opt is also necessary. (I have not understood from "core concepts" if a persistent opt is necessary if one wants to have a persistent home! Like persistent home I even tried opt=sda9/core_os/opt as another boot option in menu.lst to no avail.)

6) Editing .filetool.lst: By deleting the word opt or home or both from it, by replacing the word home with shail, sda9/shail, /mnt/sda9/shail etc., or by replacing opt with /mnt/sda9/core_os/opt etc. All this fails to my chagrin, and at next boot the file .filetool.lst is intact as of old (I understand that /opt is actually in memory, but then am I not giving it a persistent path in boot option!?). I have tried everything before joining this forum to ask this. Certainly something is not clear to me. I even copied entire /opt to sda9/core_os/opt to make it work! I have failed in everything. Should I remaster (delete entire opt directory from base system?!)

I will not proceed any further unless I have the explanation of it (for ex. go the alternate way with mydata.tgz, which is not difficult; I want to understand the system)(This question also: is mydata.tgz really necessary to create if I am going to have a persistent opt and/or persistent home? "Core concepts" says no.) Please help me. I am a newbie. With time I intend to contribute to this Tiny thing, and I intend to make it the only OS on my system. I intend to work on Tinycore to adopt it for Indian languages like Hindi, Sanskrit, Devanagri, Tamil etc.

PS: In creating directories etc. I have taken care of their ownership by comparing the ownership of files and directories from automatic install through 64MB iso file, which places everything in a single directory named tce. For example if after #mkfs.ext3 /dev/sda9 When I couldn't create a directory in sda9 as user tc, then I created it as root and used chown tc:staff directory_name etc., wherever necessary. Thanx and also sorry for this long thing and for not understanding the things.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Difficulty with having a Persistent home directory
« Reply #1 on: March 02, 2012, 02:53:25 PM »
You do not need a persistent opt for persistent home.
For home= and opt= you define only the drive.
The directories will always be /home and /opt.
When editing /opt/.filetool.lst you remove home and opt. You do not redefine them.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Difficulty with having a Persistent home directory
« Reply #2 on: March 02, 2012, 03:16:03 PM »
One of my older grub menu.lst's  tc entry

title Tiny Core dev 4.x
find --set-root --ignore-floppies /tce/boot/vmlinuz
kernel /tce/boot/vmlinuz quiet tce=sda1 home=sda1 opt=sda1
initrd /tce/boot/tinycore.gz


I always use a combination of persistent opt/home and a backup (for specific settings files)

Offline shail.dw

  • Newbie
  • *
  • Posts: 34
Re: Difficulty with having a Persistent home directory
« Reply #3 on: March 03, 2012, 05:08:54 AM »
So the thing is this:

1) To Gerald_Clark (with much thanks)

You cannot give xyz name to persistent opt or persistent home. I should have given consideration to that earlier, as the directories opt and home are conventional names in linux file system itself ! (Or is the matter different than what now I suppose?)

You cannot place persistent opt or persistent home inside some another directory ! You are bound to boot parameters opt=sdax/hdax and home=sdax/hdax, because they are actually /opt and /home when the system has booted itself, (and so should be the partition's first level directories ?) (Is the situation different from this?)

tce can have any xyz name (As I told in the original post that I have used the directory sda9/apps for the extensions), because it is the creation of Tinycore developers, and not a part of Linux file system ! [I will see if it can have any xyz location as well, and report if I think it fit to be reportable, though I see no reason why it would not be so.]

That opt and home need only be removed from .filetool.lst was not clear to me. I have it now.

2) To coreplayer2

Thanx for providing your boot code. It clears many things. You at least caught my mind in declaring that you too have different persistent opt and persistent home always. I too actually want to do many things with that seperation.

Your "find line" in the boot parameter is worth experimenting (i.e. with more parameters than you gave me a quick sight of), which I will do, and report.

Thanx overall and again. It was my first post, for which I joined the forum. The Two members prooved to me too benevolent. I have taken something and I will repay to others in time.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11587
Re: Difficulty with having a Persistent home directory
« Reply #4 on: March 03, 2012, 09:11:36 AM »
Hi shail.dw
Yes, /opt and /home are conventional names in linux file system.

Your  .filetool.lst  file determines which files/directories get backed up. The purpose of this backup is not the traditional
"I need to backup my data". The purpose is to backup non-persistent  /home, /opt, and various settings. If you have a
persistent /home and /opt, there is no point in including them in the backup, That would just make the shutdown and
bootup process take longer. Since most of Tinycores file system is non-persistent (RAM based), any configuration
files you alter should be backed up.

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: Difficulty with having a Persistent home directory
« Reply #5 on: March 03, 2012, 12:39:23 PM »
question: When a folder is specified in /opt/.filetool.lst  does this automatically
back up all files and subfolders within that directory?

like in: /usr/local/etc/cups/.....

there are several files located in ../cups/

or do I have to specify each file and subfolder?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Difficulty with having a Persistent home directory
« Reply #6 on: March 03, 2012, 01:11:42 PM »
Using the dry run option of filetool should answer all questions.

$ filetool.sh -d
10+ Years Contributing to Linux Open Source Projects.

Offline shail.dw

  • Newbie
  • *
  • Posts: 34
Re: Difficulty with having a Persistent home directory
« Reply #7 on: March 03, 2012, 01:27:42 PM »
To beerstein

What is it that one doesn't save in his/her "home (directory)" ? Documents, presentations, webpages, pictures, media files, downloads, compiled programs, ...... And doesn't one create more than one directories to arrange his work in his/her home ? Don't they all get saved in one go (mydata.tgz) by one single entry called "home" in .filetool.lst ? I could have asked to myself the same question, but you have asked it here. Though I feel some experienced member must make a followup, if I am incorrect. I am yet to begin with Tinycore.

Offline shail.dw

  • Newbie
  • *
  • Posts: 34
Re: Difficulty with having a Persistent home directory
« Reply #8 on: March 03, 2012, 02:02:23 PM »
To Roberts

I tried to Re to beerstein, without taking a note of your suuggestions  $ filetool.sh -d first. That truly is an answer that can come only from an administrator. You gave an insight. I will check.

To Rich {/Any member}

Thanx Rich. There are always people around, who understand what one is lacking. I am surely going to meet such ones in this forum.

The fact that single words opt and home in .filetool.lst give an automatic backup (to mydata.tgz) of /opt and /home; is that not indicative of a correlation that just came to my mind, that entries in .filetool.lst are relative to / ? Or the situation is/can be more than this?

Following from the doubts I have just expressed, can one suggest what can be had in .filetool.lst apart from only opt and home (with full paths if necessary, to select one or two concrete examples) ? I can experiment, but it is never a bad idea to have answers ready from someone, if it is a team that is going on to win, than an individual has to take an exam by himself. Maybe the answer lies in Robert's $ filetool.sh -d . I will see that.

Thanks to all.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Difficulty with having a Persistent home directory
« Reply #9 on: March 03, 2012, 02:04:36 PM »
There are plenty of examples in the forum and the wiki.

Offline shail.dw

  • Newbie
  • *
  • Posts: 34
Re: Difficulty with having a Persistent home directory
« Reply #10 on: March 03, 2012, 02:14:18 PM »
Well reminded me, gerald_clark. I will return only after a while.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11587
Re: Difficulty with having a Persistent home directory
« Reply #11 on: March 03, 2012, 05:33:30 PM »
Hi shail.dw
All paths are relative to the root, however, entries in .filetool.lst should never have a leading / .

Sample .filetool.lst entries:
etc/X11                         Backup all files and directories under  /etc/X11
etc/X11/xorg.conf       Backup just the one file

The second example is one I use to ensure my xorg settings are restored upon startup.
If you are running a Samba file server, you want to backup smb.conf since it contains settings for the server,
including which directories are being shared on the network. That would look like this:
usr/local/etc/samba/smb.conf

Offline shail.dw

  • Newbie
  • *
  • Posts: 34
Re: Difficulty with having a Persistent home directory
« Reply #12 on: March 03, 2012, 11:40:21 PM »
Hi Rich

$ filetool.sh -d (suggested by Roberts) gave an insight, but was not going to solve my query. With opt and home as sole entries in .filetool.lst, the output reduces itself to to showing the subdirectories and files in the same /opt and /home ! My question was different to which your answer came as a rescue.

Your answer prooved so pertinent, so succinct, and so solid. It defuses many a doubts in the mind of anyone who begins his journey with Tinycore only yesterday. I would like to see your entire answer included as such in "Core Concepts" itself !

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Difficulty with having a Persistent home directory
« Reply #13 on: March 04, 2012, 12:50:06 AM »
I think someone said earlier but am not sure if the concept made it home.  when home and opt is defined as in the boot codes,  it is persistent and therefore is unnecessary to include in a backup (filetool.lst).   More importantly when opt and home is included in the backup (filetool) you may find in time an extraordinarily large backup file being created which lengthens both shutdown and bootup times

Anyhow, was just 

Offline shail.dw

  • Newbie
  • *
  • Posts: 34
Re: Difficulty with having a Persistent home directory
« Reply #14 on: March 04, 2012, 02:49:31 AM »
Precisely it is so coreplayer2.

The equation is this: {having opt and home in .filetool.lst} = {no bootcodes opt=sdax/hdax and home=sdax/hdax} = {not having a persistent opt and persistent home} = {all backup to one single file mydata.tgz, name and location set by default by the developers of Tinycore} = {path of this mydata.tgz allowed to be set by user though, through boot parameter tce=whatsoever_he_may_wish, and then seeing this path nicely in TC Exit option during a shutdown/reboot} !

With keeping in mind the portability of Tinycore, its developers make this situation default. This is more visible in most recent version 4.3, where everything goes in a single tce directory, entire OS, all the boot director(-y/-ies), all the tcz and scm, and mydata.tgz itself.

But as you rightly point out about the time taken in backing up (during shutdown/reboot), or in loading/mounting it (during every boot/reboot), everything in and from a single mammoth called mydata.tgz, (especially after one has amassed his work for some time, that may be in millions of tons these days); going the persistent home way is surely the better choice, even on portable USB/Pen drives !

With USB 2.0 it may still be bearable, but with USB 1.2 ! But then not only in case of portable drives, even in case of hard drives the time taken is more than perceptible, so I take my course  (yours too, I have noted from your earlier reply); i.e. going the persistent opt and persistent home way, and not in following the path of the default policy of Tinycore developers.

Hope this may help some one. My thanks to you once again.