Opened 3 years ago

Last modified 3 years ago

#20589 new defect

NAT TFTP: leading slash in path cause "Access violation"

Reported by: lfmeloman Owned by:
Component: network/NAT Version: VirtualBox 6.1.26
Keywords: Cc:
Guest type: Linux Host type: Windows

Description (last modified by janitor)

I was trying to boot Grub2 using the built-in NAT TFTP. However, after being successfully loaded by iPXE Grub fails to load the additional files (/boot/grub/i386-pc/normal.mod, etc.) printing: error: Access violation

Same error is returned by NAT TFTP when using a tftp client on a booted Gust OS when the requested path has a leading forward slash.

Workaround: switch to an alternative TFTP server on localhost:

VBoxManage modifyvm SLESInst --nattftpserver1

Steps to reproduce:

  • Generate Grub dir without grub.cfg or vmlinuz/initrd (they're not needed for testing)
    [root@reallin il]# grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i386-pc
    Netboot directory for i386-pc created. Configure your DHCP server to point to /srv/tftp/boot/grub/i386-pc/core.0
  • Copy the files to the default TFTPPrefix
    cp -rT /srv/tftp/boot ~/.VirtualBox/TFTP/boot
  • point the VBox DHCP server to the right file
    # If I use leading slash here boot fails sooner
    VBoxManage modifyvm MyVM --nattftpfile1=boot/grub/i386-pc/core.0
  • Boot a guest from Network

Expected: Grub loads in "Normal" mode

Actual: Grub loads in "Rescue" mode.

Additional info:

[il@reallin ~]$ atftp
tftp> get boot/grub/i386-pc/core.0
Overwrite local file [y/n]? y
tftp> get /boot/grub/i386-pc/core.0
Overwrite local file [y/n]? y
tftp: error received from server <Access violation>
tftp: aborting

Attachments (1)

VirtualBox_MyVM_01_10_2021_21_17_43.png (8.1 KB ) - added by lfmeloman 3 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 by janitor, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use