Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: libretto on January 19, 2010, 06:47:41 PM

Title: default tce directory in iso ?
Post by: libretto 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
Title: Re: default tce directory in iso ?
Post by: Guy 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
Title: Re: default tce directory in iso ?
Post by: libretto 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. :)
Title: Re: default tce directory in iso ?
Post by: Juanito 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?
Title: Re: default tce directory in iso ?
Post by: libretto 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
}
==================
Title: Re: default tce directory in iso ?
Post by: vitex 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.
Title: Re: default tce directory in iso ?
Post by: Juanito on January 19, 2010, 08:08:29 PM
That's exactly what I meant, thanks.

Looks like we need a grub2 extension  :P
Title: Re: default tce directory in iso ?
Post by: libretto 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 ?
Title: Re: default tce directory in iso ?
Post by: vitex 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.
Title: Re: default tce directory in iso ?
Post by: libretto on January 19, 2010, 08:31:06 PM
What about the tce=???? if i boot the remaster iso from CD or USB flash ?
Title: Re: default tce directory in iso ?
Post by: vitex 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.

Title: Re: default tce directory in iso ?
Post by: Guy 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.
Title: Re: default tce directory in iso ?
Post by: libretto 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).
Title: Re: default tce directory in iso ?
Post by: libretto 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).
Title: Re: default tce directory in iso ?
Post by: Guy 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.
Title: Re: default tce directory in iso ?
Post by: libretto on January 20, 2010, 02:05:36 AM
Guy,
Not working either, i try to boot it from HDD. (didn't try CD boot)
Title: Re: default tce directory in iso ?
Post by: Guy on January 20, 2010, 02:48:04 AM
Is there any reason why you want to boot from an iso instead of a normal installation?
Title: Re: default tce directory in iso ?
Post by: libretto on January 20, 2010, 03:53:13 AM
Yes, a working iso in just 1 file vs different tc version + hundreds of different extension versions.

This is just 1 example what i was talking about:

http://forum.tinycorelinux.net/index.php?topic=4317.0
 (http://forum.tinycorelinux.net/index.php?topic=4317.0)
Title: Re: default tce directory in iso ?
Post by: StXh on January 25, 2010, 10:04:22 PM
I use VirtualBox to test my ISO.
If I do not use the boot code tce=hdc, TC will load extensions from hda1.
If I use tce=hdc boot code, TC 2.7 can load my extensions from ISO and TC 2.8 didn't.
I use grub4dos' grldr as the CD bootloader.
I have tried opt/tce, it didn't work.
Title: Re: default tce directory in iso ?
Post by: vitex on January 25, 2010, 11:56:12 PM
I have tried opt/tce, it didn't work.

What is the structure of the /opt/tce directory on your ISO?

I remastered Micro Core 2.8 to add dropbear.tcz in /opt/tce[/optional], and the dropbear extension is installed whenever I boot the remastered ISO.  The directory /opt/tce has the following structure:

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

/opt/tce:
lrwxrwxrwx    1 root     staff          21 Jan 26 04:47 dropbear.tcz -> optional/dropbear.tcz
drwxr-sr-x    2 root     staff          80 Jan 26 04:47 optional

/opt/tce/optional:
-rw-r--r--    1 root     root        94208 Jan 20 23:40 dropbear.tcz
-rw-r--r--    1 root     root           47 Jan 20 23:40 dropbear.tcz.md5.txt
Title: Re: default tce directory in iso ?
Post by: StXh on March 08, 2010, 02:45:46 AM
What is the structure of the /opt/tce directory on your ISO?
I use ISO tools on windows, so I do not know how make any links. But I put onboot.lst here

I want make the ISO like this,
 1, not re-master tinycore.gz
 2, boot and auto load the extensions

I add boot code 'tce=hdc' and boot well on mostly PCs, but a few PCs recognize cdrom as 'hdd' or 'hdb'.
Title: Re: default tce directory in iso ?
Post by: maro on March 08, 2010, 08:25:01 PM
@StXh: I believe you can avoid the issue with different device names on different computers by using the LABEL to identify your CD-ROM.

The "original" TC ISO uses "TinyCore" as label, and you could find out your's with 'blkid /dev/hd*'. You would then use 'LABEL=...' instead of the device name as boot code (e.g. 'tce=LABEL=TinyCore'). AFAIK you define the label with the '-V' parameter of 'mkisofs'.