Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: krytgames on December 30, 2019, 05:42:58 AM

Title: Cant really understand how TCE fs will work.
Post by: krytgames on December 30, 2019, 05:42:58 AM
So i successfully installed core-current from live ISO from scratch, manually creating patritions and other.

So. In book written, that all user files and extensions will be stored outside the base OS. Is this actual for configs too? Can i change configs when i mount an extension?
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on December 30, 2019, 05:46:10 AM
And another one. If i, for example, install an extension and then delete it, will it stay some garbade in system?
Title: Re: Cant really understand how TCE fs will work.
Post by: Rich on December 30, 2019, 09:31:49 AM
Hi krytgames
...  Can i change configs when i mount an extension?
Yes you can.

Check if the config file is a symlink:
Code: [Select]
tc@box:~$ ls -l /usr/local/etc/login.defs
total 1
lrwxrwxrwx 1 root root    49 Sep 29 14:11 login.defs -> /tmp/tcloop/shadow-utils/usr/local/etc/login.defs
tc@box:~$

That  ->  symbol tells you it's a symlink back into the extension. First you need to convert the symlink into a file:
Code: [Select]
sudo busybox cp -Hf /usr/local/etc/login.defs /usr/local/etc/login.defs
Now you can edit the file.

When done, you need to include it in your backup:
Code: [Select]
echo usr/local/etc/login.defs >> /opt/.filetool.lst
Then run a backup:
Code: [Select]
filetool.sh -b
If you are running a GUI, you can perform these last 2 steps using the  Backup/Restore  app from the  ControlPanel  or by entering:
Code: [Select]
filetool
And another one. If i, for example, install an extension and then delete it, will it stay some garbade in system?
If you use the  Apps  utility to delete extensions they will be removed completely. If you have any config files for that extension
backed up, you need to remove those entries from  /opt/.filetool.lst  yourself.
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on December 30, 2019, 09:55:15 AM
Ok, thx. :) I will ask more questions when i will have ones.
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on December 31, 2019, 06:41:16 PM
So, i have another question. I loaded a TC, created a tce directory at /mnt/sda2. Reconfigured my grub(deleted a tce boot code). Rebooted a system and BOOM. /mnt/sda2 is clear now. Why?
Title: Re: Cant really understand how TCE fs will work.
Post by: Rich on December 31, 2019, 08:20:48 PM
Hi krytgames
That's not a lot of information to go on. Holding back information, such as which boot code you deleted, makes diagnosis even
more difficult. Since you choose to conceal that information, all I can do is guess:

    You deleted the  waitusb  bootcode and as a result sda2 is not detected. Therefore, the device doesn't get mounted at
/mnt/sda2, extensions don't get loaded, and  mydata.tcz  doesn't get restored.. If there are persistent  /home  or  /opt, they
won't be found so they don't get mounted to the root file system.
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 05:14:38 AM
sda is a virtual hard disk. mydata.tgz has been restored, cause in my home directory i have my 2 files with some experimental bash scripts. Also, if you have discord, check this out. Maybe you can help me during the stream :)

https://discord.gg/xcbkwp
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 05:16:42 AM
so maybe i can help with diagnostic. what information do you need to understand what is goig on?
Title: Re: Cant really understand how TCE fs will work.
Post by: Rich on January 01, 2020, 10:51:55 AM
Hi krytgames
so maybe i can help with diagnostic. what information do you need to understand what is goig on?
For starters, what boot code did you delete that caused the breakage? If you put the boot code back, does it work normally? What
was the reason for removing the boot code?

sda is a virtual hard disk. ...
If you are running in a virtual environment, that's something you should always disclose upfront.
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 11:09:33 AM
So, with bootcode "tce=/mnt/sda2" it worked unproperly and my extensions dont save on /mnt/sda2, so i decided to delete it, but it doesn't work.
Title: Re: Cant really understand how TCE fs will work.
Post by: Rich on January 01, 2020, 11:16:50 AM
Hi krytgames
Post the result of this command:
Code: [Select]
showbootcodes
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 01:29:37 PM
BOOT_IMAGE=/boot/vmlinuz
loglevel=3
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 01:30:14 PM
Maybe TC working in copy mode now?
Title: Re: Cant really understand how TCE fs will work.
Post by: Rich on January 01, 2020, 01:51:51 PM
Hi krytgames
What do these 2 commands return:
Code: [Select]
ls -l /etc/sysconfig/tcedir
ls -l /etc/sysconfig/tcedir/
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 01:56:43 PM
1)symlink to /tmp/tce
2)optional/
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 01:58:59 PM
This. Sorry, they are the same pictures :)
Title: Re: Cant really understand how TCE fs will work.
Post by: Rich on January 01, 2020, 02:19:26 PM
Hi krytgames
1)symlink to /tmp/tce
That suggests you either have a  copy2fs.flg  file in your  tce  directory or  tce-setdrive  never ran. Do you have a  tce  directory
on  /mnt/sda1 ?
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 01, 2020, 02:35:45 PM
No
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 02, 2020, 01:06:19 PM
So. Its really strange. I did a tutorial by making an universal boot device for BIOS and UEFI, but after rebooting all patritions are empy :(
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 02, 2020, 01:57:52 PM
After some experiments i have this situation: i have sda1,sda2,sda3 in /mnt directory, but in fact, /dev/sda1,sda2,sda3 not mounted. But if i use sudo mount /dev/sda2, for example, create a file at here, then reboot, then file will remains. Very strange things. Why i have something in /mnt directory when devices are not mounted?
Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 02, 2020, 03:50:52 PM
Another update. I think, that problem, because TC not auto mount disk patrisions on boot. In fstab has strings about /dev/sda1,sda2,sda3, but when i use sudo mount - there are no mounted "devs" in it.
Title: Re: Cant really understand how TCE fs will work.
Post by: Rich on January 02, 2020, 04:25:03 PM
Hi krytgames
When TC boots it adds all devices it recognizes to  fstab.  The only devices that get auto mounted are ones TC needs to run. If a device
is listed in  fstab  and the file system is supported, you can mount it with:
Code: [Select]
mount /dev/sda1or:
Code: [Select]
mount /mnt/sda1There is no  sudo  required for that case.

Title: Re: Cant really understand how TCE fs will work.
Post by: krytgames on January 03, 2020, 04:58:49 AM
But why are they not mounted automaticly? How i can configure it to mount automaticly?
Also after i did filetool.sh and it created onboot.lst and mydata.tgz - TC correctly mount tce directory and  saves extensions.