WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Rebuildfstab ?  (Read 2888 times)

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Rebuildfstab ?
« on: March 30, 2017, 03:51:04 AM »
This serves also as a test whether the much promoted <book>
is a substantial improvement on some of the baby-talk TC
documentation previously read. Technical literature should
read like a bus-time-table, not a friendly letter to your
child.
  Presently I've got TC64 loaded-up with 6 Desktops & 18 VTs
[all VTs as root]. Since I installed opera-12, I don't need
to leave TC to go to M$ to fetch Gmail. And I don't want to
reboot and lose my <work settings>.
  Apart from the USBstik which is running TC, I've got.
3 further USB devices on this WinTelLaptop; and need to
get some info from:.
# fdisk -l | grep 3 ==...
/dev/sdc3             359         763     3253162+ 83 Linux.
.
mount | grep 3
# shows that  /dev/sdc3 is NOT mounted.  But
# mount /dev/sdc3 /mnt/sdc3
shows: /mnt/sdc3 failed: Device or resource busy

With other installations I'd try `lsof | grep sdc3`
to see what/if pid is holding sdc3, but even MountTool
shows sdc3 to be 'free'. Also `rebuildfstab` does
not solve the problem.

 So let's see if/how THEbook solves anything:
* links -dump http://tinycorelinux.net/book.html >>.
 /mnt/sdb2/CRG/Forum/THEbook
.
It's another "life is better with Coke" scam ?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Rebuildfstab ?
« Reply #1 on: April 02, 2017, 01:59:29 AM »
Quote
...And I don't want to reboot and lose my work settings.

There's no need to loose any settings? Persistence over reboots is achieved easily and comes in many forms.

You don't have to reinvent the wheel here,  there's always a tc way of doing things.

1. The simplest and most common method to make specific modified files persistent over reboots is to add the modified file name and it's path to filetool.lst then make a backup (one of the many commands is filetool.sh -b) which creates mydata.tgz in your tce directory.
For more options see
Code: [Select]
filetool.sh --help 

2. There are persistent opt and home directory options, and

3. the option to create an extension with your required files needed to be available after reboot, and

4. remaster the initrd, and

5. remaster an ISO

(the last two options are not that common but easy)

ref: Core Concepts  see under "Backup/Restore and Other Persistence Options"
http://tinycorelinux.net/concepts.html
and the Book, see Chapter 7
http://tinycorelinux.net/book.html
and the wiki under "Persistence"
http://wiki.tinycorelinux.net/wiki:backup


Sorry, I can't determine if the rest is a question, or questions, a blog, or a rant..
« Last Edit: April 02, 2017, 02:03:54 AM by coreplayer2 »

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: Rebuildfstab ?
« Reply #2 on: April 02, 2017, 03:49:01 PM »
Thanks for input. ==== TC documentation feed back ====
> and the Book, see Chapter 7
> http://tinycorelinux.net/book.html
> and the wiki under "Persistence".

1.10. Backup/restore & other persistence options <- Good!
From the docos one is directed to:
/opt/.filetool.lst ==
opt
home
 TC has a BAD habit IMO of citing files without their path?
I added 2 lines, to make 4 total:
opt
home
/root/tc/.config
/home/tc/.config

After rebooting via Ctl/Alt/Del, my 2 lines were missing.
Also when I did NOT use my own script to install mc, and possibly
mess TC's related files.

Then I was surprised to notice:
/opt/.xfiletool.lst ==
Cache
cache
.cache
XUL.mfasl
XPC.mfasl
mnt
.adobe/Flash_Player/AssetCache
.macromedia/Flash_Player
.opera/opcache
.opera/cache4
.Xauthority
.wmx

Is that automatically setup from the opera-12 that I intalled,
 or just a default?

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 402
Re: Rebuildfstab ?
« Reply #3 on: April 02, 2017, 04:10:03 PM »
hi ****labeas****,

xxxxx The format of your 2 extra lines is incorrect.

++++ opt and home are directories not files.

++++ home means everything in home directory is backed up, so line 4 not needed

++++ After you edit .filetool.lst you need to do a backup......

Regards
Greg

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Rebuildfstab ?
« Reply #4 on: April 02, 2017, 06:03:19 PM »
As Greg has said already, your additional two lines are wrong (I'd remove both immediately then make a backup)
1st.  path " / " should not be included
2nd. how can tc be in root??
3rd. Even though home is included by default (hopefully not required for your installation). home can really get too large for a backup.  If you don't use persistent storage then identify only files which are required to backup and include those, not the complete home directory.

From one of my "filetool.lst" backup files which lists only critical directories and configuration files I need in the backup for restoration on each reboot.  Path should not be used as per the documentation.  It's wise to scrutinize all items in this list as it can extend shutdown and boot times considerably.
Code: [Select]
opt
etc/passwd
etc/shadow
etc/modprobe.conf
usr/local/share/pulseaudio/files/default.pa
usr/local/etc/pulse/default.pa

My xfiletool.lst  lists files and directories excluded from the backup (many of these items particularly the cache files are installed to xfiletool.lst by default).  Notice exclusion of home from all backups since it has persistent storage via the SSD/USB/HDD install with appropriate bootcode.
Code: [Select]
Cache
cache
.cache
XUL.mfasl
XPC.mfasl
mnt
.adobe/Flash_Player/AssetCache
.macromedia/Flash_Player
.opera/opcache
.opera/cache4
.Xauthority
.wmx
home
opt/backgrounds


Remember to backup after making any changes to these files, at the command-line use either
Code: [Select]
filetool.sh -b
backup


Note: the Book describes how to prevent backups from occurring at every shutdown, if that's appropriate for you.

« Last Edit: April 02, 2017, 06:23:01 PM by coreplayer2 »

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: Rebuildfstab ?
« Reply #5 on: April 02, 2017, 09:30:32 PM »
I'll study the <above> contributions, but let's post my already written text.
BTW. I did realise the "home" was a badly chosen syntax for "/home", but how
will the bad syntax indicate "/home/.config" or "/var/dir2/dir3" ?
----------------------------------------
Now that I had a sleep, I realise that:
 at the time of <shutdown>:
 /opt/.xfiletool.lst   containing the 2 lines
opt
home
 should cause the DirTrees: /opt/* and /home/* to be saved,
so as to be able to be restored at the next boot.
Apparently the corresponding saved-setups for mc would be restored
whether or not mc was installed at the next boot.
   The fact that memory/committment bridges installation-sessions,
is the ultimate breaking of the principle that modularity aka
[separation of concern] makes for reliability and robustness.

This example of multiple files being complexly inter-twined shows a
case where wily & LNO shine, by being able to conveniently show the
multiple files together on the same ONE screen; and LNO more especially
by being able to colour the parts of the different files. Eg. file:cow's
left-leg corresponds to file:dog's left-leg, so color them both green.

Now since /home/tc/.config is a subset of <home>
the default setting of /opt/.xfiletool.lst, before my addition
should have restored /home/tc/.config ,
and that it did NOT, could be caused by
 my <custom install of mc> in my <custom Setup script>.
I could reboot AGAIN! and chech if <home> contains mc-settings,
before I manually install mc.   Not now darling!

Ie. the TC design is complexly, convolutedly integrated
[not like a flexible independent chain/pipe of functions],
and is only suited to full automated install-and-setup.

Apparently, by convention:
 *nix apps have their setups stored in /home/* or/and /root.
Which does not correspond to the 2 default entries in /opt/.xfiletoOPol.lst
and the the "opt" entry constitutes a <circular reference>.
---

Imagine the chaotic complexity, I would have been victim of,
if I had decide to install <xorg>, in order to be able to run `pan`,
instead of relying on the default <fbufr>.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Rebuildfstab ?
« Reply #6 on: April 02, 2017, 10:25:45 PM »
...
BTW. I did realise the "home" was a badly chosen syntax for "/home", but how
will the bad syntax indicate "/home/.config" or "/var/dir2/dir3" ?

Actually "home" is correct.  AIUI it's a feature of busybox (but i could be wrong..)
and will never indicate "/home/.config" because this does not exist, though /home/tc/.config and ~/.config does
Notice my example .filetool.lst in last post where all the leading "/" have been removed from each filetool.lst entry


Quote
Now that I had a sleep, I realise that:
 at the time of <shutdown>:
 /opt/.xfiletool.lst   containing the 2 lines
opt
home
 should cause the DirTrees: /opt/* and /home/* to be saved,
so as to be able to be restored at the next boot.
You mean  /opt/.filetool.lst  ?  because  /opt/.xfiletool.lst  lists those files and or directories for exclusion from backup.
If you mean  /opt/.filetool.lst  then be careful with home/*  as mentioned previously.

maybe a typo, but typo's can get you in trouble


Quote
the default setting of /opt/.xfiletool.lst, before my addition
should have restored /home/tc/.config ,
and that it did NOT, could be caused by
 my <custom install of mc>
it works like this:
/opt/.filetool.lst  lists dir's and files to be included in the backup
/opt/.xfiletool.lst lists dir's and files that will NOT be included in the backup

The backup file ".../tce/mydata.tgz" may not have been created in your installation. Therefore you'll need to initiate it's creation.
Code: [Select]
filetool.sh -b
from the command line to create the backup

If you're curious, try a dry run to list all that will be backed up
Code: [Select]
filetool.sh -d


Anyhow stop overthinking this, really it's not that complex.  Experiences of previous distro's are maybe clouding the issue?