Jump to content











Photo

Wimboot from PxeLinux setup

wimboot pxeboot pxelinux ipxe linux debian

Best Answer CFNZ_Techie , 17 November 2014 - 03:01 AM

Hi Again guys,

 

 

I have fixed the issue by just changing up a few things and using the iPXE convention.  I have nested scripts to manage the related OS so I will just start with the Windows 7 cfg first as per below code:

windows7.cfg

LABEL Windows7Lab
	MENU DEFAULT 
	MENU LABEL ^1 Lab Windows 7
		kernel ipxe.lkrn dhcp && chain http://192.168.1.9/pxe/lab.php?mac=${net0/mac}

This is used through the tftp to call kernel from ipxe and makes a change to the http server for the lab windows 7 wim from lap.php

 

lab.php

#!ipxe

kernel wimboot bootfile=http://192.168.1.9/pxe/lab.php 

initrd lab/bootmgr.exe		bootmgr.exe
initrd lab/boot/bcd		bcd
initrd lab/boot/boot.sdi	boot.sdi
initrd lab/sources/boot.wim     boot.wim

boot

as you can see  I changed the layout to match the iPXE initrd calls one below the other and I am still using wimboot 2.4 here

 

There is still a slightly small issue, when I try move "lab.php" to a new location it still shows the "reboot" option which I will try figure out, as I don't want all the "<<names>>.php" to be in the default pxe folder.

If you have any information for me on this it will be much appreciated, otherwise once again thank you all for your help you have been amazing.

Go to the full post


  • Please log in to reply
11 replies to this topic

#1 CFNZ_Techie

CFNZ_Techie

    Newbie

  • Members
  • 14 posts
  •  
    New Zealand

Posted 13 November 2014 - 02:45 AM

Hi All,

 

I have a pxelinux setup here in the office for multiple types of booting ranging from linux installs, to HDD clone software, to DOS based disk wipes.

 

The server is running debian with tftpd-hpa, dnsmasq, samba and syslinux.  So far all of the PXE boots that I have been asked to get working are all working except for Windows installs.

I did some digging and found that there is "wimboot" from http://ipxe.org/wimboot which some people seem to have gotten to work.

I have noticed a few similar posts on here about getting it working with the pxelinux menu.  My problem is I have a couple issues I am facing.

 

  1. I am running off of syslinux 4 lib files.  This, I think, hampers the fix that sha0 (from iPXE) has made, and the reason I am using 4 is becuase when I try and use syslinux 5 or 6 (the latest) the PXE Boot tells me x.c32 is not a valid COM32R imag (where x is either linux, vesamenu, menu etc).
  2. When using version 4 with the most appropriate syntex I get "kernel load failure insufficient memory"
  3. If i try using the hack to run it using "bootmgr.exe" I get back an error saying "can't find bootmgr.exe", which is in the location I specified.

Ok, now that we have that out the way some background on the server:

So currently my folders are a bit hey wire trying to follow countless guides trying to follow their version of "working".

 

My server is "tftpboot" i have a folder called "pxelinux.cfg" which hosts the file called "default"

All other folders in there currently are irrelevant. However my working server looks like this:

├───pxelinux.cfg
│   ├───boot
│   │   ├───clones
│   │   ├───diskwipes
│   │   │   └───dban
│   │   ├───linux
│   │   │   └───debian
│   │   │       └───i386
│   │   │           └───boot-screens
│   │   │               ├───kde
│   │   │               ├───lxde
│   │   │               └───xfce
│   │   ├───memdisk
│   │   │   └───memdisk
│   │   ├───memtest
│   │   └───windows7
│   ├───configs
│   └───splash
└───test

So whether my default has the below (version4 being the version of syslinux)

MENU TITLE Install Boot Menu
   LABEL Version4
	MENU LABEL Version4
 	COM32 /libs/v4/linux.c32 wimboot/v2.4/wimboot
 	APPEND wimboot initrdfile=bootmgr,boot/bcd,boot/boot.sdi,sources/boot.wim

or

LABEL IPXE.KRN
    MENU label iPXEkernel
    KERNEL ipxe.krn
    initrd wim-boot.ipxe

where wimboo-ixpe is:

#!ipxe
dhcp net0 && echo IP address: ${net0/ip} ; echo Subnet mask: ${net0/netmask}
    kernel wimboot
    initrd boot/bootmgr bootmgr
    initrd boot/bcd bcd
    initrd boot/boot.sdi boot.sdi
    initrd sources/boot.wim boot.wim
    boot

or lastly if the script looks like this:

MENU TITLE Install Boot Menu
   LABEL Version4
	MENU LABEL Version4
 	COM32 /libs/v4/linux.c32 wimboot/v2.4/wimboot
 	APPEND wimboot initrdfile=bootmgr@bootmgr,boot/bcd@bcd,boot/boot.sdi@boot.sdi,sources/boot.wim@boot.wim

So to sum this up. 

  • I can't use the latest syslinux data for some reason;
    • version 5 and 6 end up with invalid COM32R images.
    • this was the version that fixed wimboot I believe
  • With the correct syntex I get insufficient memory
  • I can't get wimboot to run correctly using "initrdfile".

 

 



#2 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 13 November 2014 - 08:13 AM

Hi CFNZ_Techie,

 

A couple of questions if I may :

 

-what happens when you pxe boot directly from ipxe? (i.e not chainloading from ppxelinux)

-where does your bootmgr come from (latest versions are not supported by wimboot) ?

-how big is your wimboot file? i myself usually wimboot winpe files (below 512mb)

 

Regards,

Erwan



#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 November 2014 - 02:03 PM

Maybe useful, maybe not :unsure: some news from the grub4dos good guys:

 

http://reboot.pro/to...imboot-support/

 

:duff:

Wonko



#4 CFNZ_Techie

CFNZ_Techie

    Newbie

  • Members
  • 14 posts
  •  
    New Zealand

Posted 13 November 2014 - 08:24 PM

-what happens when you pxe boot directly from ipxe? (i.e not chainloading from ppxelinux)

-where does your bootmgr come from (latest versions are not supported by wimboot) ?

-how big is your wimboot file? i myself usually wimboot winpe files (below 512mb)

 

- I haven't actually tried booting directly from ipxe, can't find where to configure it for this.  The iPXE instructions are pretty poorly explained.

- I have tried 2 versions of bootmgr.

  • First one was using the WIAK kit and following the wim creation using bcd edit of my windows computer.
  • Second from the installation disk of windows 7 (which is a good couple years old).

 

Maybe useful, maybe not :unsure: some news from the grub4dos good guys:

http://reboot.pro/to...imboot-support/

 

Thanks Wonko, I will take a look at this today.

 

Also just an update; I have made a few changes to some of the code and I get the below issues:

LABEL 1
	MENU LABEL ^1 Wimboot
	COM32 /libs/v4/linux.c32 wimboot/wimboot/v2.0/wimboot
	APPEND wimboot initrd=bootmgr.exe,boot/bcd,boot/boot.sdi,sources/boot.wim

LABEL 2
	MENU LABEL ^2 Wimboot
	COM32 /libs/v4/linux.c32 wimboot/wimboot/v2.4/wimboot
	APPEND initrd=bootmgr@bootmgr,boot/bcd@bcd,boot/boot.sdi@boot.sdi,sources/boot.wim@boot.wim

LABEL 3
	MENU LABEL ^3 Wimboot
	COM32 /libs/v4/linux.c32 wimboot/v2.4/wimboot
	APPEND initrdfile=bootmgr@bootmgr,boot/bcd@bcd,boot/boot.sdi@boot.sdi,sources/boot.wim@boot.wim
	
LABEL 4
	MENU LABEL ^4 Wimboot
	COM32 /libs/v4/linux.c32 wimboot/wimboot/v2.4/wimboot
	#KERNEL wimboot/wimboot/v2.4/wimboot
	INITRDFILE /bootmgr.exe			bootmgr.exe
	INITRDFILE /boot/bcd			bcd
	INITRDFILE /boot/boot.sdi	boot.sdi
	INITRDFILE /sources/boot.wim boot.wim
	
LABEL 5
       MENU label iPXE-^Kernel
	   COM32 /libs/v4/linux.c32
       KERNEL /wimboot/iPXE/ipxe.lkrn
       initrd /wimboot/wim-boot.ipxe
	   
LABEL 6
	MENU LABEL iPXE-^Wimboot
	KERNEL wimboot/iPXE/ipxe.lkrn
	COM32 /libs/v4/linux.c32 wimboot/wimboot/v2.4/wimboot
	APPEND initrd=bootmgr@bootmgr,boot/bcd@bcd,boot/boot.sdi@boot.sdi,sources/boot.wim@boot.wim
  • Label 1: FATAL: Could not extract initrd files. BAD CPIO Magic
    This occurs after wimboot in similar screen as:
    wimboot.png?cache=
  • Label 2: Insufficient Memory
  • Label 3: Insufficient Memory
  • Label 4: No bootmgr.exe
  • Label 6: Insufficient Memory

I've left out Label 5 because it needs explaining.

It seems to go through to the screen shows:

Loading /wimboot/iPXE/ipxe.lkrn...
Loading /wimboot/wim-boot.ipxe...ready.
iPXE initialising devices...OK


iPXE 1.0.0+git-....(etc)..... -- Open source Network Boot Firmware -- http://ipxe.org
Features VLAN iSCSI HTTP DNS TFTP AoE SRP ELF MBOOT PXE bzImage Menu PXEXT
Waiting for link-up on net0....


Then it clears screen and says press any button to restart



#5 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 13 November 2014 - 08:56 PM

1-use ipxe-undionly.kpxe to start with : that should support most/all network drivers.

 

2-use the below ipxe script :

 

#!ipxe
kernel ${boot-url}/wimboot
initrd ${boot-url}/BOOTMGR.exe      BOOTMGR
initrd ${boot-url}/BOOT/BCD         BCD
initrd ${boot-url}/BOOT/BOOT.SDI    BOOT.SDI
initrd ${boot-url}/SOURCES/BOOT.WIM BOOT.WIM
boot
 
3-i have booted all my winpe so far with success using this method
 
some remarks :
 
-You may want to try removing your hd drive if you have one since I sometimes experienced conflicts (on some laptops) between the emulated 0x80 drive and wimboot.
 
-how much memory do you have? how big is your wim file?
 
-you can load ipxe kernel and pass it a script this way (from syslinux) :
label ipxe
  menu label iPXE loading script.ipxe
  kernel ipxe.lkrn
  append initrd=script.ipxe

  • CFNZ_Techie likes this

#6 CFNZ_Techie

CFNZ_Techie

    Newbie

  • Members
  • 14 posts
  •  
    New Zealand

Posted 14 November 2014 - 04:09 AM

Hi  erwan, thanks for your amazing response (&& times) so far,

 

1-use ipxe-undionly.kpxe to start with : that should support most/all network drivers.

 

 

I have managed to do this today but still with the same result of "Reboot" at the end.

 

 

2-use the below ipxe script :

 

#!ipxe
kernel ${boot-url}/wimboot
initrd ${boot-url}/BOOTMGR.exe      BOOTMGR
initrd ${boot-url}/BOOT/BCD         BCD
initrd ${boot-url}/BOOT/BOOT.SDI    BOOT.SDI
initrd ${boot-url}/SOURCES/BOOT.WIM BOOT.WIM
boot

 

I have managed to do this as well, with a result of "reboot"

 

-how much memory do you have? how big is your wim file?
 
-you can load ipxe kernel and pass it a script this way (from syslinux) :
label ipxe
  menu label iPXE loading script.ipxe
  kernel ipxe.lkrn
  append initrd=script.ipxe

 

- unfortunately my test machines have 500 MB RAM on them, however I have used one of my main W7 machines which has 4GB. And Same result

- Yes I have tried this however it doesn't like it for some odd reason.

 

Please also not I think an issue on my end (being that I am still new to all of this, as it was assigned to me as a side project) is that I have:

  1. completed the pxelinux server as per my first post,
  2. > then added wimboot to install from wims,
  3. > then added iPXE to it to try make that work
  4. > then used http to try get iPXE working smoother, as all the posts relate to http downloads (being that it is faster)

So I think I need to be pointed to a guide perhaps with step by step that I can compare, sorry about this, like I mentioned before I am new to this and this is my first linux server I have set up.



#7 ady

ady

    Frequent Member

  • Advanced user
  • 165 posts

Posted 14 November 2014 - 04:38 AM

FWIW...

Regarding Syslinux version 5+, read:
http://http://www.sy...roblems#Modules
and through its several subsections and link(s), which eventually will point you to:
http://www.syslinux....Library_modules

Regarding the PXELINUX syntax for wimboot...

Try:

LABEL winpe
MENU LABEL WinPE
COM32 path/to/linux.c32 path/to/wimboot
APPEND initrdfile=path/to/winpe/bootmgr.exe,path/to/winpe/bcd,path/to/winpe/boot.sdi,path/to/winpe/boot.wim

If it fails, then try:

LABEL winpe
MENU LABEL WinPE
COM32 path/to/linux.c32
APPEND path/to/wimboot initrdfile=path/to/winpe/bootmgr.exe,path/to/winpe/bcd,path/to/winpe/boot.sdi,path/to/winpe/boot.wim

If it fails, then try:

LABEL winpe
MENU LABEL WinPE
LINUX path/to/wimboot
APPEND initrdfile=path/to/winpe/bootmgr.exe,path/to/winpe/bcd,path/to/winpe/boot.sdi,path/to/winpe/boot.wim

Note that the path separator is a slash "/", not backslash "\".
Note that the paths shall not include space characters.
In the above examples I used relative notation for paths (no initial slash "/")
The "APPEND initrdfile=" keyword was introduced in Syslinux 4.06.
 

The "initrdfile=" option allows you to load a file and encapsulate it
as though you had used 'cpio -o -H newc', and pass the resulting blob
alongside the other items that might have been specified with
"initrd=" or "initrd+=".

This is useful for taking a raw file from the Syslinux booted-from
filesystem and sending it through to Linux' rootfs via the initramfs
scheme.

This option can be specified more than once, and can take a
comma-separated list of files.

Besides use for Linux, this implementation also allows Syslinux users
to boot Michael Brown's 'wimboot' kernel and be able to pass it the
raw files it needs in order to boot a Microsoft Windows PE .WIM.


One can specify the desired path/filename for the file to have within
the rootfs by using the at (@) sign, as in:

initrdfile=foo@/goes/to/foo

One can also specify multiple files, separated by commas, such as:

initrdfile=foo,bar@/somewhere/bar,baz

One can also use this option multiple times, as in:

initrdfile=foo,bar initrdfile=baz@/somewhere/baz


Regards,
Ady.



#8 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 14 November 2014 - 07:51 AM

Hi  erwan, thanks for your amazing response (&& times) so far,

 

 

I have managed to do this today but still with the same result of "Reboot" at the end.

 

 

I have managed to do this as well, with a result of "reboot"

 

- unfortunately my test machines have 500 MB RAM on them, however I have used one of my main W7 machines which has 4GB. And Same result

- Yes I have tried this however it doesn't like it for some odd reason.

 

Please also not I think an issue on my end (being that I am still new to all of this, as it was assigned to me as a side project) is that I have:

  1. completed the pxelinux server as per my first post,
  2. > then added wimboot to install from wims,
  3. > then added iPXE to it to try make that work
  4. > then used http to try get iPXE working smoother, as all the posts relate to http downloads (being that it is faster)

So I think I need to be pointed to a guide perhaps with step by step that I can compare, sorry about this, like I mentioned before I am new to this and this is my first linux server I have set up.

 

If you are new to this, I would recommend to start "easy".

By that I meant drop the menu part, drop the http part, etc.

 

Start with :

pxe (legacy bios)->\pxeboot.n12 (from windows install dvd)-> \bootmgr.exe -> boot\bcd (pointing to winload.exe) -> sources\boot.wim.

 

And before that, test your winpe from a usb stick on your target computer.

 

And to complete, forget your 512mb computers : you are asking for troubles there for a beginner : you want a "trouble" free computer to start with.



#9 CFNZ_Techie

CFNZ_Techie

    Newbie

  • Members
  • 14 posts
  •  
    New Zealand

Posted 17 November 2014 - 01:27 AM

Hi Ady,

 

Thanks for you help on this, unfortunately these don't see to work as you have used them, the first 2 I get "unrecognised arguments initrd=....." and the last I get "unrecognised argument BOOT_IMAGE=wimboot"

The first two I have to remove "initrdfile" and use "initrd" and then I get "inusfficient memory" or alternately when I use the INITRDFILE=item@itemname convention I get the "insufficient memory there too".

 

LABEL winpe
MENU LABEL WinPE
COM32 path/to/linux.c32 path/to/wimboot
APPEND initrdfile=path/to/winpe/bootmgr.exe,path/to/winpe/bcd,path/to/winpe/boot.sdi,path/to/winpe/boot.wim
LABEL winpe
MENU LABEL WinPE
COM32 path/to/linux.c32
APPEND path/to/wimboot initrdfile=path/to/winpe/bootmgr.exe,path/to/winpe/bcd,path/to/winpe/boot.sdi,path/to/winpe/boot.wim

If it fails, then try:

LABEL winpe
MENU LABEL WinPE
LINUX path/to/wimboot
APPEND initrdfile=path/to/winpe/bootmgr.exe,path/to/winpe/bcd,path/to/winpe/boot.sdi,path/to/winpe/boot.wim

 

Thanks again for your time Ewen,

If you are new to this, I would recommend to start "easy".

By that I meant drop the menu part, drop the http part, etc.

 

Start with :

pxe (legacy bios)->\pxeboot.n12 (from windows install dvd)-> \bootmgr.exe -> boot\bcd (pointing to winload.exe) -> sources\boot.wim.

 

And before that, test your winpe from a usb stick on your target computer.

 

And to complete, forget your 512mb computers : you are asking for troubles there for a beginner : you want a "trouble" free computer to start with.

 

I took your advice and used my work pc with 4GB ram on it and same thing.

Honestly I believe this is something wrong with the version of syslinux and/or wimboot I have for the following reasons:

 

I have been testing iPXE with the below code:

## IN DEFAULT
LABEL fog2
    MENU LABEL ^2 Fog
    kernel ipxe.lkrn dhcp && chain http://192.168.1.9/tftpboot/ipxe.php?mac=${net0/mac}

## IN IPXE.PHP
<?PHP
foreach($_GET as $k=>$v) $$k=$v;
echo "#!ipxe
set 209:string pxelinux.cfg/$uuid.cfg
set 210:string http://192.168.1.9:80/tftpboot
chain \${210:string}pxelinux.0 ||
chain http://192.168.1.9/tftpboot/boot2.php ||
shell
";
?>

## IN BOOT2.PHP
#!ipxe

kernel memdisk bootfile=http://192.168.1.9/tftpboot/boot2.php initrd=mtl.img
initrd mtl.img
#kernel v2.4/wimboot bootfile=http://192.168.1.9/tftpboot/boot2.php initrd=bootmgr.exe,boot/bcd,boot/boot.sdi,sources/boot.wim
#initrd bootmgr.exe,boot/bcd,boot/boot.sdi,sources/boot.wim
prompt 
boot

This loads MTL (which is my media tools cloning software) perfectly fine.  I can't use wimboot because it doesn't recognise img files.

When I use the same format as is quoted out by the '#' for the wim files, iPXE just wants to reboot. As you can see I'm using v2.4 wimboot for this, and wimboot v2.0 doesn't really work either, just another error message.

 

My honest thoughts are that the syslinux files I am using do not working entirely well with wimboot.  Is there anyway I could be sent a working "linux.c32" file from some one to use or any other testing you could advise me on?



#10 CFNZ_Techie

CFNZ_Techie

    Newbie

  • Members
  • 14 posts
  •  
    New Zealand

Posted 17 November 2014 - 03:01 AM   Best Answer

Hi Again guys,

 

 

I have fixed the issue by just changing up a few things and using the iPXE convention.  I have nested scripts to manage the related OS so I will just start with the Windows 7 cfg first as per below code:

windows7.cfg

LABEL Windows7Lab
	MENU DEFAULT 
	MENU LABEL ^1 Lab Windows 7
		kernel ipxe.lkrn dhcp && chain http://192.168.1.9/pxe/lab.php?mac=${net0/mac}

This is used through the tftp to call kernel from ipxe and makes a change to the http server for the lab windows 7 wim from lap.php

 

lab.php

#!ipxe

kernel wimboot bootfile=http://192.168.1.9/pxe/lab.php 

initrd lab/bootmgr.exe		bootmgr.exe
initrd lab/boot/bcd		bcd
initrd lab/boot/boot.sdi	boot.sdi
initrd lab/sources/boot.wim     boot.wim

boot

as you can see  I changed the layout to match the iPXE initrd calls one below the other and I am still using wimboot 2.4 here

 

There is still a slightly small issue, when I try move "lab.php" to a new location it still shows the "reboot" option which I will try figure out, as I don't want all the "<<names>>.php" to be in the default pxe folder.

If you have any information for me on this it will be much appreciated, otherwise once again thank you all for your help you have been amazing.



#11 CFNZ_Techie

CFNZ_Techie

    Newbie

  • Members
  • 14 posts
  •  
    New Zealand

Posted 03 December 2014 - 07:53 PM

P.S Note update on final answer:

I have identified where the issue of the "Reboot" black screen lies.

#!ipxe

kernel wimboot bootfile=http://192.168.1.9/pxe/lab.php

initrd windows/lab/bootmgr.exe        bootmgr.exe
initrd windows/lab/boot/bcd           bcd
initrd windows/lab/boot/boot.sdi      boot.sdi
initrd windows/lab/sources/boot.wim   boot.wim

boot

At this point of the code the boot file looks for "wimboot" not in the root directory, but the current directory.

 

Therefore if, the bootfile is instead in http://192.168.1.9/pxe/boots_files/ and the wimboot file is in http://192.168.1.9/pxe/kernels the script will return an error and advise to reboot the computer.

 

This is resolved by making the code directly look for the folder wimboot is in per below:

#!ipxe

kernel http://192.168.1.9/pxe/kernels/wimboot bootfile=http://192.168.1.9/pxe/boot_files/lab.php

initrd windows/lab/bootmgr.exe       bootmgr.exe
initrd windows/lab/boot/bcd          bcd
initrd windows/lab/boot/boot.sdi     boot.sdi
initrd windows/lab/sources/boot.wim  boot.wim

boot

Edited by CFNZ_Techie, 03 December 2014 - 07:57 PM.


#12 ady

ady

    Frequent Member

  • Advanced user
  • 165 posts

Posted 18 December 2014 - 02:14 AM

Hi Ady,
 
Thanks for you help on this, unfortunately these don't see to work as you have used them, the first 2 I get "unrecognised arguments initrd=....." and the last I get "unrecognised argument BOOT_IMAGE=wimboot"
The first two I have to remove "initrdfile" and use "initrd" and then I get "inusfficient memory" or alternately when I use the INITRDFILE=item@itemname convention I get the "insufficient memory there too".


FWIW, wimboot v2.4.1 should fix/workaround the problem with the "initrdfile=" parameter used in PXELINUX.

Regards,
Ady.







Also tagged with one or more of these keywords: wimboot, pxeboot, pxelinux, ipxe, linux, debian

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users