0

I am installing Windows 10 OS through Ubuntu based Clonezilla Server in PXE UEFI mode. I need to add the windows os provision into the server using grub.cfg for clients deployment. I added the windows 10 iso extracted directory in tftpboot/nbi_image/win_files directory.

my tftp root directory is "/tftpboot/nbi_image".

Now I need to edit the grub files in the tftpboot/nbi_image/grub-efi.cfg/grub.cfg, this is my entry:

menuentry "Windows 10 UEFI" {
     insmod part_msdos
     insmod chain
     chainloader /win_files/bootx64.efi
}

Error: invalid EFI file path.

The bootx64.efi is the file from clonezilla server setup. If any other file is needed, from where I should get that?

Since this has been failing every time. So, for this I want to understand how this boot sequence goes? In what order, what files are being read from windows installation files present in its ISO?

Dr. Essen
  • 121
  • 8

2 Answers2

1

I have absolutly no confidence that the default windows EFI bootloader is able to boot from a PXE/tftp system but there are a few thing that need to be verified first:

  • the module msdos_part is supposed to read a local drive msdos-type partition (opposed to a gpt type partition), since you are net-booting this has no business to do here

  • Unix is case sensitive, win_files and Win_files isn't the same folder

  • there is no bootx64.efi on the root of the windows 10 iso i have, there is however a bootmgr.efi there, and a bootx64.efi in efi/boot/

  • What is your TFTP root ? if it is '/tftboot' then your chainloader should probably be something more like

    • chainloader nbi_image/win_files/bootmgr.efi or
    • hainloader nbi_image/win_files/efi/boot/bootmgr.efi
silmaril
  • 471
  • 3
  • 9
  • Edited the question and typos. In that menuentry, where should I keep the winpe.iso image? – Dr. Essen Aug 06 '18 at 03:35
  • why are you talking at the same time of clonezilla and of windows 10 iso images ?? – silmaril Aug 06 '18 at 08:39
  • I think you didn't get the question! The **clonezilla** server is **ubuntu** based and Windows ISO (**winpe.iso** say). I need to use for installation to different client machines. I hope you know how the OSs are deployed on Legacy BIOS mode using **PXE** install. If you understand the menuentries of **pxelinux.cfg/default** file for windows installation then you might understand the complete question which is based on UEFI mode. – Dr. Essen Aug 06 '18 at 08:58
  • What i don't get is how you expect clonezilla, a system used to deploy cloned disk level images (and not installation images) to work with WinPE the windows installer iso... – silmaril Aug 06 '18 at 09:37
  • because it seems you never tried! See this entry in legacy mode in **default** file, and it works like a charm. `label win10rs464i # MENU DEFAULT #MENU HIDE MENU LABEL Install Win10-RS4 KERNEL memdisk IPAPPEND 1 APPEND iso raw initrd=windows/win10rs4.iso TEXT HELP * Install Win10RS4 64 bit FROM WinPE ISO ENDTEXT ` In case of Ubuntu, we mount and take all the files in the iso and place it in **nfsroot** directory. but in case of Windows, we provide the iso (in legacy mode) but don't know how to do in UEFI mode. – Dr. Essen Aug 06 '18 at 09:42
  • For reference: [DRBL installation](https://drbl.org/installation/reference.php) and [Clonezilla setup](https://brezular.com/2016/09/26/clonezilla-server-edition-installation-on-ubuntu/) – Dr. Essen Aug 06 '18 at 09:49
  • Your example load the Windows iso in memory and boot using the Microsoft bootloader on the CD... You keep talking of using the clonezilla UEFI boot system (bootx64.efi), which might be capable of booting Linux (DRBL is for *Linux*) in a diskless mode, but certainly not Windows... – silmaril Aug 09 '18 at 09:50
  • Clonezilla package comes with DRBL setup and it has provision for Windows installation also using winpe iso image and I have performed successfully from the linux machine where DRBL is configured. – Dr. Essen Aug 09 '18 at 11:35
  • I think you might be lost between windows and linux! Sorry but your explanation doesn't seem clear to me. For more clarificaition, follow this link. [Install Windows 7’ over 'PXE Network Boot Server'](https://www.tecmint.com/configure-pxe-server-to-install-windows-on-centos/) Now, my requirement is complete same setup but in UEFI mode. The difference comes here in UEFI mode is the PXE menu is configured through **grub.cfg** rather than **pxelinux.cfg/default** – Dr. Essen Aug 09 '18 at 11:39
  • I am not lost at all, you are mixing things that aren't related. The ONLY way to start Windows install over the network is for the bootloader to load the ISO from the network, create a fake drive of it and switch boot over it, this is done via the "MEMDISK" package of syslinux: https://www.syslinux.org/wiki/index.php?title=MEMDISK "MEMDISK is meant to allow booting *legacy* operating systems." You can use syslinux over UEFI and try using the MEMDISK package, but it will probably start windows installation in legacy mode. https://www.syslinux.org/wiki/index.php?title=Install#UEFI – silmaril Aug 21 '18 at 08:12
  • If you want to do an UEFI installation of windows you will need Microsoft dedicated services which make use of a special UEFI program which understand being started from the network: wdsmgfw.efi. and if i read correctly, specialy crafted WinPE images with network support active: http://henkhoogendoorn.blogspot.com/2014/03/pxe-boot-files-in-remoteinstall-folder.html https://social.technet.microsoft.com/Forums/en-US/346a40db-764a-46c2-829b-678a31b608d4/pxe-boot-with-uefi-wds-not-sending-winpe-wim?forum=configmanagerosd – silmaril Aug 21 '18 at 08:19
1

I figured out the solution:

sudo vim /etc/tftp.remap

Add the following lines:

# Map the paths
r ^\\boot\\ EFI/winpe/Boot/
r ^\\Boot\\ EFI/winpe/Boot/
r ^\\sources\\ EFI/winpe/sources/
# Convert backslashes to slashes
rg \\ /

Open tftp-hpa file:

sudo vim /etc/default/tftpd-hpa

Modify accordingly:

TFTP_OPTIONS="-vvv --secure --ipv4 --map-file /etc/tftpd.remap"

Run:

sudo service tftpd-hpa restart

dhcp configuration:

 sudo vim /etc/dhcpd.conf

Modify accordingly:

if option arch = 00:06 {
    filename "bootia32.efi";
} else if option arch = 00:07 {
    filename "EFI/grub2/grubnetx64.efi";
    #filename "bootx64.efi";

The grubnetx64.efi is from the archive link: Ubuntu Archive.

sudo mkdir grub
cd grub/
sudo vim grub.cfg

Add the following line:

configfile grub-efi.cfg/grub.cfg

Edit the file:

sudo vim grub-efi.cfg/grub.cfg

Add:

menuentry "Windows 10 RS4" --id win10rs4 {
  echo "Entering windows installation environment..."
  insmod chain
  insmod fat
  insmod part_gpt
  chainloader /EFI/Boot/bootx64.efi
}

The sequence of files to execute (including PXE menu selection) is:

grubnetx64.efi -> bootx64.efi -> BCD -> boot.sdi -> winpe.wim

Dr. Essen
  • 121
  • 8
  • I am trying to get sometime similar implemented and seems like you have managed to do it. Do you have step-by-step blog on how its done. – MMaz Sep 16 '21 at 15:18