1. The PXE boot process in VirtualBox is significantly slower than real booting.
2. For real booting, I use tftpd32 as the DHCP and TFTP Server on an XP Pro machine.
3. VirtualBox is also installed on the real Server machine, and it shares the real TFTP Root directory.
4. VirtualBox does not require separate DHCP or TFTP software. tftpd32 is only required for real PXE booting.
5. When a Virtual Machine is created, there should be no need to create or attach a Virtual Hard Drive.
6. In VirtualBox > Settings > System > Motherboard Tab - tick Network and move it to the top of the Boot Order.
7. In VirtualBox > Settings > Network - Select a Virtual Network Adapter Type. Note whether it is an Intel PRO/1000 card or a PCNet card.
8. By default, VirtualBox requires a TFTP Root directory "in the directory where the user's VirtualBox.xml file is kept". In XP, this would usually be "C:\Documents and Settings\<username>\.VirtualBox\TFTP"
9. By default, VirtualBox requires a file in the TFTP Root directory by the name of VMName.pxe (where VMName is the name of the Virtual Machine being PXE booted. That file is a Bootfile provided by the user and renamed accordingly.
10. I don't use the defaults because I wondered if the spaces and dot in the path might be the source of my problems. To change the defaults, do the following.
*NOTE 1*: "e1000" is used in the commands when the Virtual Network Adapter Type is an Intel PRO/1000 card. For PCNet cards, use "pcnet".
*NOTE 2*: Values should only be set for the Virtual Network Adaptor Type being used. Values for the other Adapter Type should be empty; otherwise an error obtaining "MAC" will occur.
*NOTE 3*: The commands are case-sensitive - "BootFile", not "Bootfile". If the command is wrong, an invalid key may be created, and an error will occur. The log should reveal any invalid keys.
a. Open a command prompt. (Oh. Dear!)
b. Enter:
cd %VBOX_INSTALL_PATH%(Nice of VirtualBox to set an environment variable for its path.)
c. Enter:
VBoxManage getextradata "<VM Name>" "VBoxInternal/Devices/e1000/0/LUN#0/Config/TFTPPrefix""VM Name" should be replaced by the name of the Virtual Machine to be PXE booted.
The command should return "No value set!" (unless you've done this before), and the default value would be used.
To re-set a value to its default value of empty, enter a "setextradata" command (rather than a "getextradata") with the final setextradata parameter empty:
VBoxManage setextradata "<VM Name>" "VBoxInternal/Devices/e1000/0/LUN#0/Config/TFTPPrefix"
d. Enter:
VBoxManage getextradata "<VM Name>" "VBoxInternal/Devices/e1000/0/LUN#0/Config/BootFile"This should also return "No value set!", and the default value would be used.
e. Now change the values to something more useful. Enter:
VBoxManage setextradata "<VM Name>" "VBoxInternal/Devices/e1000/0/LUN#0/Config/TFTPPrefix" "C:\TFTP"and:
VBoxManage setextradata "<VM Name>" "VBoxInternal/Devices/e1000/0/LUN#0/Config/BootFile" "pxelinux.0"This sets the path for Virtual Machine to PXE boot "C:\TFTP\pxelinux.0". ("0" is a zero.)
If using a different path, change the TFTP Prefix and BootFile values to suit.
DON'T close the command prompt. Keep it open and use the up/down arrows to shuffle between previously entered commands - adjusting the commands as required.
Try out a different BootFile, or re-set the values to the default of empty.
f. REMEMBER to match the commands with the Virtual Network Adapter Type being used - "e1000" for Intel PRO/1000 cards, and "pcnet" for PCNet cards.
To be safe, enter four commands - two to set the values for the Virtual Network Adapter Type being used; and two to set the values for the other to empty strings.
g. Create the TFTP Root directory and put some stuff in it. I use "C:\TFTP".
Well. Where did that "pxelinux.0" thing come from? As said, I haven't had much luck with PXE booting in VirtualBox. However, I can load up a nice boot menu courtesy of PXELINUX.
Download the SYSLINUX PROJECT from http://syslinux.zyto...ex.php/Download, and unpack the files.
From the SYSLINUX folder, copy the file "\core\pxelinux.0" to the TFTP Root directory.
From the SYSLINUX folder, copy the file "\com32\menu.c32" to the TFTP Root directory.
In the TFTP Root directory, create a new folder named "pxelinux.cfg" (a folder, not a file).
Open the "pxelinux,cfg" folder and create a new text document in it.
Copy and paste the following into the document.
DEFAULT MENU.C32
PROMPT 0
LABEL pmagic_RAM
MENU LABEL ^Q) Boot Parted Magic in RAM
LINUX /PMAGIC/BZIMAGE
INITRD /PMAGIC/INITRAMFS
APPEND edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 sleep=0 loglevel=0 keymap=us
LABEL pmagic_LiveMedia
MENU LABEL ^R) Boot Parted Magic with LIVE MEDIA
LINUX /PMAGIC/BZIMAGE
INITRD /PMAGIC/INITRAMFS
APPEND edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 sleep=0 loglevel=0 keymap=us livemedia
LABEL pmagic.iso
MENU LABEL ^S) Boot Parted Magic ISO using memdisk
LINUX /MEMDISK
APPEND iso
INITRD /PMAGIC-4.6.ISO
LABEL hdt
MENU LABEL ^T) Boot Hardware Detection Tool (hdt.c32)
KERNEL HDT.C32
LABEL hdt.iso
MENU LABEL ^U) Boot Hardware Detection Tool ISO using memdisk
LINUX /MEMDISK
APPEND iso
INITRD /HDT-0.3.5.ISO
Close and save the document with the name "default" (no file extension).
The directory structure should look like this:
C:\TFTP ¦ menu.c32 ¦ pxelinux.0 ¦ +---pxelinux.cfg defaultSo, everything right? TFTP directory set up, VirtualBox pointing at the TFTP directory and the BootFile? Got the right Virtual Network Adapter Type? Network on top of the Boot Order?
Fire up VirtualBox and start the Virtual Machine.
In a second or two, there should be a nice blue menu with five labels. Use up/down arrows to select one of the labels. Press "enter" and voila! What? Nothing? Well, I did say that I hadn't had much luck.
OK. So... What's all that "Parted Magic" stuff about? Try it! But do remember that I can't get it to work in VirtualBox. Good luck!
For the first two menu-label entries, download Parted Magic PXE (pmagic-pxe-4.6.1.zip) by following the links from http://partedmagic.com/download.html
Unpack the folders and files from Parted Magic PXE. Copy the "\boot\" and "\pmagic\" folders to the TFTP root directory.
For the third menu-label entry, download Parted Magic (pmagic-4.6.iso.zip) by following the links from http://partedmagic.com/download.html
Unpack the ISO file from Parted Magic, and copy the ISO to the TFTP root directory.
Also required is the very latest "memdisk", which can be downloaded in the "memdisk.zip" attached to the following post:
http://www.boot-land...?...ost&p=70059 ("ISO mapping with MEMDISK is possible now")
Unpack the "memdisk" file (no file extension), and copy it to the TFTP root directory.
The directory structure should now look like this:
C:\TFTP ¦ memdisk ¦ menu.c32 ¦ pmagic-4.6.iso ¦ pxelinux.0 ¦ +---boot ¦ +---syslinux ¦ chain.c32 ¦ hdt.c32 ¦ mbr.bin ¦ memdisk ¦ memtest ¦ message.txt ¦ message2.txt ¦ message3.txt ¦ message4.txt ¦ message5.txt ¦ modules.alias ¦ modules.pcimap ¦ pci.ids ¦ reboot.c32 ¦ splashpm.png ¦ syslinux ¦ syslinux.cfg ¦ syslinux.exe ¦ vesamenu.c32 ¦ +---pmagic ¦ bzImage ¦ initramfs ¦ +---pxelinux.cfg default
OK! Fire up VirtualBox and start the Virtual Machine. In a second or two, the menu will appear. Use the up/down arrows to select a menu label and press "enter".
What happened? ... ... For the first two menu-label entries:
"Loading /PMAGIC/BZIMAGE......" OK
"Loading /PMAGIC/INITRAMFS......" After 524 dots, network activity ceases and the cursor sits there for a few moments (minute or so).
"Boot failed: Press a key to retry, or wait for reset......"
For the third menu-label entry the end result is the same: "Loading /MEMDISK..", "Loading /PMAGIC-4.6.ISO...", "Boot failed...".
Oh! Well! What about the "Hardware Detection Tool" - the fourth and fifth menu-label entries? ... ...
From the unpacked SYSLINUX PROJECT folder, copy the file "\com32\hdt\hdt.c32" to the TFTP root directory.
Download the "Bootable ISO Image" (hdt-0.3.5.iso) from http://hdt-project.o...#Currentrelease and save it to the TFTP root directory.
The final directory structure should look like this:
C:\TFTP ¦ hdt-0.3.5.iso ¦ hdt.c32 ¦ memdisk ¦ menu.c32 ¦ pmagic-4.6.iso ¦ pxelinux.0 ¦ +---boot ¦ +---syslinux ¦ chain.c32 ¦ hdt.c32 ¦ mbr.bin ¦ memdisk ¦ memtest ¦ message.txt ¦ message2.txt ¦ message3.txt ¦ message4.txt ¦ message5.txt ¦ modules.alias ¦ modules.pcimap ¦ pci.ids ¦ reboot.c32 ¦ splashpm.png ¦ syslinux ¦ syslinux.cfg ¦ syslinux.exe ¦ vesamenu.c32 ¦ +---pmagic ¦ bzImage ¦ initramfs ¦ +---pxelinux.cfg default
Give the Virtual Machine one last go. What happens when either the fourth or fifth menu entries are selected?
Finally something works! ... ... Thank you very much. ... ...
I s'pose that the really good news is that everything, apart from the pmagic.iso, works in a real (non-virtual) PXE-boot environment.
But for that to work, tftpd32 or another TFTPD/DHCP server needs to be properly configured and running on the server machine. Another story...
Regards