Jump to content











Photo
- - - - -

Unable to boot across PXE using grldr / grub.exe (easy2boot)

pxe grldr grub easy2boot linux dnsmasq

  • Please log in to reply
8 replies to this topic

#1 poofdragon

poofdragon
  • Members
  • 5 posts
  •  
    United States

Posted 12 December 2013 - 11:01 PM

Hello, new to the forum and having some issues with a new pxe server I'm trying to get rolling. My current setup is an Arch Linux (Manjaro) box running DNSMASQ as the dhcp/tftp server. I am able to get pxelinux.0 to boot without issue and have tested it using various ISOs mounted using memdisk. I am attempting to move from this configuration to one which relies on Easy2Boot in order to reduce maintenance time when updating distributions, etc.

 

Originally I used this guide to get a functional PXE server going: http://freeshell.de/...-on-arch-linux/

 

I then attempted to adapt various guides in order to enable grub4dos over pxe: http://diddy.boot-la...s/files/pxe.htm , http://www.rmprepusb.com/tutorials/pxe , etc.

 

I mostly test using a local virtualbox machine which works great booting pxelinux.0 and lpxelinux.0. I am able to boot off of the various ISOs I've tested without issue. This is reflected in tests using actual hardware. The problem is that I am completely unable to boot using grldr / grub.exe. Upon connection to the PXE server, I get the inbuilt grub menu / fallback mode and grub is unable to locate my /menu.lst/default configuration file. I've searched through many, many forums and mailing lists in addition to the obvious first stops like man pages and other technical documentation. I've also attempted to adjust the file permissions and ownership to no avail.

 

Eventually I found a number of posts here at reboot.pro which lead me to an attempt at booting pxelinux.0 then handing off to grldr / grub.exe as described here: http://reboot.pro/to...inc32-syslinux/

 

I've tried various forms of syslinux including: pxelinux.0, gpxelinux.0, lpxelinux.0. As well as various builds of grldr / grub.exe including: the version included with easy2boot, g4d 0.4.4, g4d 0.4.5c, g4d 0.4.6a, and a variation called wee-2013-08-29. I receive the same "Error 15: Unable to locate file" for every version of grub4dos. When I attempt to boot using gpxelinux.0, I get a panic of some sort and the system reboots (both hardware and vm). Using wee doesn't do much of anything.

 

There is a minor difference between booting grldr on physical hardware vs the virtual machine. With hardware I receive a few of the easy2boot feedback messages before being dumped to the grub prompt with the easy2boot blue colored text. I believe that on hardware the furthest it gets up to is "Booting Easy2Boot (4) - Counting Files - Please Wait...".   In the virtual machine none of the messages appear (aside from the grub fallback information) and the text remains the default white color.

 

Using various grub commands it seems that the system knows that it's booted using pxe with the boot device resolving to (pd). Still, I am unable to get grub to notice any of the files which it should have access to.

 

There seems to be a good deal of discussion about pxe, grldr, and easy2boot here, so I'm hoping that someone might be able to assist.

 

Thanks in advance =)

 

 

Below are my configuration files:

 

/etc/dnsmasq.d/pxe.conf

 

tftp-root=/srv/pxe/root
enable-tftp
#dhcp-boot=grldr
#dhcp-boot=pxelinux.0
dhcp-boot=lpxelinux.0
dhcp-option=vendor:PXEClient,6,2b
dhcp-no-override
pxe-prompt="Press F8 for boot menu", 9
pxe-service=X86PC, "Boot from network (lpxelinux)", lpxelinux
pxe-service=X86PC, "Boot from network (pxelinux)", pxelinux
pxe-service=X86PC, "Boot from network (grldr)", grldr
pxe-service=X86PC, "Boot from local hard disk", 0
dhcp-range=192.168.42.42,proxy

 

/srv/pxe/root/pxelinux.cfg/default

DEFAULT vesamenu.c32

LABEL tinycore
MENU LABEL TinyCore Linux (CorePlus)
APPENS iso
LINUX /memdisk raw
INITRD /iso/tinycore.iso

LABEL ubcd
MENU LABEL Ultimate Boot CD (UBCD) - Tools and Utilities
pxe keep
APPEND iso
LINUX /memdisk raw
INITRD /iso/ubcd.iso

LABEL grldr
MENU LABEL Load grldr with PXE support
pxe keep
terminal console
chainloader --force --raw /grldr

LABEL grub4dos.grldr.chainload
MENU LABEL Load grldr using chain.c32
COM32 chain.c32
APPEND keeppxe file=grldr

LABEL grub4dos.pxe
MENU LABEL GRUB4DOS with PXE
configfile /menu.lst/default
append keeppxe
kernel grub.exe

LABEL grub4dos.chain.grldr
MENU LABEL GRUB4DOS using chain.c32 (grub.exe)
COM32 chain.c32
APPEND keeppxe nohide grldr=grub.exe


#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 13 December 2013 - 09:22 AM

Easy2Boot is totally unsuitable for PXE. This is because there are lots of places in the code where it needs to have a physical, partitioned boot drive.

I suggest you find a different approach even if just using grub4dos + menus.Even if you could get it to boot to the E2B menu, lots of functions/menus won't work.



#3 poofdragon

poofdragon
  • Members
  • 5 posts
  •  
    United States

Posted 13 December 2013 - 08:19 PM

Thanks for the input, Steve, but I would think that with all the tutorials and discussion concerning success using grldr / grub.exe / Easy2Boot over PXE I might have a better than zero chance at getting it to boot. It seems like the big hurdle right now is just getting grldr to run properly. Even if I wanted to just settle for a grub4dos implementation, I'm unable to get my system to read any files under grldr. Like I mentioned in the post, I have a working pxelinux.0 menu system which works great. If I really have to I will settle for "good enough", but this is a "hobby challenge" that would ultimately give me a lot more flexibility in the long run.

 

Right now I'd just like to focus on trying to get grldr / grub.exe to work over PXE and go from there.



#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 13 December 2013 - 08:25 PM

See http://www.rmprepusb.com/tutorials/pxe

 

Note the use of the (pd) device and  pxe keep commands - see the grub4dos section here.

There are other tutorials on my site concerning pxe booting.



#5 poofdragon

poofdragon
  • Members
  • 5 posts
  •  
    United States

Posted 13 December 2013 - 09:23 PM

Thank you for the links. I've read through many of your tutorials already. They were actually extremely helpful and changed the way that I manage my emergency usb stick (thanks again ^_~).  In fact I've started from scratch several times using your tutorials as a guide. Unfortunately, I've attempted the edit that you've suggested and it didn't seem to help. I don't think that this is because the suggestion doesn't work, but rather because of the issues with grldr / grub.exe throwing the Error 15 message at every file I attempt to read. My main focus at the moment is trying to get a virtualbox machine booting PXE-grldr to see even a simple /menu.lst/default file. I would guess that somehow grldr is mapping the (bd)/(pd) area incorrectly and preventing grub from seeing any files there. Is it possible that grldr is mapping some other directory than the /tftp/root as (bd)/(pd)?

 

Running the root command under the grub console suggests that the system is aware that it's booted via PXE with (pd) as the boot area. I've tried moving the /menu.lst/default to the root (renaming to ./menu.lst <- file), creating symlinks and various other attempts at moving the file to an expected location as described by the fallback grub menu (I believe it looks for ./menu.lst , ./menu.lst/default , and ./grub/menu.lst or some variation). I've attempted to use various permissions (0755, 0777, 0644, etc) as well as assigning different owners (root, dnsmasq, nobody, etc). Even booting to the pxelinux.0 environment (which has a working menu system) and handing off to grldr produces the same inability to locate files which is why I lay the blame squarely with grldr / grub.exe. Like I mentioned before, I've read some forums which suggest that there were bugs with certain versions of grldr / grub.exe and have tried the suggested revisions with the same results. The only other possibility I can think of is that there is some kind of issue stemming from the use of DNSMASQ as my tftp server, but I really don't want to run an independent tftp server if I don't have to since DNSMASQ handles that natively.


Edited by poofdragon, 13 December 2013 - 09:26 PM.


#6 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 13 December 2013 - 09:45 PM

In your first post you mentioned that you could boot and load grldr and load and run the E2B menu.lst file.

Did you use the \menu.lst file for the menu default file or did you use the \_ISO\e2b\grub\menu.lst file?

Either way, it sounds like it is getting as far as loading the menu file (which should have pxe keep added by you as the first line)?

When you get to the command prompt what devices can you see using the 'find' and 'ls /' and 'ls (pd)/' and 'ls (hd0,0)/' commands, etc.?



#7 poofdragon

poofdragon
  • Members
  • 5 posts
  •  
    United States

Posted 14 December 2013 - 02:32 AM

Unfortunately I thought that I had made a copy of this "working" set, but I may have accidentally overwritten it while I was trying to debug things =\ I'm currently trying to recreate what I had "working" before. In all cases where I did the handoff from pxelinux to grldr, I used the pxe keep / keeppxe command.  If I can get myself back to where I was with the Easy2Boot messages appearing, I'll update with the appropriate information. 

 

I believe that I used the standard file structure with the minimal /menu.lst which then searches for the "real" menu.lst ( \_ISO\e2b\grub\menu.lst). From what I recall I changed all references from (bd) to (pd) in both the minimal and the "real" versions of the file. This ONLY worked on real hardware. It just falls over on virtualbox.

 

 

For the tests below I used an unmodified extract of the latest Easy2Boot archive. It did not present any of the Easy2Boot messages and only presented the grub fallback text. Here are the results of the grldr / grub4dos console commands:

GRUB4DOS 0.4.5c 2013-10-17, root is (0x21)
Processing the preset-menu ...

bootfile is grldr.0 {DNSMASQ seems to add the .0 extension automatically, so I created a symlink and left the actual file unmodified}

Try block size 1408 ...
{Every line until the grub console requires me to press ESC in order to advance}

Try block size 512 ...
Warning! Cannot open bootfile. pxe_blksize set to default 512.

/menu.lst/xx-xx-xx-xx-xx-xx
/menu.lst/Cxxxxxxx
/menu.lst/Cxxxxxx
/menu.lst/Cxxxxx
/menu.lst/Cxxxx
/menu.lst/Cxxx
/menu.lst/Cxx
/menu.lst/Cx
/menu.lst/C
/menu.lst/default

{flashes grub menu}

Booting 'find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst'
{Process halts and requires multiple ESC presses to advance}

grub> find

(pd)
(hd0,0)
(hd0,1)
(hd1,0)

grub> ls /

ïUᶫí¶à4 {<-- I recreated this using charmap, so the values might not be 100% correct.}

grub> ls (pd)/

Error 15: File not found

grub>ls (hd0,0)/
{This appears to be the local disk}

lost+found var media etc bin boot dev home lib mnt opt {etc...}

grub> root

(pd) Filesystem type is pxe, using whole disk

grub> pxe

blksize: 512
basedir: /
bootfile: grldr.0 {I can get this to read pxelinux.0, etc by changing DNSMASQ}
client ip: 192.168.0.10
server ip: 192.168.0.5
gateway ip: 0.0.0.0
mac: xx-xx-xx-xx-xx-xx


#8 poofdragon

poofdragon
  • Members
  • 5 posts
  •  
    United States

Posted 14 December 2013 - 09:03 AM

After spending a few hours attempting to recreate the circumstances which allowed me to eek out what little success I had previously, I'm still stuck without any more progress since my last post. I may try again tomorrow, but I have tried every combination of settings that I can think of. Obviously I'm missing something that I just can't seem to recall =\



#9 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 15 December 2013 - 03:55 PM

TFTP does not support listing the contents of a directory, so every test where you are trying to use the <TAB> key or ls or find isn't going to work. I'd suggest that you use tcpdump or Wireshark to see what happens on the network when you try to cat a file.
  • Chandra-Orbit likes this





Also tagged with one or more of these keywords: pxe, grldr, grub, easy2boot, linux, dnsmasq

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users