WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Writing files other than extensions into the ISO with ezremaster  (Read 2392 times)

Offline TerryJC

  • WikiUser
  • *
  • Posts: 43
Writing files other than extensions into the ISO with ezremaster
« on: December 07, 2010, 07:53:06 AM »
I've built a custom ISO using ezremaster and was able to load all of the extensions I needed.  So far so good.

The problem is that I want to run some scripts during startup, but I can't see how to make the scripts become part of the ISO.  I can see in the 'Startup and Shutdown Scripts' GUI page how to define the scripts, but I can't see how to ensure that they get written to the ISO.

I've had a look at the TC Architecture Diagram and thought I understood how it works, but I think I'm missing something somewhere.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Writing files other than extensions into the ISO with ezremaster
« Reply #1 on: December 07, 2010, 08:21:12 AM »
There are 3 places where you can put a custom bootlocal.sh.
1. Replace the one in the initrd.
2. Include one in the mydata.tgz backup file.
3. Include one in a custom extension.

Offline ixbrian

  • Administrator
  • Sr. Member
  • *****
  • Posts: 436
Re: Writing files other than extensions into the ISO with ezremaster
« Reply #2 on: December 07, 2010, 02:58:02 PM »
I've built a custom ISO using ezremaster and was able to load all of the extensions I needed.  So far so good.

The problem is that I want to run some scripts during startup, but I can't see how to make the scripts become part of the ISO.  I can see in the 'Startup and Shutdown Scripts' GUI page how to define the scripts, but I can't see how to ensure that they get written to the ISO.

I've had a look at the TC Architecture Diagram and thought I understood how it works, but I think I'm missing something somewhere.

On the very last screen of ezremaster, before you click on the "Create ISO" button, you can click the blue links for "ISO directory" and "initrd filesystem directory".  When you click the links, it will open a terminal window to these locations.   Any files you copy in to the "initrd filesystem directory" will be included in the tinycore.gz file, and any files you copy in to the "ISO directory" will be included in the ISO (not the tinycore.gz).   Once you are done adding files, click "Create ISO" in ezremaster.   You probably want to copy your custom scripts in to the initrd filesytem. 

Brian

Offline TerryJC

  • WikiUser
  • *
  • Posts: 43
Re: Writing files other than extensions into the ISO with ezremaster
« Reply #3 on: December 08, 2010, 01:42:26 AM »
On the very last screen of ezremaster, before you click on the "Create ISO" button, you can click the blue links for "ISO directory" and "initrd filesystem directory".  When you click the links, it will open a terminal window to these locations.   Any files you copy in to the "initrd filesystem directory" will be included in the tinycore.gz file, and any files you copy in to the "ISO directory" will be included in the ISO (not the tinycore.gz).   Once you are done adding files, click "Create ISO" in ezremaster.   You probably want to copy your custom scripts in to the initrd filesytem. 

Thanks again Brian.  That was another aspect of ezremaster that I'd misunderstood (see my other post on wallpapers).

I'm still a little confused however.  I read your advice in conjunction with the instructions in the FAQs for installing startup scripts and therefore put them into the /usr/local/tce.installed directory of the ISO extract filesystem.  Is there any way to get them installed anywhere else on the running system?  Ideally, I would like them to end up in a directory in /home/username, so I can manage the outputs a little easier.

Is there something else that I've missed?

Offline TerryJC

  • WikiUser
  • *
  • Posts: 43
Re: Writing files other than extensions into the ISO with ezremaster
« Reply #4 on: December 08, 2010, 06:41:22 AM »
I'm still a little confused however.  I read your advice in conjunction with the instructions in the FAQs for installing startup scripts and therefore put them into the /usr/local/tce.installed directory of the ISO extract filesystem.  Is there any way to get them installed anywhere else on the running system?  Ideally, I would like them to end up in a directory in /home/username, so I can manage the outputs a little easier.

Answering myself.  I've solved this by making one startup script that copies all of the other scripts to the target area and then launches them in turn.  I know it's obvious really, but I think I was thinking of the broader picture, eg a capability of copying any files to anywhere on the target system.  I suspect that ezremaster doesn't do that?

Offline TerryJC

  • WikiUser
  • *
  • Posts: 43
Re: Writing files other than extensions into the ISO with ezremaster
« Reply #5 on: December 08, 2010, 06:56:11 AM »
I'm still a little confused however.  I read your advice in conjunction with the instructions in the FAQs for installing startup scripts and therefore put them into the /usr/local/tce.installed directory of the ISO extract filesystem.  Is there any way to get them installed anywhere else on the running system?  Ideally, I would like them to end up in a directory in /home/username, so I can manage the outputs a little easier.

Answering myself.  I've solved this by making one startup script that copies all of the other scripts to the target area and then launches them in turn.  I know it's obvious really, but I think I was thinking of the broader picture, eg a capability of copying any files to anywhere on the target system.  I suspect that ezremaster doesn't do that?

Answering myself again; is that what the other blue link is for?

Offline ixbrian

  • Administrator
  • Sr. Member
  • *****
  • Posts: 436
Re: Writing files other than extensions into the ISO with ezremaster
« Reply #6 on: December 08, 2010, 08:36:03 PM »
I'm still a little confused however.  I read your advice in conjunction with the instructions in the FAQs for installing startup scripts and therefore put them into the /usr/local/tce.installed directory of the ISO extract filesystem.  Is there any way to get them installed anywhere else on the running system?  Ideally, I would like them to end up in a directory in /home/username, so I can manage the outputs a little easier.

Answering myself.  I've solved this by making one startup script that copies all of the other scripts to the target area and then launches them in turn.  I know it's obvious really, but I think I was thinking of the broader picture, eg a capability of copying any files to anywhere on the target system.  I suspect that ezremaster doesn't do that?

Answering myself again; is that what the other blue link is for?

/usr/local/tce.installed is for extension startup scripts.   Depending on what your startup scripts are doing, you probably don't need to put them in that location. 

Regarding the blue links on the last page of ezremaster..  The "ISO Directory" link puts you in the location where you can make changes or add files to the ISO image.   These are the files you would see when you mount the CD (i.e. the files like /boot/bzImage, /boot/isolinux/f2, etc.)  Note that by default, when Tiny Core boots up the CD it was booted from is not automatically mounted. 

The "initrd filesystem Directory" is what will be turned in to the tinycore.gz / initrd of your remaster.  So you are free to make any changes anywhere in this filesystem that is what will become your entire root directory when the remaster boots.  This allows you to customize basically any part of the system. 

Offline TerryJC

  • WikiUser
  • *
  • Posts: 43
Re: Writing files other than extensions into the ISO with ezremaster
« Reply #7 on: December 08, 2010, 11:04:52 PM »
/usr/local/tce.installed is for extension startup scripts.   Depending on what your startup scripts are doing, you probably don't need to put them in that location. 

Regarding the blue links on the last page of ezremaster..  The "ISO Directory" link puts you in the location where you can make changes or add files to the ISO image.   These are the files you would see when you mount the CD (i.e. the files like /boot/bzImage, /boot/isolinux/f2, etc.)  Note that by default, when Tiny Core boots up the CD it was booted from is not automatically mounted. 

The "initrd filesystem Directory" is what will be turned in to the tinycore.gz / initrd of your remaster.  So you are free to make any changes anywhere in this filesystem that is what will become your entire root directory when the remaster boots.  This allows you to customize basically any part of the system. 


This is excellent information and helps me in a number of ways; some of which I hadn't even got round to asking yet.  :)