bugGNU GRUB - Bugs: bug #55636, Wrong TFTP server when booted from...

 
 

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

bug #55636: Wrong TFTP server when booted from proxyDHCP

Submitter:  Alkis Georgopoulos <alkisg>
Submitted:  Sun 03 Feb 2019 03:46:33 PM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  2.02
Release:  Reproducibility:  Every Time
Planned Release:  None

Thu 02 Jun 2022 10:47:27 AM UTC, comment #4: 

At least the shim problem is solved with version 15 (https://github.com/rhboot/shim/releases/tag/15) if im right. Are there any updates on this topic?

Sandro

Sandro <steinliiippp>
Mon 13 Sep 2021 01:18:34 AM UTC, comment #3: 

Dear grub developers,
Is that possible to review this patch and apply it?
https://lists.gnu.org/archive/html/grub-devel/2016-04/msg00051.html

Steven

Steven Shiau <stevenshiau>
Fri 20 Dec 2019 11:52:01 AM UTC, comment #2: 

Also affected 2.04

kvaps <kvaps>
Fri 20 Dec 2019 11:44:16 AM UTC, comment #1: 

Hi, I just faced with the same issue when implementing GRUB support for LTSP (https://github.com/ltsp/ltsp/pull/108#issuecomment-567744162)

I was thinking that problem can be simple solved my setting correct next-server (SIADDR) option on proxy-dhcp server, but I was wrong because grub drops into rescue shell any way:

iPXE (PCI 00:03.0) starting execution...ok
iPXE initialising devices...ok

iPXE 1.0.0+ (0600d) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP AoE ELF MBOOT PXE bzImage Menu PXEXT

netO: 02:00:10:ad:4a:47 using virtio-net on 9000:00:03.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]

Configuring (netO 02:00:10:ad:4a:47)... ok

netO: 192.168.67.267/255.255.255.0 gw 192.168.67.1
Booting from PXE menu
PXE
PXEBS (netO type 640)... ok
Next server: 192.168.67.10
Filename: Iltsp/grub/i386-pc/core .0
tftp://192.168.67.10/ltsp/grub/i386-pce/core.9... ok
core.0 : 47787 bytes [PXE-NBP]
error: time out opening ‘/ltsp/grub/i386-pc/normal.mod’ .
Entering rescue mode...
grub rescue>


If I call set I will see main dhcp server address only:


grub rescue> set
cmdpath=(tftp,192.168.67.1)ltsp/grub/i386-pc
net_default_interface=pxe
net_default_ip=192.168.67.26
net_default_mac=02:00:10:ad:4a:47
net_default_server=192.168.67.1
net_pxe_boot_file=ltsp/grub/i386-pc/core.0
net_pxe_ip=192.168.67.26
net_pxe_mac=02:00:10:ad:4a:47
net_pxe_next_server=192.168.67.1
net_pxe_vendor_class_identifier=PXEClient
prefix=(tftp,192.168.67.1)/ltsp/grub
pxe_default_server=192.168.67.1
root=tftp,192.168.67.1
grub rescue>


A little investigation shows that proxy-dhcp sending correct next-server (SIADDR) option in it's replies:

  1. Client request:


  TIME: 2019-12-20 01:40:06.103
    IP: 0.0.0.0 (2:0:10:ad:4a:47) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: bc417532
  SECS: 4
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 02:00:10:ad:4a:47:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
OPTION:  57 (  2) Maximum DHCP message size 1472
OPTION:  93 (  2) Client System             0000             ..
OPTION:  94 (  3) Client NDI                010201           ...
OPTION:  60 ( 32) Vendor class identifier   PXEClient:Arch:00000:UNDI:002001
OPTION:  77 (  4) User-class Identification 69505845         iPXE
OPTION:  55 ( 23) Parameter Request List      1 (Subnet mask)
                                              3 (Routers)
                                              6 (DNS server)
                                              7 (Log server)
                                             12 (Host name)
                                             15 (Domainname)
                                             17 (Root path)
                                             26 (Interface MTU)
                                             43 (Vendor specific info)
                                             60 (Vendor class identifier)
                                             66 (TFTP server name)
                                             67 (Bootfile name)
                                            119 (Domain Search)
                                            128 (???)
                                            129 (???)
                                            130 (???)
                                            131 (???)
                                            132 (???)
                                            133 (???)
                                            134 (???)
                                            135 (???)
                                            175 (???)
                                            203 (???)

OPTION: 175 ( 45) ???                       b105011af41000eb ........
                                            0301000017010122 ......."
                                            0101130101110101 ........
                                            2701011901011001 '.......
                                            0221010115010118 .!......
                                            0101120101       .....
OPTION:  61 (  7) Client-identifier         01:02:00:10:ad:4a:47
OPTION:  97 ( 17) UUID/GUID                 00555a96be0e347d .UZ...4}
                                            4ba25965bd22db6e K.Ye.".n
                                            e8               .

  1. proxy-dhcp reply:


  TIME: 2019-12-20 01:40:06.104
    IP: 192.168.67.10 (2:0:10:ad:4a:46) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: bc417532
  SECS: 4
 FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 02:00:10:ad:4a:47:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         2 (DHCPOFFER)
OPTION:  54 (  4) Server identifier         192.168.67.10
OPTION:  60 (  9) Vendor class identifier   PXEClient
OPTION:  97 ( 17) UUID/GUID                 00555a96be0e347d .UZ...4}
                                            4ba25965bd22db6e K.Ye.".n
                                            e8               .
OPTION:  43 ( 48) Vendor specific info      0601030a04005058 ......PX
                                            450807800201c0a8 E.......
                                            430a091b8002186c C......l
                                            7473702f67727562 tsp/grub
                                            2f693338362d7063 /i386-pc
                                            2f636f72652e30ff /core.0.

  1. main-dhcp reply:


  TIME: 2019-12-20 01:40:06.104
    IP: 192.168.67.1 (2:0:10:ad:4a:48) > 192.168.67.26 (2:0:10:ad:4a:47)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: bc417532
  SECS: 4
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 192.168.67.26
SIADDR: 192.168.67.1
GIADDR: 0.0.0.0
CHADDR: 02:00:10:ad:4a:47:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         2 (DHCPOFFER)
OPTION:  54 (  4) Server identifier         192.168.67.1
OPTION:  51 (  4) IP address leasetime      43200 (12h)
OPTION:  58 (  4) T1                        21600 (6h)
OPTION:  59 (  4) T2                        37800 (10h30m)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:  28 (  4) Broadcast address         192.168.67.255
OPTION:   3 (  4) Routers                   192.168.67.1
OPTION:   6 (  4) DNS server                192.168.67.1

  1. Client request:


  TIME: 2019-12-20 01:40:06.104
    IP: 0.0.0.0 (2:0:10:ad:4a:47) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: bc417532
  SECS: 11
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 02:00:10:ad:4a:47:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  57 (  2) Maximum DHCP message size 1472
OPTION:  93 (  2) Client System             0000             ..
OPTION:  94 (  3) Client NDI                010201           ...
OPTION:  60 ( 32) Vendor class identifier   PXEClient:Arch:00000:UNDI:002001
OPTION:  77 (  4) User-class Identification 69505845         iPXE
OPTION:  55 ( 23) Parameter Request List      1 (Subnet mask)
                                              3 (Routers)
                                              6 (DNS server)
                                              7 (Log server)
                                             12 (Host name)
                                             15 (Domainname)
                                             17 (Root path)
                                             26 (Interface MTU)
                                             43 (Vendor specific info)
                                             60 (Vendor class identifier)
                                             66 (TFTP server name)
                                             67 (Bootfile name)
                                            119 (Domain Search)
                                            128 (???)
                                            129 (???)
                                            130 (???)
                                            131 (???)
                                            132 (???)
                                            133 (???)
                                            134 (???)
                                            135 (???)
                                            175 (???)
                                            203 (???)

OPTION: 175 ( 45) ???                       b105011af41000eb ........
                                            0301000017010122 ......."
                                            0101130101110101 ........
                                            2701011901011001 '.......
                                            0221010115010118 .!......
                                            0101120101       .....
OPTION:  61 (  7) Client-identifier         01:02:00:10:ad:4a:47
OPTION:  97 ( 17) UUID/GUID                 00555a96be0e347d .UZ...4}
                                            4ba25965bd22db6e K.Ye.".n
                                            e8               .
OPTION:  54 (  4) Server identifier         192.168.67.1
OPTION:  50 (  4) Request IP address        192.168.67.26

  1. main-dhcp reply:


  TIME: 2019-12-20 01:40:06.207
    IP: 192.168.67.1 (2:0:10:ad:4a:48) > 192.168.67.26 (2:0:10:ad:4a:47)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: bc417532
  SECS: 11
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 192.168.67.26
SIADDR: 192.168.67.1
GIADDR: 0.0.0.0
CHADDR: 02:00:10:ad:4a:47:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         192.168.67.1
OPTION:  51 (  4) IP address leasetime      43200 (12h)
OPTION:  58 (  4) T1                        21600 (6h)
OPTION:  59 (  4) T2                        37800 (10h30m)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:  28 (  4) Broadcast address         192.168.67.255
OPTION:   3 (  4) Routers                   192.168.67.1
OPTION:   6 (  4) DNS server                192.168.67.1

  1. Client request:


  TIME: 2019-12-20 01:40:06.311
    IP: 192.168.67.26 (2:0:10:ad:4a:47) > 192.168.67.10 (2:0:10:ad:4a:46)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: 00000000
  SECS: 4
 FLAGS: 7f80
CIADDR: 192.168.67.26
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 02:00:10:ad:4a:47:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  57 (  2) Maximum DHCP message size 1472
OPTION:  93 (  2) Client System             0000             ..
OPTION:  94 (  3) Client NDI                010201           ...
OPTION:  60 (  9) Vendor class identifier   PXEClient
OPTION:  77 (  4) User-class Identification 69505845         iPXE
OPTION:  55 ( 23) Parameter Request List      1 (Subnet mask)
                                              3 (Routers)
                                              6 (DNS server)
                                              7 (Log server)
                                             12 (Host name)
                                             15 (Domainname)
                                             17 (Root path)
                                             26 (Interface MTU)
                                             43 (Vendor specific info)
                                             60 (Vendor class identifier)
                                             66 (TFTP server name)
                                             67 (Bootfile name)
                                            119 (Domain Search)
                                            128 (???)
                                            129 (???)
                                            130 (???)
                                            131 (???)
                                            132 (???)
                                            133 (???)
                                            134 (???)
                                            135 (???)
                                            175 (???)
                                            203 (???)

OPTION: 175 ( 45) ???                       b105011af41000eb ........
                                            0301000017010122 ......."
                                            0101130101110101 ........
                                            2701011901011001 '.......
                                            0221010115010118 .!......
                                            0101120101       .....
OPTION:  61 (  7) Client-identifier         01:02:00:10:ad:4a:47
OPTION:  97 ( 17) UUID/GUID                 00555a96be0e347d .UZ...4}
                                            4ba25965bd22db6e K.Ye.".n
                                            e8               .
OPTION:  43 (  7) Vendor specific info      470480020000ff   G......

  1. proxy-dhcp reply:


  TIME: 2019-12-20 01:40:06.312
    IP: 192.168.67.10 (2:0:10:ad:4a:46) > 192.168.67.26 (2:0:10:ad:4a:47)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: 00000000
  SECS: 4
 FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 192.168.67.26
SIADDR: 192.168.67.10
GIADDR: 0.0.0.0
CHADDR: 02:00:10:ad:4a:47:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: ltsp/grub/i386-pc/core.0.
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         192.168.67.10
OPTION:  60 (  9) Vendor class identifier   PXEClient
OPTION:  97 ( 17) UUID/GUID                 00555a96be0e347d .UZ...4}
                                            4ba25965bd22db6e K.Ye.".n
                                            e8               .
OPTION:  43 (  7) Vendor specific info      470480020000ff   G......


kvaps <kvaps>
Sun 03 Feb 2019 03:46:33 PM UTC, original submission:  

When grub is booted from a proxyDHCP server, it tries to download grub.cfg from the real DHCP server, and fails.

In the rescue shell, I see that $net_efinet0_dhcp_server_name has the correct proxyDHCP=TFTP server IP, but grub is using $net_default_server instead, which has the real DHCP server IP, which is not a TFTP server.

Years ago, this patch was proposed:
[Re: RFC Patch [0/2] PXE Add support for proxy DHCP](https://lists.gnu.org/archive/html/grub-devel/2014-04/msg00091.html)

As a reply, an even better patch was proposed. Yet none have been merged in git so far.

ProxyDHCP netbooting is used in thousands of installations, and grub supporting it is especially useful nowadays, as shimx64.efi > grubnetx64.efi is pretty much the only option for netbooting with UEFI secure boot enabled.

This was the respective commit in shim, which added proxyDHCP support:
https://github.com/rhboot/shim/commit/5f4fd5364109c80934b7837255ddde61f572fd69

Alkis Georgopoulos <alkisg>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by steinliiippp (Posted a comment)
  • -email is unavailable- added by stevenshiau (Posted a comment)
  • -email is unavailable- added by kvaps (Posted a comment)
  • -email is unavailable- added by alkisg (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-09 mdhowle Carbon-CopyRemoved mdhowle -
    2019-08-07 mdhowle Carbon-Copy- Added mdhowle

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code