Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: chucklz on February 01, 2011, 12:49:46 PM
-
So, I have a LAN boot of TC running on my main computer (which so happens to be windows, wanna fight about it? ;)). I have a VM Ware machine with 64MB RAM, NO hard disk OR CD drive. The VM can boot from LAN fine, and loads into tiny core. The LAN boot uses pxelinux.0 boot file, the "default" files has this:
DEFAULT menu.c32
PROMPT 0
NOESCAPE 0
ALLOWOPTIONS 0
TIMEOUT 30
MENU TITLE .ING TINY CORE
# TINY CORE
LABEL Tiny Core Linux
KERNEL /tc/bzImage
append initrd=/tc/tinycore.gz tftplist=192.168.0.142:/tc/tce/onboot.lst opt=192.168.0.142:/tc/tce/opt
tftpdlist loads my extensions from my Windows server. onboot.lst has this:
pppd.tcz
gftp.tcz
grub-0.97-splash.tcz
nfs-utils.tcz
filesystems-2.6.33.3-tinycore.tcz
BUT! I need special modifications to /etc/ppp/options for what I'm doing with it. I tried writing a shell script that would execute when bootlocal.sh was run to write a new options file (and other files that I need), but it doesn't load.
Any ideas?
-
Not a PXE user here, so my thoughts might be off the mark.
If you want to be able to call another script from '/opt/bootlocal.sh' then a few conditions will need to be met:
(1) the script file has to be present at the time of the call (e.g. via inclusion in the backup, so please check '/opt/.filetool.lst'),
(2) the script file needs to have suitable permissions (and ownership, but since it should be run as 'root' that might not be a problem here),
(3) if using a sheebang in the script make sure that it really works (otherwise just use something like 'sh /path/to/script' in '/opt/bootlocal.sh')
-
Please reread the wiki article.
You should not use the tce/onboot.lst for tftplist.
You probably do not need tftplist at all.
You need to define nfsmount and add tce=nfs to the boot options.
PXE booting does not support opt=.
You should be able to install extensions, edit /opt/.filetool.lst, and perform a backup.
-
I can see what you guys mean, but I cannot backup because the client loads TC as if it were booting from CD, so I cant save any backups or files.
I tried to get "nfsmoun=" to work, but TC, for some reason, couldn't connect to my nfs server. The "opt=" was a test, it had no effect lol.
If I can't use onboot.lst to load extensions, how can I load them on boot? Or a better question is; how can I LAN boot TC and allow writes to the booted files? I've read wiki many times, but I might not be reading the right sections? (link?).
Thanks all for your help.
-
You need to set your nfsmount= to point to an nfs shared directory that contains a tce directory.
Make sure this tce directory has proper ownership ( 1001 ) and permissions ( read, write, and search ).
EX:
drwxrwxr-x. 5 1001 ftp 4096 2010-12-18 13:14 tce
-
and if i run nfs server on windows what do i set the permission to?
-
I have no idea how you could run a proper NFS server on windows.
-
Okay, so I've setup an NFS on my windows machine which point to "C:\nfs" (exported as "/c/nfs/") and my PXE default file reads:
DEFAULT menu.c32
PROMPT 0
NOESCAPE 0
ALLOWOPTIONS 0
TIMEOUT 30
MENU TITLE .ING TINY CORE
# TINY CORE
LABEL Tiny Core Linux
KERNEL /tc/bzImage
append initrd=/tc/tinycore.gz nfsmount=192.168.0.142:/c/nfs
Though it still cannot mount, even if I try a "mount -t nfs 192.168.0.142:/c/nfs" in the TC terminal (it MAY be a permission problem, I'm currently looking into it).
Before, I had the option "tftplist=192.168.0.142:/tc/tce.onboot.lst" to load my extensions. After I get the NFS server up, how do I load them without using "onboot.lst"?
-
You might be able to copy files to your pxe server dir, and after booting to retrieve them from TC by 'tftp'.
At least so under bare metal circumstances, virtualization adding a layer of complexity aside.
BTW, the title of this thread is a bit misleading, as the real question is not particular to any extension; also I think this thread would rather belong into the "Tiny Core on Virtual Machines" forum.
-
If you are going to test mount from TC, and have not loaded the nfs client extensions, you will have to mount with -o nolock.
-
BTW, the title of this thread is a bit misleading, as the real question is not particular to any extension; also I think this thread would rather belong into the "Tiny Core on Virtual Machines" forum.
Originally, I had my extensions load on boot, but my options file for pppd was empty and I wanted to run a script on boot to write new values to all the files I needed. But the script never ran :'(. I also am testing this on a virtual machine because I plan to run this off an old neoware thin client, but it was less of a hassle to do a bunch of tests in vmware before actually using the neoware thin client.
You might be able to copy files to your pxe server dir, and after booting to retrieve them from TC by 'tftp'.
Could I have that in a script and run it off boot? My whole goal with this is to have this computer able to turn on and load its settings without me touching it. (It's gunna be a dialin server that switches me to the internet using proxyarp. Here's the link to the setup; yes I know its for free BSD but it should still work right? http://pages.ssimicro.com/~jeremyc/ppp.html (http://pages.ssimicro.com/~jeremyc/ppp.html))
If you are going to test mount from TC, and have not loaded the nfs client extensions, you will have to mount with -o nolock.
"mount -o nolock 192.168.0.142:/c/tftp/boot/pxe/tc /mnt/tftpd" doesn't work either :(. And even when I had nfs-utils loaded, I still couldn't mount using "mount -t nfs 192.168.0.142:/c/tftp/boot/pxe/tc /mnt/tftpd/"
*192.168.0.142 is my TFTP server running Windows 7 Ultimate x64*
Should I maybe use FreeBSD after all? Or should I stick with TC?
-
You might be able to copy files to your pxe server dir, and after booting to retrieve them from TC by 'tftp'.
Could I have that in a script and run it off boot? My whole goal with this is to have this computer able to turn on and load its settings without me touching it.
Then "dynamic remastering" (see wiki) sounds like the way to go.
You could possibly load the script and a modified /opt/bootlocal.sh in order to execute it with an additional cpio archive which you add to your bootloader.