bugGNU GRUB - Bugs: bug #50245, Tftp error while booting via PXE

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #50245: Tftp error while booting via PXE

Submitter:  Mariusz <marianob85>
Submitted:  Tue 07 Feb 2017 07:32:02 PM UTC
   
 
Category:  Network Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Mariusz Brzeski
Open/Closed:  Open Release:  2.02~rc1
Release:  Reproducibility:  Every Time
Planned Release:  None

Jump to the original submission

Sun 19 Feb 2017 02:03:25 PM UTC, comment #18: 

Summary:

I've put all my files ( for all different compilation/configuration ) here. ( all dumps, full configuration, and compilation scripts )
https://drive.google.com/file/d/0ByYkzo4DOiiscDhaYzdRVHdpRlU/view?usp=sharing

Short summary:
All those was tested using WmWare Workstation 12.5.2
Debian images: debian-8.7.1-i386-netinst.iso and debian-8.7.1-amd64-netinst.iso
Compilation with tftpd32-oack.patch applied:

Compilation on Debian_8.7.1-i386
  Bios platform (bootfile x86/booti386.pc)
    @No custom background and font loaded
    # Tftp 4.60
      - Grub and all images are fully working
    # MicrotikOS 6.38.1
      - Grub loading
      - When loading (R-Drive legacy ) grub says: timeout reading (tcpdump_A)
     
  Efi platform (boolfile x86/booti386.efi)
    # Tftp 4.60
      - Grub and all images are fully working
    # MicrotikOS 6.38.1
      - Grub not loading ( VMWare restart after download firmware file ) (tcpdump_B)
     
Compilation on Debian_8.7.1-amd64
  Bios platform (bootfile x64/bootix64.pc)
    @No custom background and font loaded
    # Tftp 4.60
      - Grub and all images are fully working
    # MicrotikOS 6.38.1
      - Grub loading
      - When loading (R-Drive legacy ) grub says: timeout reading (tcpdump_D)
  Efi platform (boolfile x64/bootx64.efi) 
    # Tftp 4.60
      - Grub not loading ( VMWare restart after download firmware file ) (tcpdump_c.pcap)
    # MicrotikOS 6.38.1
      - Grub loading
      - When loading (R-Drive legacy ) grub says: timeout reading (tftpdump_e)

Mariusz <marianob85>
Thu 16 Feb 2017 09:31:52 PM UTC, comment #17: 

Ok. I gave up.

Last time I've used Debian-amd64 on which grub was compile and made. So like I said:

1) tftpd v4.60 + i386 -> working like a charm - no problems - everything working
2) tftpd v4.60 + efi -> can not even load grub
3) RouterOS tftp + i386/efi -> Grub is booting but I can not load 'R-Drive(Legacy)' or 'R-Drive(Efi)' entry. ( file timeout )

Today I've installed different architecture of Debian ( version x86 instead of amd64), compile grub ( with tftpd32-oack.patch of course ) and make grub-image, and I get completely different result:

1) tftpd v4.60 + i386 -> working like a charm - no problems - everything working ( so no change to Debian-amd64 )
2) tftpd v4.60 + efi -> working like a charm - no problems - everything working ( completely different result compare to grub compile under Debian-amd64 )

3) RouterOS + efi -> restart while trying load boot file ( using Debian-amd64 to compile grub the same problem was previous with tftp + efi. )
4) RouterOS + i386 -> No change ( grub loading but I have file timout while trying to load R-Drive(Legacy)

I've also check older tftpd v4.52 in 32-bit version. No difference to v4.60x64 regarding grub booting.

Tomorrow I will try to zip all my files with description how I compile it and put it somewhere. Maybe someday You will find some time to check it.

Mariusz <marianob85>
Mon 13 Feb 2017 04:21:04 PM UTC, comment #16: 


> I'm using v4.60 which is newer that yours 4.52


Oops, sorry, I somehow had 4.50 in mind. Yes, 4.60 is 64 bit only, so I cannot easily test it (I do not have 64 bit Windows). This could of course be tftp32 regression.

Andrei Borzenkov <arvidjaar>
Group Member
Mon 13 Feb 2017 03:48:19 PM UTC, comment #15: 

Ok. I can not find another path :)
About tftps. I'm confused after your comment. I'm using v4.60 which is newer that yours 4.52. But I will try downgrade.

Mariusz <marianob85>
Mon 13 Feb 2017 02:12:34 PM UTC, comment #14: 

BTW I cannot reproduce it with TFTPD32 v4.52 at all. There is "PXE compatibility" option which indeed makes TFTPD32 process only tsize option but even if I enable it, grub still boots just fine and tftpd32 log shows that it answered with tsize option. I suggest you update your server, there is no point to use old version really.

Andrei Borzenkov <arvidjaar>
Group Member
Mon 13 Feb 2017 03:51:05 AM UTC, comment #13: 


> tftpd v4.60 + i386 -> working like a charm


OK, let's finish with this part. Could you please another version of the patch (please revert previous version first). It continues to send blksize but in different order. Please attach packet trace for boot to verify this works as intended.

> tftpd v4.60 + efi -> can not even load grub. ( VMware is restarting after trying to load boox64.efi )


Again, make sure you are using clean build environment and recreated all grub files.

>

Andrei Borzenkov <arvidjaar>
Group Member
Sun 12 Feb 2017 09:56:00 PM UTC, comment #12: 

I'm not able to upload 4.8MB file
Here it is: https://drive.google.com/open?id=0ByYkzo4DOiisVHFKNDhaVDE0WVE

Mariusz <marianob85>
Sun 12 Feb 2017 09:32:50 PM UTC, comment #11: 

Thanks for Your time helping me.

Definitely I messed up something with compilation last time.

So. With Your path is much better, but :(

1) tftpd v4.60 + i386 -> working like a charm
2) tftpd v4.60 + efi -> can not even load grub. ( VMware is restarting after trying to load boox64.efi )(tftpd_efi.pcapng). Boot file is ok because using RouterOS tftp I'm able to boot efi grub but have a problem described at point 3)

3) RouterOS tftp + i386/efi -> Grub is booting but I can not load 'R-Drive(Legacy)' or 'R-Drive(Efi)' entry ( please check attached grub.cfg ). Maybe it's because of lot of initrd files ?. I've attached packet dump from RouterOS (RouterOS__i386.dump ) also screenshot from grub (PxeTest-2017-02-12-21-46-05.png)

And I've just notice interesting thing. I'm using 2 files for menu (font.pf2 and Background.png - check grub.cfg for details ). Using efi I can see background and used font (looks correct ), but using legacy version for i386, I have old text menu ( no background, standard font ). Right before grub (i386) is loaded I can see 2 entries something like 'error: file not found". Maybe it is somehow related. No idea. If You need any more data please let me know.


(file #39744,

Mariusz <marianob85>
Sun 12 Feb 2017 04:49:09 PM UTC, comment #10: 

I cannot reproduce it - version with patch boots correctly here. Please try with clean build out of GIT + patch and make sure to recreate netboot directory using just built grub:

pkgdatadir=$PWD ./grub-mknetdir --net-directory ... -d grub-core

Andrei Borzenkov <arvidjaar>
Group Member
Sun 12 Feb 2017 04:28:09 PM UTC, comment #9: 

With patch applied I get "push out of the packet range.." error.

Attached:
grub_packet_range.pcapng.gz
Grub-2017-02-12-17-21-51.png

file #39738)

Mariusz <marianob85>
Sun 12 Feb 2017 03:15:57 PM UTC, comment #8: 

OK. Your packet trace shows that server does not respond with OACK for GRUB request.

Firmware loading boot file:

 21  13.320650   10.48.1.10 -> 10.48.1.1    TFTP 67 Read Request, File: booti386, Transfer type: octet, tsize=0
 22  13.321007    10.48.1.1 -> 10.48.1.10   TFTP 56 Option Acknowledgement, tsize=47819

GRUB loading normal.mod

215  13.519659   10.48.1.10 -> 10.48.1.1    TFTP 96 Read Request, File: /grub/i386-pc/normal.mod, Transfer type: octet, blksize=1024, tsize=0
216  13.522566    10.48.1.1 -> 10.48.1.10   TFTP 558 Data Packet, Block: 1

Could you try attached patch to verify it; it does not send blksize option to match firmware behavior.

(file #39736)

Andrei Borzenkov <arvidjaar>
Group Member
Sun 12 Feb 2017 02:50:25 PM UTC, comment #7: 

Sorry for that.

I've also reproduce it on i386-pc platform. Seems platform independent.

Mariusz <marianob85>
Sun 12 Feb 2017 02:42:36 PM UTC, comment #6: 

Sorry, I do not understand. You report problem with grub on x86_64-efi platform and attach packet capture for grub on i386-pc platform. How is it relevant for EFI problem?

Andrei Borzenkov <arvidjaar>
Group Member
Sun 12 Feb 2017 01:31:11 PM UTC, comment #5: 

Files attached.
I've used VMWare workstation 12.5.2 + tftpd  v4.60 http://tftpd32.jounin.net

No efi. I've used legacy bios.

(file #39734,

Mariusz <marianob85>
Fri 10 Feb 2017 03:17:55 AM UTC, comment #4: 

So it did configure some address. Is it the correct one? Please run tcpdump or wireshark on TFTP server and provide packet capture together with IP address grub was using.

Andrei Borzenkov <arvidjaar>
Group Member
Thu 09 Feb 2017 09:07:03 PM UTC, comment #3: 

grub> net_ls_cards
efinet0 00:0c:29:20:99:56
grub> net_ls_addr
efinet0 00:0c:29:20:99:56 192.168.1.82

Mariusz <marianob85>
Thu 09 Feb 2017 06:40:17 PM UTC, comment #2: 

what is output of

net_ls_cards
net_ls_addr

??

Andrei Borzenkov <arvidjaar>
Group Member
Wed 08 Feb 2017 04:06:17 PM UTC, comment #1: 

I've check grub for legacy bios:
grub-mkimage -d /usr/lib/grub/i386-pc/ -O i386-pc-pxe -o ./booti386 -p '(tftp)/grub' pxe tftp

and there is no problem with tftp. Ale images are loading without problems.

So it's seems problem is related with efi ?

Mariusz <marianob85>
Tue 07 Feb 2017 07:32:02 PM UTC, original submission:  

I've create grub image for EFI boot.
grub-mkimage -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi -o ./bootx64.efi -p '(tftp)/grub' efinet tftp

When I try to boot VMware machine ( or PC ) via netboot I'm getting tftp file opening error, something like:

error: time out opening '/grub/x86_64-efi/normal.mod'

I'm using tftp server and DHCP on RouterOS ( mikrotik ) 6.38.1 but I've also tried on http://tftpd32.jounin.net/ with the same result. RouterOS log says 'connection timeout'. Logs from tftpd64.460 attached.


I've tried it on Grub 2.02~beta3-4 from debian test package server. I've also compile the latest one from git ( RC1 ) but it's even worse ( errors occur much faster ).

I'm not familiar with debugging under Linux but I will try to help as much as possible.

Mariusz <marianob85>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #39744:  tftpd_efi.pcapng added by marianob85 (239KiB - application/octet-stream)
file #39738:  grub_packet_range.pcapng.gz added by marianob85 (46KiB - application/x-gzip)
file #39736:  tftpd32-oack.patch added by arvidjaar (1KiB - text/x-patch)
file #39734:  grub.pcap added by marianob85 (217KiB - application/octet-stream)
file #39694:  tftpd.log added by marianob85 (1KiB - application/octet-stream - Configuration and tftp logs)
file #39695:  grub.cfg added by marianob85 (1KiB - text/plain - Configuration and tftp logs)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by marianob85 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-12 marianob85 Attached File- Added tftpd_efi.pcapng, #39744
        Attached File- Added PxeTest-2017-02-12-21-46-05.png, #39745
    2017-02-12 marianob85 Attached File- Added Grub-2017-02-12-17-21-51.png, #39737
        Attached File- Added grub_packet_range.pcapng.gz, #39738
    2017-02-12 arvidjaar Release2.00 2.02~rc1
    2017-02-12 arvidjaar Attached File- Added tftpd32-oack.patch, #39736
    2017-02-12 marianob85 Attached File- Added grub.pcap, #39734
        Attached File- Added Ubuntu-2017-02-12-14-25-08.png, #39735
    2017-02-07 marianob85 Attached File- Added tftpd.log, #39694
        Attached File- Added grub.cfg, #39695

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code