Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: ipmeel on September 24, 2016, 05:42:14 PM
-
How to create an iso image of CorePlus using ezremaster that put a custom script file in the directory /home/tc/.X.d/ when installing on hard drive?
-
ezremaster allows you to include a backup file. That backup should include your .X.d script. However, that only applies to the iso - the installer does not copy backups to the destination.
So, two options:
1) Modify the installer, or make your own installer.
2) Remaster your file into core.gz.
-
How to modify installer?
I don't have much experience of linux.
A simple hit could help me a lot.
-
The install script is in tc-install.tcz.
-
Now I have learned a little bit of linux and able to modify 'tc-install.tcz'.
In 'tc-install.sh' the variable '$BOOTDIR' is a linked path to './mnt/sda1/tce/boot/'. But I could not figure out the path of '/tmp' directory of 'sda1' (hard-drive) to put a file in it. Please help.
-
Hi ipmeel
The path of /tmp is /tmp. It resides in RAM, not on the hard drive.
-
the is my question. How to mount to 'tmp' directory of hard-drive?
-
Hi ipmeel
There is no tmp on the hard drive. The only items on the hard drive are boot, lost+found, and tce. If you make them
persistent, it could also contain home and opt. The rest of the file system under Tinycore is RAM based.
-
Thank you Rich,
So, when other directories (ex: home, etc, opt) were created on hard drive? On the first boot?
-
Hi ipmeel
Home and opt are created on the hard drive if the home and opt boot codes are used. etc is also RAM based.
-
Many Thanks dear Rich,
I got the solution.
Create a file at './mnt/sda1/tce/' while installation. While booting from hard-drive, create a script that copy file from './mnt/sda1/tce/' to '.X.d' directory, and delete the script.
I hope this will work.
Only issue is... checking for sda1, sda2,... sdb1, sdb2 etc (how end user will install on hard-drive or pen drive.
:)
-
/etc/sysconfig/tcedir is a symlink to the real tce directory (e.g. /mnt/sda1/tce).
-
That is a great hit. Thanks again.
-
Hello ipmeel
iirc an extension can install files to ~/home/tc/.X.d at the right time to be executed at a later stage in the boot process.
I recommend you create an extension with any modifications and/or extra files to be loaded into the file system at boot, because that's a purpose of an extension.
You may find the "diagram of the Tiny Core file architecture" or video from http://tinycorelinux.net/concepts.html (http://tinycorelinux.net/concepts.html) > Philosophies useful to understand when files are loaded into the file system at boot.
-
Hi
placing a file in /etc/skel/.X.d will make the file copied to home when the first time home is created or maybe all the time the system boots.
What do you mean by later stage and how?
-
@jls & coreplayer2,
Thanks for the hints, I will try these options.