Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: Zendrael on March 08, 2013, 02:04:20 PM
-
Hello all!
Let's say I have Core installed on a USB stick (pendrive, flashdrive....) working as a server for other machines to netboot looking for this machine.
Is it possible to, after booting the server, remove the pendrive where it is installed on?
The other machines will boot up if the server system is running only on RAM?
This is a particular project to teach children/teenagers how to work with Linux and other Open Source tools, even playing with the server. So, I need that every time I boot the server, it will be fresh to play another day.
What do you think about it? Possible? How the best way?
Thanks!
-
Hi Zendrael
To do that you have to make sure nothing on the pen drive gets mounted to the system. So you can't have a
persistent /home or /opt on the pen drive. You also need to make sure extensions on the drive get copied
to the machine, maybe using copy2fs.
-
Hey Rich!
I am thinking this way:
- Install Core on pendrive
- setup everything I need, download extensions, change whatever I need...
- get all setup scripts, config files and home dirs persistent trought mydata.tgz
The boot time on the server may be a little slow but, I will not have OnDemand extensions, neither SCM apps. All apps that I need (and the others will need) will be mounted the usual way on OnBoot.
I found only 2 occurences of copy2fs in the wiki. Any example avaiable?
Thanks for the fast response!
-
You cannot remove the drive if it has apps mounted.
Use
Apps->Install Options->Toggle Default Install to Filesystem Flag
and verify that the copy2fs file exists
or;
touch /etc/sysconfig/tcedir/copy2fs
-
Hi Zendrael
Create an empty file called copy2fs.flg:
touch /mnt/YourPenDrive/tce/copy2fs.flgThe search page will return more results for copy2fs.flg if you need them.
When you think you have it set up correctly, try unmounting the drive. If it says it's busy, you're not there yet.
-
Thanks Rich and Gerald_Clark!
I will do some tests then I return to this thread!
-
tc-terminal-server will work in this case, too, as it copies the kernel and initrd to ram. So you can remove the usb stick after starting tc-terminal-server, assuming nothing else is using the stick.
(This post(tm) assuming you're using tc-terminal-server)
-
Hello all!
Using copy2fs.flg let me remove the pendrive after boot. But my apps are not loaded, even the ones that have icons on the wbar (firefox). The base apps are OK.
The other problem is that after I removed the pendrive, the Apps application does not connect to any mirror, but a ping from the command line returns ok from any website.
Any clues?
And Curaga, I will try that too (later), thanks!
-
Post the output of 'ls -l /etc/sysconfig/tcedir' and 'showbootcodes'.
-
@Gerald_Clark, the output is:
ls -l /etc/sysconfig/tcedir
lrwxrwxrwx 1 root root 13 Mar 8 21:48 /etc/sysconfig/tcedir -> /mnt/sda1/tce
showbootcodes
initrd=/tce/boot/core.gz quiet waitusb=5:UUID="<I am hand copying... but you know that there is a lot of hex here....>" tce=UUID="<the same uuid...>" BOOT_IMAGE=/tce/boot/vmlinuz
As I can see, it is looking for the extensions on the /mnt/sda1/tce, right? So, I rebooted the system without removing the pendrive and without unmounting it... The firefox app open and soon it hangs...
Almost there!!!
Should I try to setup a new tcedir?
-
How much RAM do you have? If you are going to load everything into RAM and then attempt to run firefox, you will need a few G.
-
Running on 256MB of RAM with 32MB shared with video!
Hum... maybe that's the problem?
While just running the system without the copy2fs everything runs ok, I understand that it can be a problem to load everything into RAM... Firefox, LibreOffice and other apps will crash for sure...
If there's no way of doing that, even because I think that all the other clients must have the same amount of RAM, maybe I should go for the tc-terminal-server approach?
-
Hi Zendrael
I think if you move your tce directory from the pen drive to the local hard drive and remove copy2fs.flg it might
do what you want.
-
Hi Zendrael
I think if you move your tce directory from the pen drive to the local hard drive and remove copy2fs.flg it might
do what you want.
The idea is/was to have the entire "server" running on RAM so I can, after boot, remove the media, and at some point in the course, let the students "have fun" with the server. In another day, boot again from the media and all is shinning new!
-
The problem is that all extensions, your home directory, and the tmp directory are in RAM.
You will have difficulty doing anything in firefox as you have no room to download anything.
-
Hi Zendrael
Yes, but it sounds like you may not have enough RAM for what you want to do. If being able to remove the
pen drive after boot is important, moving the tce directory may be your only choice.
-
1. Boot with code "base" but without "tce=".
2. Make sure that /etc/sysconfig/tcedir points to -> /tmp/tce and that no partition is mounted before processing to step 3.
3. mount partitions containing extensions and boot files.
4. In an aterm type: watch df -h /5. cp extensions plus their corresponding .dep and .md5.txt to -> /tmp/tce/optional and/or tce-load -wi extensions from repo.
Restrict yourself to a minimum of extensions really necessary, while having a close watch on free space (see 4.).
6. tce-load -i /tmp/tce/optional/*.tcz7. run tc-terminal-server8. Check for free space and based on result eventually cp and tce-load -i additional extensions.
9. Umount all mounted partitions.
10. Verify no partition is mounted and then unplug pendrive.
11. Point out which details I forgot or overlooked :P