How do I get gPXE or PXElinux to boot from the cd drive?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: ubuntu server 10 (JeOS) x64, fedora 13 i686, tinygentoo
Posts: 12
Rep:
How do I get gPXE or PXElinux to boot from the cd drive?
I have successfully set up a tftp/dhcp server from which to deliver gPXE or PXElinux, so my machine can boot from iSCSI (there is no hard drive). Using either one (I prefer gPXE to keep thing simple), when iSCSI boot fails (e.g. the iscsi target is empty), the iSCSI target is successfully retained as a device in BIOS, and the BIOS is supposed to move to the next boot device, in this case the DVD drive. However it does not. So in order to be able to install Windows to the iSCSI drive I need to either get gPXE or PXElinux to instruct it to boot from the first optical drive after sanboot fails, or set up a PXE image server to load the Windows DVD from, which I don't really have time to do.
I've scoured the web for instructions on how to get either of these to do a local optical drive boot, but all I can find is codes to boot from hard drives or floppies. Any help?
p.s. My apologies in advance if this isn't in the right forum. I figured networking would hit the most people experienced with PXE and gPXE...
p.p.s. Here are my files so you know what I'm doing:
Note: Yes, I know I can do a UI based menu for this, I'll set that up once I have everything working. I added the loader label because I read that it would execute a boot loader that I could use to select the DVD drive, but it doesn't work yet. The way it's set up, PXElinux fails when I execute "loader". It says kernel memdisk not found even though memdisk.bin is in the same directory, and when i change it to
Code:
kernel memdisk.bin
it just hangs. The files are from SYSlinux 4.0.3 and am using gPXE 1.0.1. I'm sure I've missed something fundamental, this is my first time using PXElinux. Or network booting at all really.
Last edited by oliaseleven; 01-12-2011 at 11:09 PM.
The way it's set up, PXElinux fails when I execute "loader". It says kernel memdisk not found even though memdisk.bin is in the same directory, and when i change it to
Code:
kernel memdisk.bin
it just hangs.
KERNEL is the auto-magic boot loader directive. It guesses what to use based on "file extension". ".bin" means a boot strap program (like a typical boot sector) but MEMDISK needs to be loaded like a Linux kernel. Try the "LINUX memdisk.bin" or rename "memdisk.bin" to "memdisk". Filenames in the config files should match the real files.
I have successfully set up a tftp/dhcp server from which to deliver gPXE or PXElinux, so my machine can boot from iSCSI (there is no hard drive). Using either one (I prefer gPXE to keep thing simple), when iSCSI boot fails (e.g. the iscsi target is empty), the iSCSI target is successfully retained as a device in BIOS, and the BIOS is supposed to move to the next boot device, in this case the DVD drive. However it does not. So in order to be able to install Windows to the iSCSI drive I need to either get gPXE or PXElinux to instruct it to boot from the first optical drive after sanboot fails, or set up a PXE image server to load the Windows DVD from, which I don't really have time to do.
If it's blank (binary 0's), all it'll do is execute the instruction "add [bx+si],al" (if I have the info correctly). In order to do anything useful, it needs to execute something like "INT 18h" or "INT 19h". Some BIOSs are nice and analyze the boot sector to determine if it's a blank before executing it. I believe gPXE just boots it.
Quote:
Originally Posted by oliaseleven
I've scoured the web for instructions on how to get either of these to do a local optical drive boot, but all I can find is codes to boot from hard drives or floppies. Any help?
This is probably because booting an optical drive normally requires the BIOS to configure the El Torito boot. I'm very uncertain you'll ever find the answer you seek.
Distribution: ubuntu server 10 (JeOS) x64, fedora 13 i686, tinygentoo
Posts: 12
Original Poster
Rep:
Thanks for all your responses! I'll try your suggestions tonight or tomorrow. As for the NIC, it's a single port PCI Intel E1000, not Lan on Motherboard. The mainboard I'm using is an old junk P4 workstation with a VIA chipset. I could try looking for an update for the BIOS, but the manufacturer hasn't even been releasing proper Win XP drivers, so I'm not expecting much help there. It was manufactured in 2001 or 2002 I believe.
About the El Torito booting, according to wikipedia (yeah, maybe a bad source, don't have time to dig) this should be possible using SYS- or ISO-linux. http://en.wikipedia.org/wiki/El_Tori...rd)#Boot_modes unless I'm misinterpreting that.
As far as never getting it to boot from CDROM (if the loadboot 0 doesn't work), is there perhaps a way I could load GRUB via PXE? I've found some notes on making a PXE image for it, but wasn't sure if it was for a local GRUB installation that allows you to boot PXE, or a PXE GRUB image that allows you to boot locally. The notes I found are here: http://grub.enbug.org/PXEBOOT
Thanks again everyone!
Last edited by oliaseleven; 01-13-2011 at 08:46 AM.
I got everything to work now except that the iSCSI drive doesn't appear in the list of drives for Win 7 installation. Trying some different things, will post solution or best progress when it's working or I'm out of ideas.
So far I:
-am now using SYSlinux 4.04-pre4.
-was using the wrong memdisk file in PXElinux. The correct file is located in ((SYSlinux folder)/memdisk and has no file extension. The "loader" label now works to boot from an optical drive after the sanboot is attempted.
-will post the final versions of the relevant conf files when I have a working solution.
Last edited by oliaseleven; 01-13-2011 at 07:56 PM.
Distribution: ubuntu server 10 (JeOS) x64, fedora 13 i686, tinygentoo
Posts: 12
Original Poster
Rep:
Hello jefro,
I did not burn the ROM.
In case you or anyone else wants a summary, I am using the tftp/dhcp method where the original ROM attempts to PXE boot and is served a gPXE ROM instead of a PXE image. The gPXE ROM then loads and attempts to boot from the iSCSI target, and if it fails it chainloads PXElinux instead. This allows me to use sbootmgr.dsk to boot from the local optical drive, when I can then (theoretically) boot up an OS disk such as Win 7 and install to the iSCSI target which is still in BIOS (due to invoking the keep-san 1 option). Under normal circumstances, as I've read, chainloading PXElinux is unnecessary as BIOS is supposed automatically switch to the second boot device (the optical drive) in the event that the sanboot attempt fails. But this board's BIOS is poorly written, so it does not. Hence the need to do use the sbootmgr.dsk technique.
As for your second question, yes, that is my aim. I am using the method listed under the Win2k8 guide, towards the bottom of the page under Alternative Method (simple) header. I have gotten to the Win 7 install screen, but the installer will not recognize the iSCSI drive. I tried plugging in a hard drive as it suggests, but this does not make the iSCSI drive appear. However, when I click on a partition in the local drive the installer gives the error:
"Windows cannot be installed to this disk. The computer's hardware may not support booting to this disk. Ensure that the disks' controller is enabled in the computer's BIOS menu."
Because the guide I linked predicts this problem and I have not had this problem before when installing this OS to the same local drive in the same machine in absence of the gpxe/pxelinux/sanboot steps, this leads me to believe that the iSCSI target has been successfully added to the BIOS, I just need to find setting that will allow Win 7 to recognize it as a valid install drive.
Just a note. Once gpxe loads bios has no choice anymore would be my thinking.
"and the BIOS is supposed to move to the next boot device"
If and only if gPXE still has control and can return control to the BIOS. To my knowledge, SANBOOT almost prevents this from happening. The only way to tell gPXE to return to the BIOS is a PXENV+ call. Effectively, this means no. I have written programs to find the PXENV+ header but I don't believe they were small.
As for your second question, yes, that is my aim. I am using the method listed under the Win2k8 guide, towards the bottom of the page under Alternative Method (simple) header.
It looks like that section of that EtherBoot Wiki page should be updated with some corrected info and links to the official sources. If the author of that section is makes it such that you fetch the PXELINUX binary yourself, MEMDISK should come from the same source.
Quote:
I have gotten to the Win 7 install screen, but the installer will not recognize the iSCSI drive.
While you're in PXELINUX, you can use HDT (com32/hdt/hdt.c32) to list the BIOS drives. This may give some hints but not certain. It's possible that the Win7 installer took control of the NIC but didn't try to preserve the iSCSI BIOS attachment.
Quote:
I tried plugging in a hard drive as it suggests, but this does not make the iSCSI drive appear. However, when I click on a partition in the local drive the installer gives the error:
"Windows cannot be installed to this disk. The computer's hardware may not support booting to this disk. Ensure that the disks' controller is enabled in the computer's BIOS menu."
OK, once you pxe a gpxe image over it can't return to bios. If you had burned the gpxe rom to the nic or had a supported gpxe nic then it could then return. (pretty sure on this, bios is a one time shot here)
What you may be able to do is create a timeout to then let either gpxe or more likely grub then boot to the local cd.
Think you should boot to a gpxe disk, floppy, cd or usb on the client system and then work on the iscsi issue.
Then come back to the pxe to load gpxe. Might be a way to grub choice the gpxe then disk,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.