Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: gmc on June 03, 2013, 09:27:46 PM
-
Greetings,
I would like to know how hard it would be to upgrade syslinux in TC 4.7.7? If it is not too difficult, how is it done? I have been searching the forum for answers but so far have not found what I need.
Thanks,
Glen
-
Info for upgrading syslinux.tcz should be found in the info file in Apps for syslinux.tcz
-
Sorry, I'm not quite following you. Is Apps a directory or so you mean the Apps Browser?
Thanks
-
Hi gmc
The info tab in AppBrowser will show you where the source code for building syslinux came from.
-
Ah! That helps. Thanks - I'm off to do some reading (I reckon I'll be back, though...).
-
Using binaries from upstream (stable) works for me.
-
Using binaries from upstream (stable) works for me.
Say waht?
(Translation: I don't have a clue to what you mean!)
Sorry, it looks like I'm going to be a linux newbie for a long, long time.
-
Hi gmc
The info tab in AppBrowser will show you where the source code for building syslinux came from.
Yep - I'm back!
I carefully followed the steps in the info comments. Everything appeared to work properly. I rebooted and now get the syslinux 4.05 header on boot. But the next line says:
Could not find kernel image: menu.c32
boot:
So, any idea how I messed up?
-
Sorry, yes Apps Browser
-
http://www.syslinux.org/wiki/index.php/Common_Problems#Official_Binaries
-
http://www.syslinux.org/wiki/index.php/Common_Problems#Official_Binaries
Sounds good to me. How do you go about installing one of these?
-
I never did anything else than just untar.
-
I never did anything else than just untar.
That's too easy!
By the way, did you see my post about what happened when I followed the upgrade steps in the Apps Info page? It failed. Can't find kernel: menu.c32.
-
i suggest you read upstream documentation (syslinux wiki) about using modules.
-
Could not find kernel image: menu.c32
Simple: you reference menu.c32 (hopefully in a UI directive or under a LABEL clause in either a COM32 or KERNEL directive and hopefully not the DEFAULT directive) and it's not in the same directory as your config.
See also http://www.syslinux.org/wiki/index.php/Common_Problems#Modules
Official docs in syslinux.tar:doc/ with a refactored AsciiDoc-format of doc/syslinux.txt in syslinux.tar:txt/ (in newer versions).
-
Could not find kernel image: menu.c32
Simple:...
Simple?! No! It is not simple!
I started working on computers before CP/M (the predecessor to MSDOS) was popular. I was patching programs in hexidecimal, booting from hard drives on machines that didn't even know how to find a boot sector, programming in octal, writing commercially viable programs in assembly language (I taught myself assembly programing by reading!), and on and on, way before linux was born. I have taught computer science on the high school and college level. I worked as a computer support/network specialist for many years. I'm not a computer novice but linux leaves me feeling like a rank newbie.
I have read and reread the syslinux docs. The more I read the more confused I get. It all seems to make sense, to a point, but I never quite feel like I can grasp the whole picture. Something is always missing in the documentation.
There seems to be so much that is assumed by the writers of said docs, as if I am supposed to have this vast knowlege base and broad experience, so that I just somehow "know" unwritten rules and arcane secrets.
I just need some basic, simple instructions that don't involve hours and hours of reading confusing documents that contain pages and pages of information that I don't need for the immediate task. Believe it or not, I actually read manuals! I like to know the details. I like to understand how things work. But I like to read manuals that spell things out clearly and simply so that normal mortals can understand them.
@genec
Please don't take this as a personal attack on you. It isn't. I know that you are just one of those highly intelligent linux gurus. Your heart is in the right place and your comments are full of good stuff - but I am just not at your level (and probably never will be!).
I just need someone to offer simple, step-by-step help with something that should be relatively easy.
I asked how to upgreade syslinux and was told to follow the steps in the Apps Info tab. (I should have seen that info but will have to admit that my severly limited vision makes it hard to read the fine print.) I followed those steps. They didn't work. I blieve I did the steps exactly as they were presented. Shouldn't they be correct? If not, couldn't someone please tell me in plain English what's wrong and how to fix it? If they are correct then maybe I just need to go through the process again until I get it right.
Better yet, how do I install syslinux 5.01? I tried following the syslinux docs but can't seem to find the secret potion there, either.
I am so tired of feeling dumb, ignorant and slow of comprehension. Won't someone please take pity on this poor mortal and share just a little of their knowledge and experience?
Oh, and there isn't enough room on the internal flash drive to unpack syslinux-5.01, so I have to use an external USB drive. That is giving me problems using tar, with all kinds of permissions problems, even though the target directory has the same permissions and owner settings as on the internal drive. I even went so far as to download the .zip version on Windows and unzip it to the USB flash drive. Still can't get it to work according to the syslinux docs. Sigh...
Thanks for taking the time to read this and for understanding my frustrations.
/end of diatribe
I'll probably regret posting this when I wake up. I pray no one takes offense.
-
OK. I just went and tried the syslinux 4.05 upgrade again. This time I looked at the Apps Info instructions a bit more and decided that they wre not correct for my needs. I guessed, correctly, that I did not need to create a new directory, (I used /mnt/sda1/tce/boot/extlinux). I did not need to use the -i (install) argument but instead needed to use the -U, (upgrade) argument. I did not need to copy the CD ISO config file and rename it. I simply used the existing extlinux config file.
End result? It worked. I now boot with extlinux 4.05.
I would still like to know how to upgrade to syslinux 5.01 but for now I am able to take advantage of some of the features of version 4.
Have a great day!
Glen
-
I would still like to know how to upgrade to syslinux 5.01 but for now I am able to take advantage of some of the features of version 4.
Like any other Syslinux upgrade:
- Install the new core binary in place of the old one; for you, "extlinux -u /mount/path/to/current/" specifying the directory where ldlinux.sys lives.
- Copy in the new .c32 modules; presumably, this would be to the same path but depends on the config.
- Copy other utilities like MEMDISK as appropriate
Anything else would depend on where files are on your disk and the contents of your config file.
-
I would still like to know how to upgrade to syslinux 5.01 but for now I am able to take advantage of some of the features of version 4.
Like any other Syslinux upgrade:
- Install the new core binary in place of the old one; for you, "extlinux -u /mount/path/to/current/" specifying the directory where ldlinux.sys lives.
- Copy in the new .c32 modules; presumably, this would be to the same path but depends on the config.
- Copy other utilities like MEMDISK as appropriate
Anything else would depend on where files are on your disk and the contents of your config file.
Thanks genec,
I appreciate the help. I gathered from what tinypoodle wrote and from what I read on the syslinux docs pages that it should work that way but was having some trouble with the first part. I could download and extract to a USB drive and see the extlinux file, but it would not execute. The system said the file did not exist.
My work-around was to download the .zip version of syslinux and use emelfm to find the file. emelfm will automatically extract a .zip file into a temporary ram based location and I was then able to run extlinux. Crude, but it worked.
I am now booting extlinux 5.10 (it just came out June 4th.) and PXE is working (but there are many changes in the way it works).
Thanks for the help and have a great day.
-
*nix hint: to execute something in the current directory, prefix with "./", ie "./extlinux". if not executable, chmod may be needed.
Syslinux-5.xx won't operate much differently except it hunts for ldlinux.c32 and lib*.c32 to resolve a dependency in a COM32-ELF. PXELINUX-5.10 adds lwIP to allow HTTP transfers without gPXE/iPXE.
-
Thanks genec! I had seen the ./ in some prior posts but assumed that it had to do with directory path info or some such. I have so much to learn. That hint will be most useful.
You were right on with the ldlinux and c32 lib stuff. Those were the very things I had to figure out. None of my PXE menu choices would work until I got all those files where they could be found at PXE client boot time. I suppose there is a "proper" place to copy them to but I found that putting them in /netboot worked, so that is where they are for now.
You really got my interest up with that last bit about http! I think I need to read up on that because I want to PXE boot some larger .iso images and I don't need to tell you how slow that is with tftp. Thanks for mentioning it!
Have a great day!
-
TFTP can be quite fast when you configure it to use bigger blocks. The default is 512 bytes IIRC, at 64kb it's quite swift.
-
TFTP can be quite fast when you configure it to use bigger blocks. The default is 512 bytes IIRC, at 64kb it's quite swift.
Most PXE stacks I've seen are limited to ~MTU and won't implement a window larger than 1, topping out around 1-2 MB/s. I've heard the MS TFTP service in some version will do a window of 8. However, I've seen PXELINUX 4.10-pre16 and 5.10 doing 17MB/s and I heard a claim of 70 MB/s, both over HTTP.
-
Ah yes, bios limits. I've been using busybox on both ends, they support 64kb fine.
-
Ah So! Velly Intelesting. I go study now...
Seriously, I had forgotten about the size options. I think I put it aside because I didn't want to add potential boot problems while I was learning and testing. I may still play with those settings once everything is set up and working properly just to see what difference they make in speed. But for now I am seriously looking at http boot for the big stuff.
Thanks for all the input!
Glen
-
I've been trying to find out how to use http for pxe booting. So far all I have found is some allusion to it based on some sample pxe boot configs such as the following from the syslinux wiki:
label linux
menu label Install - ^Classic
kernel Suse/linux92
append initrd=Suse/initrd92 ramdisk_size=65536 vga=0 textmode=1 install=http://IPADDR serverdir=/9.2/install
autoyast=http://IPADDR/9.2/scripts/ay92.xml
label linuxfull
menu label Install - ^Developer
kernel Suse/linux92
append initrd=Suse/initrd92 ramdisk_size=65536 vga=0 textmode=1 install=http://IPADDR serverdir=/9.2/install
autoyast=http://IPADDR/9.2/scripts/develdesktop.xml
The problem is that these samples are presented without explanation or clarification. So far I have not found anything that directly addresses using http for pxe boot with syslinux 5.x, other than these cryptic samples.
I was hoping that someone here might have used pxe boot with http access and be willing to share some pointers, or maybe someone could point me to some links that have the needed information.
Thanks,
Glen
-
HTTP requires gPXE/iPXE or PXELINUX 5.10 (the only official release with lwIP; use lpxelinux.0 instead of pxelinux.0). If booting from the PXE OROM on a card, you need a tftpd for the initial payload. If booting gPXE/iPXE from floppy/HDD/CD or a NIC with gPXE/iPXE as its OROM, you don't need it.
Simplest first step if you already have a working PXE system is to place/link your kernel and initrd such that you can use them over HTTP then use a LABEL like:
LABEL tc-http
LINUX http://10.0.0.2/tftp/boot/vmlinuz
APPEND http://10.0.0.2/tftp/boot/core.gz loglevel=3 cde
On my systems http://localhost/tftp/ is equal to the root directory of the tftpd.
Just an FYI: there has been recent discussion on the Syslinux mailing list about this exact topic. A more advanced method is to set DHCP option 210 (and possibly 209) via the vendor option space (aka encapsulated under option 43; preferred as it won't need a forceful injection) or global option space (which requires that you forcefully return option 210 even though it was not requested).
-
HTTP requires gPXE/iPXE or PXELINUX 5.10 (the only official release with lwIP; use lpxelinux.0 instead of pxelinux.0). If booting from the PXE OROM on a card, [I am] you need a tftpd for the initial payload. [Got it]
Simplest first step if you already have a working PXE system is to place/link your kernel and initrd such that you can use them over HTTP [Done - see below] then use a LABEL like:
LABEL tc-http
LINUX http://10.0.0.2/tftp/boot/vmlinuz
APPEND http://10.0.0.2/tftp/boot/core.gz loglevel=3 cde
On my systems http://localhost/tftp/ is equal to the root directory of the tftpd.
Thanks for all that useful info. I think I am almost there but I need one more piece of information. The http boot fails with no error message.
Here is what I have set up so far.
I have changed from pxelinux.0 to lpxelinux.0 and that is working fine.
I modified the first entry on my default boot menu as indicated, leaving all other entries as they were (they still work).
The first entry now points to
kernel http://192.168.0.7/pxeboot/vmlinuz and append quiet vga=768 initrd= http://192.168.0.7/pxeboot/core.gz.
The pxeboot share is working as I can browse to it with an address of 192.168.0.7/pxeboot (and see vmlinuz and core.gz). The server does ask for a password. Pressing Enter without a password defaults to a guest logon.
I suspect that the pxe boot fails because I don't have a user name or password. I have searched for the proper syntax for including a user name and password but can't find it. Is it possible to pass those values and if so, would you know the proper syntax?
Or do you think there may be something I am missing in my setup?
Thanks,
Glen
-
Did you try without the authentication prompt? Likely without HTTP status code 200, it will only fail. HTTP authentication will likely be a feature request.
-
Did you try without the authentication prompt? Likely without HTTP status code 200, it will only fail. HTTP authentication will likely be a feature request.
Hi - no I didn't try without the authentication request - I don't know how. I can't turn it off on the server - it isn't an option. On ther server, if logon fails it will just revert to a guest logon. I would expect that to work for read only access.
Is there a way to get the pxelinux error message to pause so I can read it?
From your "feature request" statement it sounds like passing the username/password is currently not an option. Would that be a correct assumption?
If not, then I may have to use gpxe/ipxe.
Thanks,
Glen
-
That sounds rather odd (not being able to disable auth). I can't say I've ever heard of such a thing. It'd be EXTREMELY suspicious to see an HTTP 401 on public sites. Most httpds that I've seen are configurable. Consider the HTTP status code definitions. 4xx are client failure errors where a repeated request won't change anything, unless the request is "corrected" or access on the server is changed. Adding/changing authentication information is a "correction" in this context.
Not sure what you're asking about pausing since your httpd returns 401 and PXELINUX's HTTP client likely treats it the same as a 404.
To my knowledge, correct. There is no directive for it. I also doubt that inserting username/password into the URL the standard manner will do anything but return a complete failure. I'll try to see if I can get a quick test set up.
You can easily use gPXE/iPXE to provide HTTP access instead of using lpxelinux.0 and it could do authentication.
-
And inserting the authentication information into the URL is parsed but the username/password isn't used ie http://user:password@192.168.4.1/auth/menu.c32.
-
That sounds rather odd (not being able to disable auth). I can't say I've ever heard of such a thing.
The NSLU2 is rather limited in what it allows the end user to configure. It insists on asking for a user name/password for any access. Failed logongs are supposed to default to the "guest" account.
Not sure what you're asking about pausing since your httpd returns 401 and PXELINUX's HTTP client likely treats it the same as a 404.
At the PXE boot menu, when I select an entry from the menu and press Enter, I need to see the response/error message before PXE returns to the menu (assuming a boot failure occures, which it does when trying an http boot). As it is, I see just the briefest flash of a message and then it is gone and the menu is active again.
To my knowledge, correct. There is no directive for it. I also doubt that inserting username/password into the URL the standard manner will do anything but return a complete failure. I'll try to see if I can get a quick test set up.
I appreciate that.
You can easily use gPXE/iPXE to provide HTTP access instead of using lpxelinux.0 and it could do authentication.
I am currently trying that. So far I just replaced lpxelinux.0 with undionly.kpxe (in udhcpd.conf) per the ipxe setup instructions. I get the ipxe boot screen and can Ctrl-b to break out of the endless loop (again, per the instructions). I have not gotten any further yet, still reading. I was hoping that it would run the 'default' menu by default but it looks like I have to do some more configuration to get to that point.
-
And inserting the authentication information into the URL is parsed but the username/password isn't used ie http://user:password@192.168.4.1/auth/menu.c32.
That was the syntax I was needing. I tried it. You were right, it did not work. Back to trying to set up ipxe...
-
The NSLU2 is rather limited in what it allows the end user to configure.
It would appear like many have improved that:
http://www.nslu2-linux.org/
-
By the way, how do I stop/restart udhcpd? I have tried stop, start, and restart with what I believe is the correct path, but there is no indication that anything happens, not even an error message.
-
The NSLU2 is rather limited in what it allows the end user to configure.
It would appear like many have improved that:
http://www.nslu2-linux.org/
Yes, and I am very interested in going that route. In fact, this past Friday I received a second, used, NSLU2 I found on Amazon. I am researching which firmware would be best for my needs. But it will take time to get that set up so I am continuing to work on the TCL/PXE boot http issue from both angles.
Thanks for the tip.
-
By the way, how do I stop/restart udhcpd? I have tried stop, start, and restart with what I believe is the correct path, but there is no indication that anything happens, not even an error message.
A suggestion would be using 'htop', which lets you kill a selected process while providing realtime feedback.
-
$ ps aux | grep udhcpc
$ sudo kill xxxx [pid from result of above command]
udhcpc should also create a pid file of the form /var/run/udhcpc.eth1.pid
-
Thanks guys.
I gather that the standard stop/start/restart commands don't work in TC? I thought it was something I was doing wrong. I especially wanted the restart command so that when I make a change in the config I could test it easily with a restart command.
Thanks for your tips - very helpful.
-
The NSLU2 is rather limited in what it allows the end user to configure. It insists on asking for a user name/password for any access. Failed logongs are supposed to default to the "guest" account.
Unrecognized requests with the Authorization header, yes. Without the header it's a failure with HTTP stastus 401.
At the PXE boot menu, when I select an entry from the menu and press Enter, I need to see the response/error message before PXE returns to the menu (assuming a boot failure occures, which it does when trying an http boot). As it is, I see just the briefest flash of a message and then it is gone and the menu is active again.
Working as intended. You'd need a ONERROR command specified and COM32 module to pause the screen or try without the menu.
I am currently trying that. So far I just replaced lpxelinux.0 with undionly.kpxe (in udhcpd.conf) per the ipxe setup instructions. I get the ipxe boot screen and can Ctrl-b to break out of the endless loop (again, per the instructions). I have not gotten any further yet, still reading. I was hoping that it would run the 'default' menu by default but it looks like I have to do some more configuration to get to that point.
Just like gpxelinux.0/ipxelinux.0: add a script and possibly pxelinux.0. At that point, try the URL with username/password in the PXELINUX config.
-
@genec - Very useful information. I managed to get an http boot to work with ipxelinux.0, thanks. I'm still hoping to get it working with syslinux but now I have another option to fall back on for the present. All the tips were what I needed, thanks.
I'm presently trying to get a second NSLU2 I picked up upgraded to openwrt firmware. That should allow me to have the control needed to work with syslinux http booting. The reflashing went OK, but I could not get an IP address to the unit. I off to work on that now...