WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ezremaster: CorePlus installation on hard drive that put a script file in .X.d  (Read 5080 times)

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
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?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
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.
The only barriers that can stop you are the ones you create yourself.

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
How to modify installer?
I don't have much experience of linux.
A simple hit could help me a lot.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
The install script is in tc-install.tcz.
The only barriers that can stop you are the ones you create yourself.

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
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.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Hi ipmeel
The path of /tmp is /tmp. It resides in RAM, not on the hard drive.

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
the is my question. How to mount to 'tmp' directory of hard-drive?

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
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.

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
Thank you Rich,
So, when other directories (ex: home, etc, opt) were created on hard drive? On the first boot?

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
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.

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
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.
 :)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
/etc/sysconfig/tcedir  is a symlink to the real tce directory (e.g. /mnt/sda1/tce).
Download a copy and keep it handy: Core book ;)

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
That is a great hit. Thanks again.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
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  > Philosophies useful to understand when files are loaded into the file system at boot. 


Offline jls

  • Hero Member
  • *****
  • Posts: 2135
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?
dCore user