[Bug 1291900] [NEW] grub does not fill in various variables pxe_default_* and net_default_*

Thomas Schweikle 1291900 at bugs.launchpad.net
Thu Mar 13 10:14:58 UTC 2014


Public bug reported:

Booting grub over the network sets various variables (default server
172.18.1.1, gw 172.18.1.2):

pxe_default_server
net_default_ip
net_default_mac
net_default_server

After successfully booting grub over PXE (with grub upstream):
net_default_interface=efinet1
net_default_ip=172.18.1.209
net_default_mac=11:22:33:44:55:66
net_default_server=172.18.1.1
net_efinet1_boot_file=pxeboot.img
net_efinet1_ip=172.18.1.209
net_efinet1_mac=11:22:33:44:55:66
prefix=(tftp,172.18.1.1)/tftp
pxe_default_server=172.18.1.1
root=tftp,172.18.1.1

After successfully booting grub over PXE (with an older grub):
net_default_ip=172.18.1.209
net_default_mac=11:22:33:44:55:66
net_default_server=172.18.1.1
prefix=(tftp,172.18.1.1)/tftp
pxe_default_server=172.18.1.1
root=tftp,172.18.1.1

But using grub provided by Ubuntu 14.04:
net_default_ip=172.18.1.209
net_default_mac=
net_default_server=
pxe_default_server=
prefix=(tftp,172.18.1.1)/tftp
root=tftp,172.18.1.1

In turn booting from nfs with grub script:
 menuentry "Rescue 64-Bit" {
      recordfail
      set gfxpayload=$linux_gfx_mode
      set root='(pxe)'
      echo "loading kernel ..."
      linux (pxe)/rcd/isolinux/rescue64 vga=788 nfsboot=$net_default_server:/data/tftp/rcd
      echo "loading initrd ..."
      initrd (pxe)/rcd/isolinux/initram.igz
    }

Fails because the kernel tries to mount :/data/tftp/rcd


The same is for booting FreeBSD:
  menuentry "FreeBSD 10 ..." {
    echo "Loading kernel ..."
    recordfail
    set gfxpayload=$linux_gfx_mode
    set root='(pxe)'
    kfreebsd /freebsd/10/boot/kernel/kernel
    #
    echo "Loading device hints ..."
    kfreebsd_loadenv /freebsd/9/boot/device.hints
    #
    echo "Loading initrd ..."
    kfreebsd_module /freebsd/10/mfsroot.gz type=mfs_root
    #
    set kFreeBSD.vfs.root.mountfrom=nfs:$pxe_default_server:/data/tftp/freebsd/10
    set kFreeBSD.vfs.root.mountfrom.options=ro
    #
    set kFreeBSD.boot.nfsroot.server=$pxe_default_server
    set kFreeBSD.boot.netif.hwaddr=$net_pxe_mac
    set kFreeBSD.boot.netif.ip=$net_pxe_ip
    set kFreeBSD.boot.netif.netmask=255.255.255.0
    set kFreeBSD.boot.netif.gateway=$pxe_default_gateway
    set kFreeBSD.dhcp.host-name=$net_pxe_hostname
    set kFreeBSD.dhcp.routers=$pxe_default_gateway
    set kFreeBSD.boot.kspath=$ks_path
  }

Because all those unset variables lead to unset kernel-Variables. In
tune FreeBSD loads the kernel, but can't continue, because it doesn't
find the system to load.

Grub shall set these variables accordingly to what dhcp provides.
This seems fixed in upstream grub from gnu.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: grub2 (not installed)
ProcVersionSignature: Ubuntu 3.13.0-17.37-generic 3.13.6
Uname: Linux 3.13.0-17-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
Date: Thu Mar 13 10:56:30 2014
InstallationDate: Installed on 2014-01-31 (40 days ago)
InstallationMedia: Ubuntu-Server 13.10 "Saucy Salamander" - Release amd64 (20131016)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: Upgraded to trusty on 2014-01-31 (40 days ago)

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug trusty

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1291900

Title:
  grub does not fill in various variables pxe_default_* and
  net_default_*

Status in “grub2” package in Ubuntu:
  New

Bug description:
  Booting grub over the network sets various variables (default server
  172.18.1.1, gw 172.18.1.2):

  pxe_default_server
  net_default_ip
  net_default_mac
  net_default_server

  After successfully booting grub over PXE (with grub upstream):
  net_default_interface=efinet1
  net_default_ip=172.18.1.209
  net_default_mac=11:22:33:44:55:66
  net_default_server=172.18.1.1
  net_efinet1_boot_file=pxeboot.img
  net_efinet1_ip=172.18.1.209
  net_efinet1_mac=11:22:33:44:55:66
  prefix=(tftp,172.18.1.1)/tftp
  pxe_default_server=172.18.1.1
  root=tftp,172.18.1.1

  After successfully booting grub over PXE (with an older grub):
  net_default_ip=172.18.1.209
  net_default_mac=11:22:33:44:55:66
  net_default_server=172.18.1.1
  prefix=(tftp,172.18.1.1)/tftp
  pxe_default_server=172.18.1.1
  root=tftp,172.18.1.1

  But using grub provided by Ubuntu 14.04:
  net_default_ip=172.18.1.209
  net_default_mac=
  net_default_server=
  pxe_default_server=
  prefix=(tftp,172.18.1.1)/tftp
  root=tftp,172.18.1.1

  In turn booting from nfs with grub script:
   menuentry "Rescue 64-Bit" {
        recordfail
        set gfxpayload=$linux_gfx_mode
        set root='(pxe)'
        echo "loading kernel ..."
        linux (pxe)/rcd/isolinux/rescue64 vga=788 nfsboot=$net_default_server:/data/tftp/rcd
        echo "loading initrd ..."
        initrd (pxe)/rcd/isolinux/initram.igz
      }

  Fails because the kernel tries to mount :/data/tftp/rcd

  
  The same is for booting FreeBSD:
    menuentry "FreeBSD 10 ..." {
      echo "Loading kernel ..."
      recordfail
      set gfxpayload=$linux_gfx_mode
      set root='(pxe)'
      kfreebsd /freebsd/10/boot/kernel/kernel
      #
      echo "Loading device hints ..."
      kfreebsd_loadenv /freebsd/9/boot/device.hints
      #
      echo "Loading initrd ..."
      kfreebsd_module /freebsd/10/mfsroot.gz type=mfs_root
      #
      set kFreeBSD.vfs.root.mountfrom=nfs:$pxe_default_server:/data/tftp/freebsd/10
      set kFreeBSD.vfs.root.mountfrom.options=ro
      #
      set kFreeBSD.boot.nfsroot.server=$pxe_default_server
      set kFreeBSD.boot.netif.hwaddr=$net_pxe_mac
      set kFreeBSD.boot.netif.ip=$net_pxe_ip
      set kFreeBSD.boot.netif.netmask=255.255.255.0
      set kFreeBSD.boot.netif.gateway=$pxe_default_gateway
      set kFreeBSD.dhcp.host-name=$net_pxe_hostname
      set kFreeBSD.dhcp.routers=$pxe_default_gateway
      set kFreeBSD.boot.kspath=$ks_path
    }

  Because all those unset variables lead to unset kernel-Variables. In
  tune FreeBSD loads the kernel, but can't continue, because it doesn't
  find the system to load.

  Grub shall set these variables accordingly to what dhcp provides.
  This seems fixed in upstream grub from gnu.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: grub2 (not installed)
  ProcVersionSignature: Ubuntu 3.13.0-17.37-generic 3.13.6
  Uname: Linux 3.13.0-17-generic x86_64
  ApportVersion: 2.13.3-0ubuntu1
  Architecture: amd64
  Date: Thu Mar 13 10:56:30 2014
  InstallationDate: Installed on 2014-01-31 (40 days ago)
  InstallationMedia: Ubuntu-Server 13.10 "Saucy Salamander" - Release amd64 (20131016)
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=de_DE.UTF-8
   SHELL=/bin/bash
  SourcePackage: grub2
  UpgradeStatus: Upgraded to trusty on 2014-01-31 (40 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1291900/+subscriptions



More information about the foundations-bugs mailing list