Search the Community
Showing results for tags 'ipxe'.
-
You really want: to boot your system in RAM and from the network, and maybe want to: unplug your internal noisy HDD / SSD SATA stuff, unplug your noisy USB storage to, disable those items in bios, manage your .VHD from the network, ...and, because of a slower but funny boot sequence, wait longer than usual before you can listen to your favorite music, so you could try this experience: "Booting RAMDisk via PXE + TFTP + IPXE + iSCSI + VHD Guide": Scenario: The system, because of the bios settings, try to connect via PXE / Network interface / DHCP to a TFTP Server. TFTP Server serve a grldr (grub4dos) and via a menu.lst map the IPXE in RAM. IPXE connect the system to an iSCSI target, load another grldr and, via another menu.lst, map and boot the .VHD into memory. Let's get started: Implement PXE + TFTP For example, with a Synology NAS DS918+ (another TFTP server will also do the job but I have not try another one): Follow this guide: https://www.synology.com/en-global/knowledgebase/DSM/tutorial/Management/How_to_implement_PXE_with_Synology_NAS The “TFTP root folder” should contain the following files: menu.lst : For example, under Windows, this file can be created via an editor like NOTEPAD and should contain the following lines: pxe detect 1432 menu.lst color blue/green yellow/red white/magenta white/magenta timeout 0 default /default title IPXE map --top --mem (pd)/ipxe.iso (0xff) map --hook chainloader (0xff) title commandline commandline title quit quit title reboot reboot title halt halt grldr This file is available at: http://dl.grub4dos.chenall.net/grub4dos-0.4.6a-2018-12-23.7z ipxe.iso This file is available at: http://boot.ipxe.org/ipxe.iso Prepare the bios: To access the bios, power on your machine and, on the keyboard, press multiple times the key documented in the motherboard user manual to display the bios menu: For example, for a Gigabyte Z270x-UD3 motherboard, the key to press is: F12 Enter bios settings Enable the PXE boot option: For example, for a Gigabyte Z270x-UD3 motherboard, under the bios tab, the option is named: LAN PXE Boot Option ROM Implement IPXE + iSCSI For example, with a Synology NAS DS918+ (I also successfully try the “KernSafe: iSCSI SAN for Mac OS X”, product available at: https://www.kernsafe.com/product/iscsi-san-macos.aspx) Follow this guide: https://www.synology.com/en-global/knowledgebase/DSM/tutorial/Virtualization/How_to_use_the_iSCSI_Target_service_on_Synology_NAS To store files on the iSCSI target that has just been created: For example with Windows 10: Follow this guide: https://www.synology.com/en-global/knowledgebase/DSM/tutorial/Virtualization/How_to_use_iSCSI_Targets_on_a_Windows_Server With “grubinst_gui”, update the boot sector to boot with GRLDR. Grubinst/grubinst_gui are available at: https://sites.google.com/a/rmprepusb.com/www/documents/rmprepusb-beta-versions/grubinst Windows binaries.7z Run grubinst_gui : Disk: select the iSCSI/drive File system: AutoDetect Partition: Whole disk (MBR) Version: 0.4.6a Boot File : GRLDR Keep the rest as is to “install” With Windows Explorer, put the following files on the drive created above for the Synology iSCSI target: A “.vhd” image of the system that you want to boot. For example a file named “ Win2019Core.vhd” (mine is about 10GB) Such a file can be build by following the procedure “RAMdisk with Windows Server 2016/2019 - Configuration Guide” By Felipe Rolim available at: menu.lst : For example, under Windows, this file can be created via an editor like NOTEPAD and should contain the following lines: color blue/green yellow/red white/magenta white/magenta timeout 0 default /default title WINDOWS find --set-root --ignore-floppies /Win2019Core.vhd map --top --mem /Win2019Core.vhd (hd1) map --hook root (hd1,0) chainloader (hd1,0)/bootmgr title commandline commandline title quit quit title reboot reboot title halt halt grldr This file is available at: http://dl.grub4dos.chenall.net/grub4dos-0.4.6a-2018-12-23.7z Boot and try it At IPXE step, press CTRL+B and type (values are for example): dhcp (to connect to the network) sanboot iscsi:192.168.1.10:::1:iqn:s.a (to boot on the iSCSI target defined above) Wait a while... To be noted that, via an out-of-the-box UBUNTU VM, you can easily build your own "ipxe.iso" to embedded the lines above as a script (thereupon no more boring CTRL+B) : Via for example Parallels, start a UBUNTU VM (values are for example): Run: Terminal Type: git clone git://git.ipxe.org/ipxe.git Type: cd ipxe/src Type: make bin/ipxe.iso EMBED=mescript_synology.ipxe In this case, “mescript_synology.ipxe” file must exist in Ubuntu under home / ipxe / src and should contain the following lines (the first lines are to avoid DHCP latency): #!ipxe set net0/ip 192.168.1.97 set net0/netmask 255.255.255.0 set net0/gateway 192.168.1.1 ifopen net0 sanboot iscsi:192.168.1.10:::1:iqn:s.a Enjoy!