VirtualBox

Ticket #20589 (new defect)

Opened 2 months ago

Last modified 2 months ago

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) (diff)

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 10.0.2.2

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 10.0.2.4
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
tftp> 

Attachments

VirtualBox_MyVM_01_10_2021_21_17_43.png Download (8.1 KB) - added by lfmeloman 2 months ago.

Change History

Changed 2 months ago by lfmeloman

comment:1 Changed 2 months ago by janitor

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

www.oracle.com
ContactPrivacy policyTerms of Use