WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can't find tce directory during PXE boot  (Read 16859 times)

Offline dpatten

  • Newbie
  • *
  • Posts: 9
Can't find tce directory during PXE boot
« on: November 19, 2009, 10:55:21 AM »
I can boot TC 2.5 using tftp32 from a windows box, but it will not load the apps from tce. Here is a copy of my /pxelinux.cfg/defaul file.
display boot.msg
default tinycore
label tinycore
kernel bzImage
append initrd=tinycore.gz quiet nfsmount=172.17.1.30:/tce tftplist=172.17.1.30:/TinyLinux/boot/tcz.lst tce=nfs/tce waitdhcp=10 max_loop=255

I am very new to linux as a whole so any help is appreciated. Keep in mind my basic understating of how Linux when respond.

Offline thane

  • Hero Member
  • *****
  • Posts: 688
Re: Can't find tce directory during PXE boot
« Reply #1 on: November 19, 2009, 11:53:41 AM »
Not sure about your tce directory setup here. My tce directory is on a usb stick directly under the root (sda1) so I think my setting would be tce=sda1, which would cause Tiny Core to scan sda1 for the tce directory. I don't actually specify this since Tiny Core does its own scan of root directories for the tce directory anyway. On your box Tiny Core may be looking for another tce directory inside of directory nfs/tce.

Offline dpatten

  • Newbie
  • *
  • Posts: 9
Re: Can't find tce directory during PXE boot
« Reply #2 on: November 19, 2009, 12:42:22 PM »
Thanks for the reply. I have been able to get the tce directory to work on my usb stick. I am looking for the correct syntax to have TC look for the tce directory from an nfs. I have read everything I can find in the form and am re-reading it now for anything I missed. But, I still can not get TC to load my extensions from an nfs. What I am trying to do is get TC to load from a PXE boot (done) and then load the apps I need from tce on an nfs and auto start a vnc server. Like I said, I am very new to linux and I don't have the back ground experience to make this work yet. I have been working on for about 2 weeks and I know I am almost there. Just a couple more step to make it work.

Offline thane

  • Hero Member
  • *****
  • Posts: 688
Re: Can't find tce directory during PXE boot
« Reply #3 on: November 19, 2009, 06:57:31 PM »
Yup, I'm a Linux newbie myself and have barely learned enough to get my own setup to work. That said, I hope you don't mind my taking a couple of shots at this...

Not familiar with nfs at all. Have you looked at what actually gets mounted when you boot (e.g. ls /mnt command from a terminal window)? If nfs follows the same pattern as hard drives and usb sticks, there should be a root directory of something like "nfs1", which is where you'd want your tce directory. In that case your cfg file should have "tce=nfs1" (you don't need nfs1/tce because tce is the default anyway). TC should automatically create a tce directory under the nfs1 root directory and then find it on subsequent boots.

That about exhausts my knowledge of how tce works.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can't find tce directory during PXE boot
« Reply #4 on: November 19, 2009, 07:08:12 PM »
I can boot TC 2.5 using tftp32 from a windows box, but it will not load the apps from tce. Here is a copy of my /pxelinux.cfg/defaul file.
display boot.msg
default tinycore
label tinycore
kernel bzImage
append initrd=tinycore.gz quiet nfsmount=172.17.1.30:/tce tftplist=172.17.1.30:/TinyLinux/boot/tcz.lst tce=nfs/tce waitdhcp=10 max_loop=255

I am very new to linux as a whole so any help is appreciated. Keep in mind my basic understating of how Linux when respond.

nfsmount defines the directory to mount at /mnt/nfs.
tce=nfs is the correct but unnecessary option.
This wiki article is very specific with examples.
http://wiki.tinycorelinux.com/tiki-index.php?page=Netbooting

Offline dpatten

  • Newbie
  • *
  • Posts: 9
Re: Can't find tce directory during PXE boot
« Reply #5 on: November 23, 2009, 12:07:27 PM »
Ok, thanks all the responses I have revived. Here is what I have so far. I can PXE boot into TC on my host machine. The TFTP server picks up the request for the tcz.lst file and sends it. But, I get an error sent back to the TFTP server showing that the TC system is closing the connection and I dont get me apps loaded. Here is the error. I have searched and searched on this error and can not find an answer to resolve it.

Connection received from 192.168.47.122 on port 42815 [23/11 10:27:43.511]
Read request for file </boot/tcz.lst>. Mode octet [23/11 10:27:43.526]
Using local port 3464 [23/11 10:27:43.526]
Warning : received duplicated request from 192.168.47.122:42815 [23/11 10:27:43.573]
<boot\tcz.lst>: sent 1 blk, 23 bytes in 0 s. 0 blk resent [23/11 10:27:43.573]
Connection received from 192.168.47.122 on port 42815 [23/11 10:27:43.823]
Read request for file </boot/tcz.lst>. Mode octet [23/11 10:27:43.823]
Using local port 3465 [23/11 10:27:43.823]
File <boot\tcz.lst> : error 10054 in system call recv An existing connection was forcibly closed by the remote host. [23/11 10:27:43.870]

If anyone know what I am doing wrong please respond.

Thanks.
David Patten

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can't find tce directory during PXE boot
« Reply #6 on: November 23, 2009, 01:18:06 PM »
Looks like a Windows tftp server configuration problem.
The file must be requested relative to the tftp root location.

Offline dpatten

  • Newbie
  • *
  • Posts: 9
Re: Can't find tce directory during PXE boot
« Reply #7 on: December 01, 2009, 01:48:53 PM »
Well I have abandoned my attempt to mount the tce file via nfsmount. I could not get it to work for some reason.
I have gone with remastering the tinycore.gz file instead. The remaster went fine, all apps are there and function. The last part I need to do is get x11vnc to autostart. I have tried putting it in /opt/bootlocal.sh but that dose not work. After more reading on the issue I belive I need to put a statement in /home/tc/.xsession. But, being new to Linux I am not sure how and where to right the statement. Any help with this work be apprenticed.

Offline mazzer

  • Newbie
  • *
  • Posts: 1
Re: Can't find tce directory during PXE boot
« Reply #8 on: December 04, 2009, 10:47:24 AM »
Hi dpatten,

I'm a complete newbie. Will you be kind enough to give me some directions on how to remaster tinycore with the apps I need. I just need firefox. the file is firefox.tcz but it loads a whole lot other dependencies too. What I need is all this to be loaded automatically during/after boot so the user doesn't have to manually do it everytime.

Cheers.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Can't find tce directory during PXE boot
« Reply #9 on: December 04, 2009, 12:01:00 PM »
dpatten, see /etc/skel/.xsession
The only barriers that can stop you are the ones you create yourself.

Offline dpatten

  • Newbie
  • *
  • Posts: 9
Re: Can't find tce directory during PXE boot
« Reply #10 on: December 04, 2009, 12:12:40 PM »
Hello mazzer,
I would be happy to help. I just finished up the last little issue I was having and my remaster version is working perfect.

I will be posting my instaructions in next couple of hours, but I wanted to let you know that I did this with the idea in mind that I would be PXE boot in this version witch I had to remaster the tinycore.gz. If you are booting from a hard drive or a usb drive it is alot easier to just setup a persistent install instead. The install instructions on the tinycore web page covers this step by step and work well. Let me know when type of install you are doing.

David Patten

Offline dpatten

  • Newbie
  • *
  • Posts: 9
Re: Can't find tce directory during PXE boot
« Reply #11 on: December 04, 2009, 12:17:19 PM »
thanks for the input curaga, editing /etc/skel/.xsession did work for me. I am not sure why. I ended up adding this line to /opt/bootlocal.sh

!/bin/sh
/tmp/tcloop/x11vnc-0.9.6/usr/local/bin/x11vnc -forever

and now when ever I boot via PXE, x11vnc start automatically and I am able to remote control the PC.

Offline dpatten

  • Newbie
  • *
  • Posts: 9
Re: Can't find tce directory during PXE boot
« Reply #12 on: December 04, 2009, 01:02:44 PM »
How I re-mastered tinycore.gz with extra apps added.
The instructions for re-mastering that I followed are here

http://forum.tinycorelinux.net/index.php?topic=677.0

I did have to make some changes for my own needs as well as fill in some of the blanks. I want to give prop to danielibarnes for the original work he did on the instructions and or course the remaster script it’s self. You will need to go to the post listed in the link above to download the script “remaster.tar.bz2”

NOTE: You must be logged in as a user to see the file, if you logged in as guest if is not there.

I started off by installing TC 2.5 on to a PC and using it to remaster and install the extra apps. It was just easy that way for me. If you need instructions for installing TC on to your hard drive they’re at http://www.tinycorelinux.com/install.html . After you install TC on your PC follow these steps.
1.   Install the following
         advcomp.tcz
         bash.tcz
         compiletc.tcz
         coreutils.tcz
         mkiosfs-tools.tcz
         perl_xml_parser.tcz
         perl_xml_simple.tcz
         a.   I also install xfe.tcz and xfw.tcz. Xfe is a GUI file manager and xfw is text editor.

2.   Since I am using TC 2.5 I used the following files in my src/ directory.
        2.6.29.1-tinycore.patch.gz
        config-2.6.29.1-tinycore
        linux-2.6.29.1-patched.tar.bz2
        tinycore_2.5.iso

3.   After installing the apps in step 1 and downloading the files in step 2, you will need to create the proper directory structure on your tinycore PC. You can use xfe to do this instead of the CLI.

In /home create new a directory (I named mine ‘tcr’) and copy remaster.sh to the new directory ensure it is set to be executable. This can also be done in xfe, right click on the file and click on properties. Here is the structure I created,

/home/tcr – I put remaster.sh here and crated two subdirectories called /src and /newtz

In /home/tcr/src I copied the 4 files from step 2.

In /home/tcr/newtz I created /rootfs/opt/tce

In /home/tcr/newtz/rootfs/opt/tce you will need to copy your extensions here.
  The best way I found to get the extensions and its dependencies’ was to use the Appbrowser.
  But, instead of installing the apps, you select ‘Download only’. The will place you apps and all
  needed dependencies’ in /mnt/sda1/tce/optional. I simply copy everything from the /optional directory to /home/tcr/newtz/rootfs/opt/tce.

In /home/tcr/newtz/opt you can put other files. I put a copy of bootlocal.sh, you can edit this file to autostart apps upon boot. If you are not autostarting anything it can be left out.

4.   Now that all of that is done you can create you new tinycore.gz. In a root shell, type ‘/home/tcr/remaster.sh newtz 2.5' the process take about 10 minuets depending on your PC. Once it is done you will have a new directory in /home/tcr/newtz called /out. In here you will find the new ISO file you created and a directory called /files. In /files you will find the files, bzImage, tinycore.gz and syslinux.cfg that the custom iso where made from. From here you can burn the iso file however you want. I just copied the bzImage and tinycore.gz and put them on my PXE tftp server.

If I make any errors in the document please let me know and I will update it.

David Patten

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Can't find tce directory during PXE boot
« Reply #13 on: December 04, 2009, 04:18:37 PM »
Thanks for the props. I have greatly improved my script since that post, so I will make another post soon. You are going to find this funny, but you don't need to remaster at all to add extensions. pxelinux (version 3.71 and later) allows you to specify more than one cpio archive.

First, create a simple cpio archive like so:
mkdir -p /tmp/newtz/opt/tce
(copy extensions into /tmp/newtz/opt/tce)
cd /tmp/newtz/
find|cpio -o -H newc|gzip -9 > /tmp/newtz.gz

The file in your pxelinux.cfg directory looks similar to this:
DEFAULT tinycore
TIMEOUT 300

LABEL tinycore
KERNEL bzImage
APPEND quiet initrd=tinycore.gz

Put the newtz.gz file in the same directory as tinycore.gz on your tftp server and change that last line from
APPEND quiet initrd=tinycore.gz
to
APPEND quiet initrd=tinycore.gz,newtz.gz

I tested this with my PXE/TFTP system and it works great.

EDIT: As suggested by helander based on syslinux documentation.
« Last Edit: December 04, 2009, 08:01:56 PM by danielibarnes »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can't find tce directory during PXE boot
« Reply #14 on: December 04, 2009, 04:46:18 PM »
Outstanding, Daniel.
I tried this using nfs-utils.tgz in the cpio archive instead of using the tftplist= option.
This worked and the rest of my modules loaded using the nfsmount= option.