Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: gmc on April 03, 2013, 02:14:40 AM
-
Greetings again.
Now that tc-terminal-server is up and running I have run into a new problem. I am trying to set up a boot menu that allows the user to select from multiple boot options. I have three choices at the moment, each of which works if I put the label name on the first line of the 'default' file. But when I try to set it up with 'menu.c32' in place of a label name PXE boot stops with the message:
Trying to load: pxelinux.cfg/default
My 'default' file contents are as follows:
default menu.c32
prompt 0
menu title PXE Boot Menu
label bootlocal
menu label ^Boot Local Drive
menu default
localboot 0
timeout 80
TOTALTIMEOUT 900
label seatools
menu label ^Sea Tools HD Test Program
kernel memdisk
append initrd=seatools.img floppy
LABEL core
MENU LABEL ^Tiny Core Linux (base only)
KERNEL vmlinuz
APPEND quiet 786 initrd=core.gz
If I replace 'menu.c32' with 'core', 'seatools' or 'bootlocal', save the change and reboot the client, the selected name will function properly, the client will boot with that selection. But 'menu.c32' or 'vesamenu.c32' will stop the system from booting.
I have searched the wiki, forum and the Web at large, trying many things, but nothing I have tried fixes the problem.
For whatever clue it may offer, if I put in something that is not recognized by pxelinux it tells me that it does not recognize the syntax. That leads me to believe that the frile is being read and parsed.
Oh, this basic menu structure works fine on my Debian Squeeze server which leads me to belive that it may be something related to how TC sets up things with terminal server. Just a thought...
I am using the syslinux package from the TC apps installer.
Any ideas? I'm stumped...
-
Hi gmc
Don't you need to set prompt to 1?
-
Sorry if this is being too obvious, but does the c32 file you try to load exist in the right place? The extra files of syslinux/pxelinux are not included by default, so you'd need to manually copy what's needed to /netboot.
edit: I tried it, the menu.c32 included in syslinux.tcz causes KVM to freak out. So possibly something in menu.c32, perhaps try the menu.c32 binary from Debian?
-
Thanks Rich for the prompt suggestion (pun intended) but that's not it. Appreciate you taking the time to answer.
Curaga - Never hesitate to state the obvious - sometimes it is the best answer! But in this case I believe I have it in the correct location, especially since the file is being parsed (as indicated by the fact that improper syntax is flagged in an error message if I deliverately include "garbage" text for a test).
I have tried using the menu.c32 (and vesamenu.c32 as well) from the Debian setup. No change. I am encouraged by the fact that you are able to reproduce the problem at your end. That tells me that an answer will be forthcoming! Thanks for the assistance.
-
Don't mix files from different versions of syslinux.
-
Excellent point. I had the impression that they had some ABI stability, but seems not.
@gmc
Using pxelinux.0 and menu.c32 from the same syslinux source works.
-
Excellent point. I had the impression that they had some ABI stability, but seems not.
@gmc
Using pxelinux.0 and menu.c32 from the same syslinux source works.
exactly. it works for me also. be aware about source for menu.c32
from boot/isolinux:
-r--r--r-- 1 tc staff 61440 Jan 19 21:28 menu.c32
from usr/local/share/syslinux
-rw-r--r-- 1 tc staff 56036 Apr 21 2012 menu.c32
http://www.syslinux.org/wiki/index.php/Common_Problems
"Modules, especially COM32 modules (.c32 files), should ideally come from the same package as the core binaries (isolinux.bin, ldlinux.sys, pxelinux.0...) that you're using. Syslinux v4+ is strictly incompatible with older COM32 modules"
"When updating the Syslinux core binaries, it is highly advised that you also update all modules at the same time"
"Incorrect syntax in configuration files is another common error. If you aren't getting the menu or results you expect double check the syntax in your configuration file(s) is correct"
==
for example, my PXE from qmenu is like this qPXE-TC64.sh:
# Qemu TFTP (10.0.2.2) with root at tftp=./
export QEMU_AUDIO_DRV=oss
sudo modprobe -v kvm-intel
qemu-system-x86_64 -enable-kvm -machine q35 -m 256M -smp 2 -cpu core2duo\
-vga vmware -soundhw hda -usbdevice mouse -serial none -parallel none\
-net nic,vlan=0,model=virtio -net user,vlan=0,tftp=./,bootfile=./pxelinux.0\
-drive file=disk-dummy-1G.qcow,if=virtio,media=disk\
and the ./pxelinux.cfg/01-52-54-00-12-34-56 is ("default" renamed as "01-52-54-00-12-34-56", for speed)
DEFAULT TC64
UI menu.c32
PROMPT 0
TIMEOUT 50
MENU TITLE Qemu Master menu
LABEL TC64
MENU LABEL TinyCore64 PXE
TEXT HELP
Starts TC64
ENDTEXT
LINUX tc-boot/myvmlinuz64
INITRD tc-boot/mycore64.gz
INITRD tc-boot/myX64.gz
APPEND tftplist=10.0.2.2:/tce/onboot.lst blacklist=pcspkr
MENU SEPARATOR
LABEL com32_hdt
MENU LABEL HDT(com32) Menu mode
TEXT HELP
Starts hdt.c32 using the MENU mode
ENDTEXT
COM32 hdt.c32
APPEND modules_alias=ids/modules.alias.gz pciids=ids/pci.ids.gz
-
Yes, I wrote those after seeing numerous issues. It's more critical with COMBOOTs when they don't handle the return that the API call doesn't exist, either out of deprecation or using a new COMBOOT on an old Syslinux core binary.
For the most part, a COM32 that doesn't use the COMBOOT APIs should work within its major version (EDIT: but there are no guarantees). v4.xx and v5.xx changed a LOT.
-
Thanks everyone for jumping in on this issue. I'm not sure exactly where I stand. I understand about not mixing versions, but not sure where that leaves me. I installed syslinux from the apps installer. Is that a different version than what TC core is working with? If so, what do I need to do to fix it? Thanks again.
-
Is that a different version than what TC core is working with? If so, what do I need to do to fix it? Thanks again.
Yes, the ISO was built with "4.02 debian-20101024" while the extension contains 4.05. I presume you're trying to use menu.c32 from the extension?
EDIT: Personally, I prefer to use the precompiled binaries.
-
genc, you are correct, I am tryhing to use the 4.05 extension version. I am something of a newbie to the Linux world so am not as proficient here as I would like. Would you have a suggestion as to the simplest method for resolving this problem?
-
Any chance you could try the official precompiled binaries for 4.05 from kernel.org? This is one of the reasons Syslinux is distributed as a binary and source archive. From the archive, you should only need pxelinux.0, menu.c32 and any other modules you're using.
-
In addition to copying menu.c32 to /netboot, also copy pxelinux.0 (overwriting the version that was there). No need to restart tc-terminal-server.
-
OK - I downloaded the 4.05 binaries directly from the syslinux kernal.org site, extracted and copied menu.c32 and pxelinux.0 to /netboot. Client boot still freezes at the same message:
Trying to load: pxelinux.cfg/default
Hmmm.... Stumped.
-
Hi all,
I have done some more testing to see if I could find out anything that might prove useful to anyone that may have insight into this problem.
First I tried doing a clean boot from CD on a machine that had never been used with TCL before. This was identical hardware but untouched by TCL. I used the TCL 4.7.5 iso. I modified the tc-terminal-server script to fix the boot_file name problem so that my pxe clients would boot. I verified that the pxe client booteed into TC from the TC pxe server. I next copied menu.c32 into /netboot and changed the default file from "DEFAULT core" to "DEFAULT menu.c32". When I rebooted the pxe client it froze at the same error message (..trying to load default...).
I next added one more change to default: PROMPT 0. Client still froze at same error message. Just to see what would happen, I changed default to: PROMPT 1 and rebooted the client. This gave a
boot:
prompt on the client. If I pressed enter the client froze. On the next boot I tried typing "core" and Enter and got a successful boot into TC.
Just in case I was missing something critical I tried copying a functional default file with a working menu from another machine. It froze at the same error message as the bare-bones default file did.
As a side note, it may be of interest that the timeout does not appear to do anything when menu.c32 is used.
For further testing I tried making the basic menu change (DEFAULT menu.c32) on previous versions of TCL going back as far as version 3.6, all versions tested had the same results. One thing I can say about this problem is that it is consistent. Sigh…
Just curios, what version of TCL first had tc-terminal-server included?
Does anyone have menu.c32 or vesamenu.c32 working with the terminal server setup? I would very much like to see the contents of a working default file.
Thanks in advance for any help offered.
-
Hmmm..
Maybe I misunderstood, but I thought pxelinux.0 was a replacement for menu.c32 used in pxe environment..?
So you have to use both??
-
Hi coreplayer2. pxelinux.0 is the program code that is first sent to the pxe client from the tftp server upon successful connection. menu.c32 is not necded unless you want to have a selection menu. For an example look at the /netboot/pxelinux.cfg/default file created by the tc-terminal-server script; it doesn't use menu.c32 because it isn't needed - there is only one thing to be done, and it does it very well.
All of the above is based on what I have learned in the past few weeks so allow room for "systax errors" in my explanation. I'm sure there are plenty of others that can clarify/correct any such errors and we can all learn from them.
-
The pxelinux.0 and menu.c32 MUST come from the same extension/version.
-
Hi all,
I have done some more testing to see if I could find out anything that might prove useful to anyone that may have insight into this problem.
First I tried doing a clean boot from CD on a machine that had never been used with TCL before. This was identical hardware but untouched by TCL. I used the TCL 4.7.5 iso. I modified the tc-terminal-server script to fix the boot_file name problem so that my pxe clients would boot. I verified that the pxe client booteed into TC from the TC pxe server. I next copied menu.c32 into /netboot and changed the default file from "DEFAULT core" to "DEFAULT menu.c32". When I rebooted the pxe client it froze at the same error message (..trying to load default...).
I next added one more change to default: PROMPT 0. Client still froze at same error message. Just to see what would happen, I changed default to: PROMPT 1 and rebooted the client.
gmc, may I repeat myseft without annoy you?
from http://www.syslinux.org/wiki/index.php/SYSLINUX
" UI module options...
Selects a specific user interface module (typically menu.c32 or vesamenu.c32). The command-line interface treats this as a directive that overrides the DEFAULT and PROMPT directives."
please, try like I have suggested:
DEFAULT Some_label_menu
UI menu.c32
so, do not write default= menu.c32, instead use default=Some_label_menu, then use the directive UI=menu.c32;
good luck!
-
nick65go - never hesitate to tell me again - I missed it the first time. I did see your previous post but due to my low vision (I'm legally blind) I missed the critical lines, they blended into the forest, so to speak. I can not tell you how much I appreciate you taking the time to repeat the information in a manner that made it so clear to me. You were correct - that was the problem!
Oh, and I did read the wiki post (again - I had been there before) but again, too much information that did not apply made it hard to find the nugget I needed. I had tried the UI statement but must have gotten it wrong somehow. I am so very happy now that it is working!
Thanks to you and to all who helped!
-
Just as a reminder: the directives TIMEOUT and TOTALTIMEOUT are global directives (as opposed to label-specific directives). For clarity, I generally recommend putting them at the top, rather than as you have it in the first config (indented without a separating line under a LABEL).
-
Thanks, genec, I was wondering about that. Good info on the global aspect of those items.
-
Sigh...
I'm back. Sorry to say, but my problem is not resolved. using the UI directive did not fix the menu.c32 lockup problem, it bypassed it! That is to say, "UI menu.c32" is never executed. The first line "DEFAULT menu_label" is executed immediately and menu.c32 is not called, thus, no lockup.
Back to square two...
-
@gmc
I appreciate your wiling to solve this problem. But when I have a issue with TC (and in general in life, also) I try to "debug" it back to its roots.
When I have less knowledge about it, I first use logic, then sometime brute force. (I am talking about me, no offense intended)
So, you should split the problem in pieces. Are the syslinux binaries or /pxelinux.0/default the culpit? Very important!
I advise you to type the commands yourself MANUALLY in a terminal (aterm), and not to use the scripts provide in TC, so you can see EACH error/warning message yourself.
If you skip these steps then you have less tracking to pinpoint your modifications. the good changes in one part will be banned by bad changes/over-written in other parts.
If you are sure that you use the right binaries (from the same package) in the right final folder, then you can PXE boot the client (you confirmed). Then the PXE configuration file IS the problem.
You can prepare very simple PXE configurations with any text editor. Make many, it is easy and fast to make one, and modify its copy. All done in a private folder. Then try one by one each configure you created, by coping it to the right folder (/netboot/pxelinux.0/). Then plug the PC client to load your new config from tftpd server.
If your graphic menu starts but quickly choose the default menu, then I suspect it is a *TIME* directive wrong settings in the config.
Come on, there are not so many combinations you can choose from, just use the maximum time(out) for all, play on safe side.
thanks for your feedback. good luck!
-
Thanks, genec, I was wondering about that. Good info on the global aspect of those items.
In newer versions, you'll see a txt/ directory in the binary/source archive or git tree. The context of a directive is one of the key concepts I used for regrouping directives.
-
Here's something that may help. Note that directives are only capitalized to help them stand out (in the lack of colorized highlighting). Indentation is also done for clarity. Neither capitalization nor indentation are required.
DEFAULT bootlocal
# Use UI menu.c32 for final
# UI menu.c32
# Use PROMPT 0 for final
PROMPT 1
TIMEOUT 80
TOTALTIMEOUT 900
MENU TITLE PXE Boot Menu
LABEL bootlocal
MENU LABEL ^Boot Local Drive
MENU DEFAULT
LOCALBOOT 0
LABEL seatools
MENU LABEL ^Sea Tools HD Test Program
KERNEL memdisk
APPEND initrd=seatools.img floppy
LABEL core
MENU LABEL ^Tiny Core Linux (base only)
KERNEL vmlinuz
APPEND quiet 786 initrd=core.gz
# this can help tab completion suggestions
LABEL menu
MENU HIDE
COM32 menu.c32
# an example for alternate label
LABEL ui
MENU HIDE
COM32 menu.c32
I do commend the use of simple LABELs. I generally try to fit it to all lowercase, numbers, underscore and occasionally periods and/or hyphens out of habit (and easy typing). Older versions required it to fit the format of an 8.3 filename and the allowable character set for a strict ISO is [a-z0-9_.] and limit 1 period.
-
Thaks, genec and nick65go, it really helps when someone throws out ideas, I don't feel so alone and frustrated. You have given me good tips and directions. Thanks.
I have used very simple menus for testing, cutting them down to the bare essentials, even copying one from a working pxe server. If it worked there it ought to work on TC. One thing I don't know for sure has to do with package versions. I can't figure out how to check package version numbers in TC. I thought TC was in the Debian family but dpkg isn't available.
Along the same line of thought, I wonder if menu.c32 in the isolinux directory on the iso image is the same version as syslinux in the 4.7.5 core? How would I check version info on individual files? I've searched the Web but have not found anything so far that works.
Well, back to the battle...
-
OK - here is what I have done today.
Reviewed syslinux menu directives/syntax (wiki).
Clean boot TCL 4.7.5.
Run tc-terminal-server.
Copy menu.c32 from syslinux-4.02.tar.gz (direct download from syslinux site) to /netboot (based on my understanding that TCL 4.7.5 is using syslinux version 4.02).
Boot PXE client using the default /netboot/pxelinux.cfg/default file as created by tc-terminal-server (to verify that everything is working).
PXE client boots into TC CLI mode (the default setup as created by tc-termianl-server does not create a boot menu). So far so good.
Edit /netboot/pxelinux.cfg/default. Added to the tc-terminal-server default file the following:
DEFAULT menu.c32 (I chose not to use the UI directive because it is not required and does not fix the problem I am having - just muddies the waters so to speak).
PROMPT 0 (prompt 1 just drops to the command line with the 'boot:' prompt).
I have tried with and without menu labels (as I read it, they are optional).
What happens: PXE client hangs at the point where the system is trying to read the 'default' file, no menu is displayed.
If PROMPT is set to 1 then no menu is displayed and client drops to CLI with a "boot:" prompt. At that point I can type 'core' and Enter and boot into TCL CLI.
At this point I can't think of what to try next. The very basic menu I am using in 'default' works on my Debian Squeeze server, it seems it should work on TCL.
Does anyone have any more ideas on what I can try?
Thanks much to all who have helped thus far.
-
Please change this step:
Copy menu.c32 from syslinux-4.02.tar.gz
to also copy pxelinux.0.
-
I thought TC was in the Debian family but dpkg isn't available.
Unfounded, Core is fully independent.
Along the same line of thought, I wonder if menu.c32 in the isolinux directory on the iso image is the same version as syslinux in the 4.7.5 core? How would I check version info on individual files? I've searched the Web but have not found anything so far that works.
e.g.:
tc@box:~$ grep PXELINUX /usr/share/syslinux/pxelinux.0
PXELINUX 3.61 2008-02-03
tc@box:~$
-
curaga, tinypoodle - Thanks!
-
I have a special request. Would someone be willing to try creating a PXE boot menu using a clean boot of TCL? I know it is a lot to ask but I am stumped and don't know what I might be missing here...
Thanks in advance.
-
By the way, using UI should override PROMPT.
Did you try to launch menu from the boot prompt?
-
Hi genec,
I did try, but can't remember the details. Will try again and let you know.
-
Also try something like this at the end of the file (the sequence is read entire config file, parse, then execute DEFAULT/UI or proceed to CLI; SAY is executed during the parse):
SAY End of config file
-
genec - I love it!! I put the SAY directive at the end of the 'default' file and set PROMPT to 1. The entire file was parsed with no errors and the SAY directive printed out the message "end of config file". At the "boot:" prompt I typed: menu.c32 and pressed Enter. Immediate freeze.
However, when I put the UI directive in the 'default' file I get an unknown keyword message at PXE client boot, just before the menu.c32 freeze (or before the 'boot:' prompt, depending on the PROMPT mode. So it appears that UI is not recognized? Is UI valid in version 4.02?
-
UI was introduced in 3.74. As far as the bad keyword, I'm not sure what it would be (assuming you put your entire config in the first message). What's the exact text?
menu.c32 appears to be your issue (or at least triggers it). Any chance you could try pxelinux.0 and menu.c32 from the precompiled archive of 4.05 or 4.06?
I can probably try out TC as a boot system to see if I can see it in my VMs (on a VMware hosted platform).
-
gene - you are closer to the truth than you know! I did try the precompiled archives of 4.02 and 4.05. But before I tried 4.0 I thought it would be wise to try the "grep PXELINUX /usr/share/syslinux/pxelinux.0" method (thanks tinypoodle) to get the actual syslinux version. I found that syslinux in TC 4.7.5 is at version 3.61!
Once I knew that little detail it was not too hard to figure out what to do next! I downloaded the 3.61 binaries from syslinux (thanks for your tip), extracted and copied menu.c32 and pxelinux.0 to /netboot (after running tc-terminal-server) and tried a PXE client boot with a modified 'default' menu. Need I say that it worked? Well, just in case there is any doubt, IT WORKS! I have a functional menu! This has been a battle but it feels good, very good, to have it working.
Thanks to each and every one of you for the help you have given.
-
But before I tried 4.0 I thought it would be wise to try the "grep PXELINUX /usr/share/syslinux/pxelinux.0" method (thanks tinypoodle) to get the actual syslinux version. I found that syslinux in TC 4.7.5 is at version 3.61!
If my fading memory serves me right - several years have passed - it may actually have been genec giving me the pointer to check such.
-
I found that syslinux in TC 4.7.5 is at version 3.61!
Typical behavior of a COM32R in a COM32 environment. Must be a few extensions with Syslinux component.
-
What TC version are you using?
EDIT: I see it in 4.7.5 core.gz
-
Greetings!
Imagine my surprise and pleasure as I was browsing the Web and found a reference to the latest TC release (4.7.6) and noted that one of the items changed was the PXE boot file name fix! How cool is that! Made my day.
I immediately downloaded the latest, greatest ISO, created a CD and booted. Imagine my surprise and disappointment when I found that the same old problem exists! tc-terminal-server script still has 'option bootfile /pxelinux.0...' Nothing has changed. Sigh...
Well, it was nice to know that it was supposed to have been fixed. Maybe next time...
-
The new line was added, but removing the old line didn't seem to be necessary. boot_file is there in 4.7.6.
Does the presence of both lines cause issues on your client?
-
Hi, I did not see the added line, just noted that the old one was as before.
Clients still won't boot until old line is changed.
Thanks for letting meknow what's going on. I'll go look at tc-terminal-server script again...
-
Oh, here having them both didn't cause issues. Will remove the old line then.
-
Thanks!
For what it is worth, I would be glad to be a test subject for any changes you make before the next release. Too bad I can't send you one of my "fussy" PXE clients for testing.
-
Sure, you can apply this patch on top of the latest release: http://patches.tinycorelinux.net/uploaded/0001_Remove_option_bootfile.patch
-
I've created a bug report here (http://forum.tinycorelinux.net/index.php/topic,15209.msg87754.html#msg87754) regarding a part of the issues in this thread.
-
Hi curaga - Thanks for the patch. I would be glad to try it but I am afraid I am something of a newbie to the linux world and have never had to apply a patch. I have searched the forum and googled but have not found the information I need in order to apply said patch. If the answer isn't too involved for this venu would you (or anyone else that has time and interest) point me in the right direction to do this? I have patched CP/M and related programs (in hexadecimal) running on S100 bus systems dating back to the days of the pioneers so I am not completely new to computers, just to linux.
-
Hi gmc
Though I've never used it myself, but there is a patch program available used to apply patches. This one looks pretty
straight forward, find:
option lease 864000 # 10 days of seconds
option tftp $MYIP
siaddr $MYIP
option bootfile /pxelinux.0" > /netboot/udhcpd.confin the tc-terminal-server script. Replace:
option bootfile /pxelinux.0" > /netboot/udhcpd.confwith:
" > /netboot/udhcpd.conf
-
Running 4.7.6, with the patch downloaded to /tmp:
cd /
sudo patch -Np1 -i /tmp/0001_Remove_option_bootfile.patch
-
curaga - the patch worked fine. Thanks for the how-to, and the patch. I'll be watching for 4.7.7...