Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: RedB on December 09, 2009, 11:38:16 PM
-
Hi All,
I'm after some help please.
- I have made modifications and extensions etc to my USB stick tinycore. All good.
- I have turned it into a bootable iso using isomaster. (open base tinycore iso and add my tce folder). All good.
- the iso boots perfectly in virtualbox loading my extensions from the tce folder. All good
- Once I burn the iso to CD my extensions don't load and only the base build loads.
What's going on?
Thanks
Rob
-
UPDATE
- the iso I created works fine in VirtualBox (my extensions loaded)
- burning it to a CD and making VirtualBox boot off it works fine too. (my extensions loaded)
- Leave the CD in the drive, reboot my physical machine and boot off the CD and I get the default/base TinyCore build with none of my extensions loaded.
When booting the physical machine, it seems to fly past the "Loading TinyCore Applications....." line where as in the VM it sits there for a few seconds searching for the tce folder then loads my extensions and settings.
As the iso and CD seem to work fine in the VM I'm ruling out an isomaster or similar issue but am stuck as to why it behaves differently.
Cheers
-
What is the device used for your CD-ROM (e.g. /dev/hdc) when
[1] booting in VB,
[2] booting on "real" PC?
My hunch is that the result is different. But the result for the two situations for case [1] (the ISO image or the CD) should be the same.
Furthermore, what is the result if you execute (in a terminal): "autoscan /tce d"?
-
Are extensions placed into /opt/tce dir on the CD ?
Quote from TC 2.5 reelase notes:
Re-implemented /opt/tce boot time support.
-
Maro
Thanks for the reply.
the result of "autoscan /tce d" returns hdc as you suggested. I added tce=hdc to the bootcode and it worked! I can hard code this into the image but can I guarantee every machine will be assigning the CDROM to hdc? Is there a way to make it scan all devices?
Thanks again,
Rob.
UPDATE: It didn't work on my other laptop. Bugger :(
Also, if I turn that iso (with hardcoded bootcode) into a USB it obviously stuffs up as well. I really need a way to make it scan properly and find the tce folder itself.
-
For a CD use /opt/tce not /tce and be sure to use the latest version.
For removable flash device use LABEL or UUID see FAQ
http://www.tinycorelinux.com/faq.html
or use the usbinstall program as provided.
-
Thanks Roberts
Unfortunately, putting my extensions in /opt/tce doesn't work with either VirtualBox booting from the iso OR from a physical CD.
Any other ideas?
I'd prefer not to use the UUID as my plan is to have many USB sticks created from my iso by people with no IT skill.
I'll explain... I have made modifications to make a dead simple and fast booting portable and secure TS client for people at work. All users see is a connect button, a vpn button and a shutdown button. The TS server is pre-configured and the VPN is setup for our corporate VPN server. If staff are at work, they click the connect button, if they are at home, they VPN first then connect.
My iso(s) at present:
Option1
- I have created an iso with my modifications
- I have actually put that iso, unetbootin and some dead simple instructions into a "Make Live USB" folder
- I then make another iso (with the same extensions) but include on it the Make Live USB folder
This means people can download a 40mb iso and burn to a CD. If they choose, they can also easily (within Windows) create a USB stick from that CD where ever they may be.
Option 2
- make 1 iso with my changes
- Put my Make USB Folder in the same location and people choose which to do, CD or USB
Option 3 (3rd and final stage and not finished yet)
- Make Option 1 iso but include qemu as well. The concept is that users could also plug their USB/CD into a 'running' Windows PC and fire up tinycore in a VM to connect to work. 1 image for 3 scenarios and total flexibility!
I don't believe my ideas for the best way to distribute my modified TinyCore should in any way be causing the problems I am experiencing, but it does mean that typing in bootcodes or identifying UUIDs etc will be too complicated for my target audience. I need it to just find the tce dir at boot.
Thanks heaps, tinycore is the best distribution I have found so far for my needs.
-
If you make a CD with appropriate extensions, and that part is working (I have done this with an earlier version, and it worked. I have not tried it with the latest version).
I used this method.
http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating_extensions
You can, from the menu, select Tools -> USB Installation.
Another option is to open the terminal and type: sudo usbinstall
I used the Ext option.
It will automatically detect UUID for the tce directory.
-
What boot codes are you using?
I once had similar problems using the ....noswap....boot code!
-
OK. Thanks for all the replies guys.
I've decided to just bail on the CD option and only use USB sticks. I can't get it to reliably work on CD. With the waitusb bootcode, it seems to work fine on usb.
I also have qemu (for windows) working now and I'll look at adding qemu linux files to the stick. Then I should be able to use any PC, (currently turned off, running Windows or Linux) to securely connect to work and TS in about 30seconds!
I'll be a happy chappy ;)
Cheers
Rob
-
What boot codes are you using?
I once had similar problems using the ....noswap....boot code!
Yes, that was fixed a while back though. You can see in tc-config that there is a "wait $fstab_pid" right before it loads the extensions. This waits for the drive detection to finish before checking for a /tce directory.
@RedB
I realize you found a workable solution, but you also identified a failure mode. That is of interest to me because it means something isn't right somewhere. I'll look into it. What was the latest version of TC that you tried?
-
I'm using 2.6.1
My process for modification was
- Made USB with unetbootin
- made modifications and created tcz as per wiki instructions
- used isomaster to add the tce folder from my usb to the base tinycore iso thus creating my new customised iso
- Nothing I tried would make a physical CD in a physical PC successfully 'autoscan' to load my modifications. (specifying tce=hdc worked for one PC but not another so was deemed a failure)
- The physical CD and iso work fine a VM.
Good luck
Cheers
Rob.
-
I've decided to just bail on the CD option and only use USB sticks. I can't get it to reliably work on CD. With the waitusb bootcode, it seems to work fine on usb.
Cheers
Rob
It appears to me that if you do give up on making CD with integrated extensions work for you and rely only on USB to be distributed to users, then some users may potentially experience extremely slow boot, if they boot on older machines which have still USB 1.1 instead of the new USB 2.0.
I was trying this on my older laptops and desktops and booting from CD Live was the only realistic option in this context. USB 1.1 booting worked of course, but you can as well make yourself a cup of coffee waiting for the boot to finish...
In result, if I boot from my new laptop I use USB stick, but for my older laptop I need to use my TC CD to make it realistic.
-
RedB: if you have the time, could you try that with version 2.5 and report the results?
-
I tried this myself to see if it would work.
I used a conventional installation of Tiny Core 2.6.1.
I made a cd, as explained here.
http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating_extensions
I ran the cd on a computer with the hard drives disconnected, and it ran with all extensions loaded, and programs working.
I used this computer, running from the cd, to install on a usb drive, and it worked. I ran Tiny Core from this usb drive on another computer, and it worked, with all programs working. (you need appropriate extensions included in the cd to install on a usb drive.
I used a normal tce directory on the cd, not /opt/tce.
You need to copy the extensions from the tce directory on the cd, to the tce directory on the usb drive, after installing Tiny Core on the usb drive.
I suggest anyone having problems use this method.
http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating_extensions
-
I made a cd, as explained here.
http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating_extensions
I ran the cd on a computer with the hard drives disconnected, and it ran with all extensions loaded, and programs working.
I used this computer, running from the cd, to install on a usb drive, and it worked. I ran Tiny Core from this usb drive on another computer, and it worked, with all programs working. (you need appropriate extensions included in the cd to install on a usb drive.
I used a normal tce directory on the cd, not /opt/tce.
Just to make sure I understand: Does this mean you used just /tce on the CD integrated with extensions, not /opt/tce as specified in the procedure in wiki?
-
Using the current release of v2.6.1, for the record, it is /opt/tce. As shown in /usr/bin/tce-setup.
if [ "$(ls -A /opt/tce)" ]; then
TCEDIR=/opt/tce
FILELIST=`ls "$TCEDIR"/*.tc* | grep -E .tc[ez][ml]*$`
for FILE in $FILELIST; do process; done
fi
I am running a liveCD with jwm in /opt/tce
[tc@box:~$ ls -l /opt/tce/
-rw-r--r-- 1 root staff 77824 Dec 14 15:14 jwm.tcz
tc@box:~$
I am not the only one either, here is feedback from QA
Robert, I have tested to create a remastered microcore.gz that
includes a set of extensions located in /opt/tce. The result so far
looks good :)
Using /opt/tce does not have to be specified via boot options or searched. Using /tce can cause search and specification issues as was previously indicated.
-
Just to make sure I understand: Does this mean you used just /tce on the CD integrated with extensions?
Yes
Since then I made another cd, this time using /opt/tce. Still using Tiny Core 2.6.1.
I found when I run this cd on a computer, the programs are not loaded.
With the cd using /tce on the cd, programs are loaded.
Others doing this, post your results.
When using /opt/tce, is there something which needs to be done differently?
For /opt/tce to work, do you need to do a remaster?
Using /tce works just by integrating extensions to an ISO.
http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating_extensions
-
After booting, does ls -l /opt/tce show your extensions?
/opt/tce is inside tinycore.gz and is therefore included in the base filesystem, that way no autoscan./search, or specification is needed.
-
For /opt/tce to work, do you need to do a remaster?
You can avoid it. Simply create a cpio archive with just an /opt/tce directory and contents. Then add it to your syslinux initrd line:
initrd=/boot/tinycore.gz,/boot/opt_tce.gz
Put opt_tce.gz in the same directory as tinycore.gz and make a new disc.
-
Maybe he wants them mounted, not loaded.
-
Maybe he wants them mounted, not loaded.
Perhaps. It's a practical consideration. New users may not realize at first that mounting extensions on a physical CD keeps the CD mounted (and unremovable). As long as a user has sufficient RAM, loading extensions from /opt/tce will allow the CD to be removed after startup.
-
And if autoscaned, or user specified by boot option, your tce folder is pointing to say hdd, the readonly cdrom device, then you have disabled any further easy access to adding more extensions. It is only by unintended consquences that /tce works on the cdrom. The noscan list always intended to not try to scan cdrom and dvd devices. Using /opt/tce either by additional .gz initrd files or inside tinycore.gz will allow a custom cdrom that still will be able to have access to repositories via a regularly defined tce folder.
-
After booting, does ls -l /opt/tce show your extensions?
no
-
I used this method: http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating_extensions
With this method, if you have appropriate extensions on the CD, you can:
1. Run Tiny Core with programs from the CD. For those who just want to run Tiny Core from the CD.
Install Tiny Core on the hard drive
2. Partition the hard drive.
3. Copy Tiny Core from the CD to the hard drive.
4. Copy the tce directory and extensions from the CD to the hard drive.
5. Set up Grub.
6. Set up the MBR.
Install Tiny Core on a USB drive.
7. Install Tiny Core on a USB drive, using the USB Installation tool.
8. Copy the tce directory and extensions from the CD to the USB drive.
This method is relatively easy for new users.
While running from the CD, you can't have a tce directory on the hard drive, and use the appbrowser to download additional extensions.
However, after installing Tiny Core on the hard drive, or USB drive, you can run the computer from the hard drive, or USB drive, and use the appbrowser to download additional extensions.
-
For /opt/tce to work, do you need to do a remaster?
You can avoid it. Simply create a cpio archive with just an /opt/tce directory and contents. Then add it to your syslinux initrd line:
initrd=/boot/tinycore.gz,/boot/opt_tce.gz
Put opt_tce.gz in the same directory as tinycore.gz and make a new disc.
This works.
It takes longer to boot. This is a disadvantage for anyone wanting to run Tiny Core from the CD, instead of installing it.
You should be able to do all of the same things with it as the other method, with the added benefit of being able to use the appbrowser to download additional extensions to the tce directory on the hard drive.
To create a CD like this, is more difficult for new users.
When I initially tried this, it worked on one computer but some programs did not work on another. On the computer in which it did not work properly, I discovered I had a tce directory with extensions, and there were incompatibility problems. It loaded both the extensions on the CD and the hard drive.
I haven't tried to use the appbrowser to install additional extensions. I wonder if it will recognize extensions on the CD, and not reinstall them, or double up. This may cause problems if rebooting from the CD, with extensions on the hard drive. I havn't tried it. Just wondering.
-
It takes longer to boot.
It does take time to copy the extensions to memory. That is the trade-off in order to free up the media from which TC was booted. This is handy if you wish to boot several systems using the same disc. One of the reasons for /opt/tce/ is to load firmware extensions for NICs before the DHCP client starts, so it is has other purposes as well.
To create a CD like this is more difficult for new users.
I agree. I would suggest new users avoid a CD altogether unless the system used does not allow booting from USB devices. If available, a USB drive is far simpler, but creating a /tce/ directory on it for extensions means it cannot be removed. I figure most people will be okay with that.
I wonder if it will recognize extensions on the CD, and not reinstall them, or double up.
When an extension is installed, it creates a file in the /usr/local/tce.installed/ directory. The appbrowser will not try to reinstall an extension if it detects this file.
-
[To create a CD like this is more difficult for new users.
I agree. I would suggest new users avoid a CD altogether unless the system used does not allow booting from USB devices. If available, a USB drive is far simpler, but creating a /tce/ directory on it for extensions means it cannot be removed. I figure most people will be okay with that.
I find this thread very helpful to understand this mechanism, particularly clearly defined by roberts and expanded on experience and examples of Guy and Danielibarnes.
Taking from here, it seems that a quick and easy way to remaster CD to integrate required extensions would be quite useful for end users.
E.g. Zenwalk (granted a much bigger distribution, but of the 'light and efficient' type) has an extremely easy way to remaster from a gui interface, dumping the entire running system to create a live ISO, including user configurations.
Considering that TC is modular architecture and composing various pieces to build a target system is modus operandi for TC, such easy remaster function seems more important than for other distributions.
As Guy pointed out and I agree, the capability of running from CD is very important and often cannot be replaced by usb installs. However the desired integration is achieved as defined by roberts and explained by danielibarnes, therefore it appears to require relatively complicated remastering procedure for end user.
-
True. It is not as easy. But it is only common sense that a dynamic distro is more complicated and requires more effort than a static one. Most distros are static, only upon a scatter mode installation does one get the ability to add more applications via their package manager. If you wish to maintain the dynamic features of TC then you should use the recommended method as I and Daniel have pointed out.
Comparing a static distro to TC's dynamic nature is not a fair comparision. But if your goal is to bypass the dynamic features and a make yourself a static build then so be it. Just be aware of it. And when a your custom CD tried to use the dynamic features and it fails because your tce folder is frozen on the CD, then what; more hacks. Seems to me to be more confusing to anyone who used such CD as many things will not work.
Static builds such as this were never intended, see
cat /etc/init.d/tc_noscan.lst
cdrom
swap
pts
fd
ntfs
I never intended the dynamic tce folder to be on any of the above devices.
It is the reason for /opt/tce, and has been pointed out, several boot loaders are able to load multiple cpio archives. It has also been pointed out the /opt/tce is really for extra modules, drivers, etc, the goal being to maintain TC's dynamic capabilities.
Besides, I thought CDs were on their way out.
-
Comparing a static distro to TC's dynamic nature is not a fair comparision. But if your goal is to bypass the dynamic features and a make yourself a static build then so be it. Just be aware of it. And when a your custom CD tried to use the dynamic features and it fails because your tce folder is frozen on the CD, then what; more hacks. Seems to me to be more confusing to anyone who used such CD as many things will not work.
Besides, I thought CDs were on their way out.
My yes goes to this and the rest of the post. However turning dynamic into static build was not my objective. If I understand, pre-configuring extensions into /opt/tce and remastering does not mean making distro static. It retains dynamic nature, just loads those extensions upon boot. The resulting TCL is as dynamic as the original base.
Going static would be to just put /tce on the CD, which is trivial process, but remastering a new LiveCD with extensions properly integrated in /opt/tce appears to be much more complex for end user.
The value of this however would be enormous for the user: Most may not want to rebuild from scratch each time, but like to start from certain pre-configured favourite applications and settings, e.g. Xorg, LXDE, Firefox, etc. as their new favourite base. This could be properly integrated in /opt/tce and burned to new LiveCD. But it is far from being static, additional extensions can be loaded at will just as well as starting with the original base.
On CD being on the way out - I am not sure it will happen any time soon and just perhaps for data storing as USB is more convenient. However there is no commonly recognized standard for booting from usb, all depends on vendor implementation whether and how, and older PC's cannot usb boot at all... Ones we have our TC installed and configured on USB stick it works great, however there is no assurance it will boot as well in another machine... Anyone tried to boot from USB in virtual machine, either VirtualBox or VMplayer? On the other hand CD booting is standard across the board...just put the CD in and press the button...
-
I have already written a script that takes your existing tce directory and creates an opt_tce.gz out of the contents and creates an iso based on an already downloaded release iso. In other words, be running TC, mount install your favorite apps through the appbrowser, download a release iso, then run the script and it spits out a premade iso with those extensions integrated in /opt/tce. A warning message appears indicating the RAM the extensions will occupy not counting run time use.
I used the method mentioned by danielbarnes that keeps the opt_tce initrd seperate so it is easy to just copy that file and the isolinux.cfg from one release to another. I may consider putting a GUI to this, maybe Xdialog, but that is really not needed as there is only one step involved and that is choosing the base iso you want to start with. After some more testing I may post in the programming and scripting section.
I may add an option to include your backup as well if /opt/tce supports it so the cd could be fairly personalized. While providing a prebuilt desktop is not what TC is about, I know there are times when a preinstalled cd is desired. I was using a Windows machine away from home for a while where I had no Linux access to the hard drive and the usb ports were no longer working. I got tired of redownloading all the extensions I normally use as well as having no saved settings, so I made a cd a while back. It made life easier, and I think a tool to make it easy to make a custom iso would be practical for those who want it.
-
I think a tool to make it easy to make a custom iso would be practical for those who want it.
I think that sentence summarizes this and numerous other threads on the same topic. I would add that while a GUI front-end may not add any features, it makes the tool more accessible to those who fear the command line.
I have already written a script that takes your existing tce directory and creates an opt_tce.gz out of the contents and creates an iso based on an already downloaded release iso.
I used the method mentioned by danielbarnes that keeps the opt_tce initrd seperate so it is easy to just copy that file and the isolinux.cfg from one release to another.
It would be worthwhile then for the script to accept an existing opt_tce.gz (or automatically extract it from a previously customized iso) and migrate that to a new release.
-
Jason, Danielibarnes,
This is greatly appreciated! Your work that is, to make this easier for TC users. Also your words confirm recognition that this is an important tool for TC...
-
I would add that while a GUI front-end may not add any features, it makes the tool more accessible to those who fear the command line.
I have seen this sort of statement many times in many places... the implication is there is some sort of irrational idea of not wanting to use the command line. May be tongue in cheek, but a word in jest is oft based on some serious idea...
In any case as a newcomer to linux it isn't that I "fear the command line", no it is simply lack of knowledge of the thousands(?) of commands, each with their switches that take years to master. A GUI is simply for making things easier. Clicking a few buttons is a lot easier than trying to discover the right series of command plus their switches.
-
I have most details in place, will test some things tonight. I don't want to promote creating custom cd's as a normal means of running TC, but rather as a special purpose tool. Say for instance creating a rescue cd with some basic tools installed. Or a basic desktop of a small set of one's favorite apps to keep as a backup system.
I think users of all experience levels would in general be much better off having their backup and tce directory on persistent writable storage for general use. But I will try to provide a simple way to remaster using /opt/tce if it can be done elegantly and in keeping with TC concepts and supported running modes.
-
In any case as a newcomer to linux it isn't that I "fear the command line", no it is simply lack of knowledge of the thousands(?) of commands, each with their switches that take years to master.
That is true also. Years is not an exaggeration. I find these links indispensable, among others:
Linux Command Directory (http://oreilly.com/linux/command-directory/)
Bash man page (http://linux.die.net/man/1/bash)
I don't want to promote creating custom cd's as a normal means of running TC, but rather as a special purpose tool.
If I had a nickel for every time I saw someone ask about remastering TC ... heh. Some didn't need to remaster, but only thought they did. If a tool is easy to use, then it is likely that some will try to use it without understanding it first. I think that with sufficient documentation regarding usage though, users will recognize it as special-purpose, like TC_Terminal_Server. It took me a while before I realized that "become a mothership" meant running a DHCP/TFTP server for PXE. :)
-
I have already written a script that takes your existing tce directory and creates an opt_tce.gz out of the contents and creates an iso based on an already downloaded release iso.
Jason
Compare the time it takes to boot with the same extensions integrated using this method.
http://wiki.tinycorelinux.com/tiki-index.php?page=Integrating_extensions
This would depend on which extensions are installed, and vary with different computers. In one test I did, it took 45 seconds longer.
I think if extensions were integrated into a remaster, this time delay would not occur, or not be as great.
It may be worthwhile coming up with a method of integrating extensions into a remaster.
-
In any case as a newcomer to linux it isn't that I "fear the command line", no it is simply lack of knowledge of the thousands(?) of commands, each with their switches that take years to master.
There are some things that I have learnt how to do, and are not problem for me. However, I know new users would have difficulty with some of the more difficult things. I think it is important to keep things as easy as possible for new users. If people find it too difficult, they will use other operating systems. The easier it is, the more people will use Tiny Core.
-
On more thought, having GUI or even dialog support means that one is going to have those extensions in the new iso whether they are desired or not. Mkisofs-tools is the only one really needed, and I can add a flag to remove it from the new iso. It will be command line but real simple. Say for instance
mkiso.sh --backup --remove /mnt/hda1/tinycore-2.6.iso
--backup will include a backup and --remove will remove the mkisofs-tools extenison if the user does not want it included in the new iso.
The first cd I made a year ago had the /tce directory on the cd, but /opt/tce is the supported location that will be used.
-
RedB: A modification was made to rebuildfstab for Tiny Core 2.7 rc1. Please try it and let me know if it fixes your problem. The /etc/fstab file is essential to correct operation of the tce= boot parameter and the autoscan function. I suspect that /etc/fstab was not committed to the filesystem before your /tce directory was processed.
-
Guy,
I did recently use /tce as the extension directory on a CD, and it does boot fast and use very little RAM. Of course, /tmp/tce must be manually set in /opt/.tce_dir to load more extensions on the fly. When /opt/tce is used, /tmp/tce is automatically set as the tce dir if no existing tce directories are either specified or scanned.
A cd with /tce used as the tce directory will not integrate with existing tce directories, and an /opt/tce cd will as it was designed to be complementary to the main tce directory rather than being the main one.
Only one of my machines boots from usb, so I do find running from a CD iso of interest. I view using /tce kind of like using PPI. It has it's advantages in certain circumstances for older machines but at the expense of being compatible with all of TC's modes and concepts. One can use /tce as the directory if they understand the limitations. But for general use on most machines /opt/tce is recommended.
-
I haven't tested it, but I suspect making a remaster using /opt/tce would boot faster than using opt_tce.gz.
-
Perhaps, though the initrd files are loaded one after the other, so unzipping a 10mb one followed by a 30mb one may or may not have a noticeable difference from unzipping a 40mb one. My personal preference would be to keep available the option of "base norestore" use of the cd, but remasters by definition are tailored to personal preference. Too bad initrd's cannot be loaded after a persistent /opt is set up to accomodate older hardware while keeping the dynamic features of using /opt/tce. But if persistent media is present, there are the other running modes available.