WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: default tce directory in iso ?  (Read 7467 times)

Offline libretto

  • Jr. Member
  • **
  • Posts: 64
default tce directory in iso ?
« on: January 19, 2010, 06:47:41 PM »
Hi,
This might be a dumb question. Can you have the tc's iso have a default tce directory like slax's modules directory ? Any reason that this is not practical ? (grub2 support boot from iso, custom iso, don't have to download all the time when boot from iso,....)

Thanks

inside TC.iso
Quote
/boot
/tce      <--- I can then use "iso Master" to add extensions into this directory then boot up will load these extensions from iso
« Last Edit: January 20, 2010, 12:16:44 PM by libretto »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: default tce directory in iso ?
« Reply #1 on: January 19, 2010, 07:16:54 PM »
If you create an Ext3 partition on the hard drive, then create a tce directory in it, put extensions in the tce directory, and boot from the cd, it will find the tce directory and load programs. Everything should work normally. Use version 2.7.

When you have done that, there is not much more to do for a full installation.


I have not tried this booting from an iso image on the hard drive. It is likely to work. If you try it, post your results.

With the latest version 2.8rc3, the default directory for extensions is /tce/optional. This is likely to be the case when 2.8 final comes out. But it has not been released yet, so wait and see.


You can also make a cd with programs.

http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating+Extensions
« Last Edit: January 19, 2010, 07:28:51 PM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline libretto

  • Jr. Member
  • **
  • Posts: 64
Re: default tce directory in iso ?
« Reply #2 on: January 19, 2010, 07:46:31 PM »
Guy,
Thanks for the info.
grub2 does boot from HDD with tce extensions. Waiting for 2.8 final to build multi boot USB flash drive with just iso files only. :)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: default tce directory in iso ?
« Reply #3 on: January 19, 2010, 07:55:26 PM »
grub2 does boot from HDD with tce extensions

..boot from the iso file? If so, what grub2 setup did you use?

Offline libretto

  • Jr. Member
  • **
  • Posts: 64
Re: default tce directory in iso ?
« Reply #4 on: January 19, 2010, 08:02:17 PM »
Hi Juanito,
Do you mean what i put inside the grub.cfg ?
==================
menuentry "TinyCore 2.7 iso"  {
   set iso="/iso/tinycore_2.7.iso"
   search --set -f $iso
   loopback iso (hd0,7)$iso
   linux (iso)/boot/bzImage quiet lang=en kmap=us noutc max_loop=255 tce=hdc7/tinycore/tce
   initrd (iso)/boot/tinycore.gz
}
==================
« Last Edit: January 23, 2010, 10:43:54 AM by libretto »

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: default tce directory in iso ?
« Reply #5 on: January 19, 2010, 08:08:08 PM »
If you remaster an ISO and put extensions in /opt/tce/optional with a link from /opt/tce/, then 2.8rc3 will load those extensions during the boot process.

For example, I remastered microcore_2.8rc3 to add the Dropbear ssh server and got the following structure:

Code: [Select]
$ ls -lR /opt/tce

/opt/tce:
lrwxrwxrwx    1 root     staff          21 Jan 19 22:20 dropbear.tcz -> optional/dropbear.tcz
drwxr-sr-x    2 root     staff         240 Jan 19 22:20 optional

/opt/tce/optional:
-rw-r--r--    1 root     root        94208 Jan 17 20:39 dropbear.tcz
-rw-r--r--    1 root     root           47 Jan 17 20:39 dropbear.tcz.md5.txt

Dropbear is then available whenever I boot the remastered ISO.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: default tce directory in iso ?
« Reply #6 on: January 19, 2010, 08:08:29 PM »
That's exactly what I meant, thanks.

Looks like we need a grub2 extension  :P

Offline libretto

  • Jr. Member
  • **
  • Posts: 64
Re: default tce directory in iso ?
« Reply #7 on: January 19, 2010, 08:19:23 PM »
hi vitex,
There's no /opt/tce directory inside the mc.iso, so i just create one inside the iso ?

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: default tce directory in iso ?
« Reply #8 on: January 19, 2010, 08:25:45 PM »
You need to create /opt/tce inside the file system within the file /boot/microcore.gz on the ISO.  See the wiki for detail about how to unpack and repack microcore.gz.

Offline libretto

  • Jr. Member
  • **
  • Posts: 64
Re: default tce directory in iso ?
« Reply #9 on: January 19, 2010, 08:31:06 PM »
What about the tce=???? if i boot the remaster iso from CD or USB flash ?

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: default tce directory in iso ?
« Reply #10 on: January 19, 2010, 08:52:16 PM »
You can use tce= if you need persistent storage for extensions that you install during execution, but you do not need tce= to boot and use the remastered ISO.  (If I want to add an extension, I just remaster the ISO, which typically takes only a minute or so.)

For example, I typically run MC in a qemu virtual machine and execute a version of MC (mcssh.iso) that is remastered to have the Dropbear ssh server with my public key installed:

Code: [Select]
qemu -m 128 -cdrom /tmp/mcssh.iso -redir tcp:22222::22 -boot d
That is the equivalent of booting the ISO on a bare machine.  I use scp and rsync over ssh to save and restore state of the (virtual) MC machine.


Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: default tce directory in iso ?
« Reply #11 on: January 19, 2010, 09:15:50 PM »
Quote
What about the tce=? if i boot the remaster iso from CD or USB flash?

You don't need it.

If you have a tce directory on the hard drive, and boot from the cd, Tiny Core will find it.
Many people see what is. Some people see what can be, and make a difference.

Offline libretto

  • Jr. Member
  • **
  • Posts: 64
Re: default tce directory in iso ?
« Reply #12 on: January 19, 2010, 09:28:40 PM »
Thanks Guy. Would like to have the extensions inside the iso instead. Waite for TC2.8 :). I'll try putting tce inside 2.7's boot directory /boot/tce then remove the tce= from the boot menu see if that works on current version (since you said it'll search for the directory itself).

Offline libretto

  • Jr. Member
  • **
  • Posts: 64
Re: default tce directory in iso ?
« Reply #13 on: January 19, 2010, 09:51:02 PM »
Not working. I think after loading the kernel and initrd the iso directory structure is invisible from the search (which make sense).

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: default tce directory in iso ?
« Reply #14 on: January 20, 2010, 12:06:57 AM »
Don't put it in /boot/tce, just /tce, and it should work.

This works if booting from the cd. I havn't tried other methods.
« Last Edit: January 20, 2010, 12:08:35 AM by Guy »
Many people see what is. Some people see what can be, and make a difference.