Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: ipmeel on September 24, 2016, 05:42:14 PM

Title: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post 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?
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: curaga on September 25, 2016, 04:26:46 AM
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.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: ipmeel on September 28, 2016, 11:06:38 PM
How to modify installer?
I don't have much experience of linux.
A simple hit could help me a lot.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: curaga on September 29, 2016, 03:12:55 AM
The install script is in tc-install.tcz.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: ipmeel on October 01, 2016, 03:06:14 PM
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.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: Rich on October 01, 2016, 03:56:35 PM
Hi ipmeel
The path of /tmp is /tmp. It resides in RAM, not on the hard drive.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: ipmeel on October 01, 2016, 11:31:48 PM
the is my question. How to mount to 'tmp' directory of hard-drive?
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: Rich on October 01, 2016, 11:52:59 PM
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.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: ipmeel on October 02, 2016, 01:10:26 AM
Thank you Rich,
So, when other directories (ex: home, etc, opt) were created on hard drive? On the first boot?
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: Rich on October 02, 2016, 02:03:52 AM
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.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: ipmeel on October 02, 2016, 09:08:24 AM
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.
 :)
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: Misalf on October 02, 2016, 10:03:23 AM
/etc/sysconfig/tcedir  is a symlink to the real tce directory (e.g. /mnt/sda1/tce).
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: ipmeel on October 02, 2016, 10:10:02 AM
That is a great hit. Thanks again.
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: coreplayer2 on October 02, 2016, 03:25:13 PM
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. 

Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: jls on October 02, 2016, 06:24:11 PM
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?
Title: Re: ezremaster: CorePlus installation on hard drive that put a script file in .X.d
Post by: ipmeel on October 03, 2016, 04:09:56 AM
@jls & coreplayer2,
Thanks for the hints, I will try these options.