iPXE discussion forum

Full Version: WinPE Bad Magic, right names
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

New to ipxe and wanted my Synology NAS to boot up Winpe.

Created boot.ipxe script and put it on the nas web-server:
#!ipxe

kernel wimboot
initrd bootmgr bootmgr
initrd boot/bcd BCD
initrd boot/boot.sdi boot.sdi
initrd boot.wim boot.wim

Put these files on web server in the same folder:
boot.wim
bootmgr
wimboot
boot\bcd
boot\boot.sdi

I downloaded the ipxe.iso.
Boot it up in hyper-v, CTRL+B, do get a warning:
[Image: legacy.PNG]

DHCP gives my ip adress ok.
chain http://webserver/test/boot.ipxe
[Image: chain.PNG]

All files downloads with OK at the end.

Run imgstat:
[Image: imgstat.PNG]

But when i run boot it just says Bad cpio magic...
[Image: boot.PNG]

Can anyone please tell me what im doing wrong? Huh
(2013-11-12 10:06)Luvan Wrote: [ -> ]Run imgstat:
[Image: imgstat.PNG]

But when i run boot it just says Bad cpio magic...
[Image: boot.PNG]

Can anyone please tell me what im doing wrong? Huh

The problem is that your boot.ipxe script is still part of iPXE's image list at the time you execute wimboot. The boot.ipxe script then shows up at the end of the initrd image, which confuses wimboot.

You can fix this for your manual testing by typing "imgfree boot.ipxe" before typing "boot".

If you include the "boot" command within the "boot.ipxe" script, then the problem will go away anyway, since running scripts are automatically excluded from iPXE's image list.

Michael
(2013-11-12 15:44)mcb30 Wrote: [ -> ]The problem is that your boot.ipxe script is still part of iPXE's image list at the time you execute wimboot. The boot.ipxe script then shows up at the end of the initrd image, which confuses wimboot.

You can fix this for your manual testing by typing "imgfree boot.ipxe" before typing "boot".

If you include the "boot" command within the "boot.ipxe" script, then the problem will go away anyway, since running scripts are automatically excluded from iPXE's image list.

Michael

You are completely right Smile

So now when that works. How do i get the pxe server to automatically launch the boot.ipxe script?
i have followed this guide:
http://ipxe.org/download

But i get connection time out...
This is the embedded script:
#!ipxe

dhcp
chain http://upkeepernas01/upkeeper/boot.ipxe

And this is what i get:
[Image: ipxeshort.jpg]

i tried to change the path to this in boot.ipxe:
#!ipxe

kernel http://upkeepernas01/upkeeper/wimboot
initrd http://upkeepernas01/upkeeper/bootmgr bootmgr
initrd http://upkeepernas01/upkeeper/boot/bcd BCD
initrd http://upkeepernas01/upkeeper/boot/boot.sdi boot.sdi
initrd http://upkeepernas01/upkeeper/boot.wim boot.wim
boot

But same result:
[Image: ipelong.PNG]

The files are there, if i replace my compiled undionly.kpxe with the orginal, hit CTRL+B and run boot.ipxe manually, it works fine...

What im i doing wrong? Smile
Think i got it to work when i changed to path in boot.ipxe to ipadress.
Thanks Smile
It seems like you're having an issue with your web server. See details here: http://ipxe.org/err/4c0a60 Changing from dns name to ip address certainly seems to indicate you have either a DNS issue or a web server setup problem. The simple way is to test the address you're using in a normal web browser first.
It works fine now, i created a dns record and all is good Smile
My apologies for bumping an old thread but I have the same problem as OP. I am using the boot.ipxe, boot.ipxe.cfg & menu.ipxe scripts from this page.

Below is a section from the menu.ipxe where I've added in an entry for dart in between the two macrium entries. It doesn't seem to matter whether I use imgstat or not.

Quote::macrium-winpe
echo Booting Macrium Reflect ${macrium-version} (WinPE 4.0 ${arch}) for ${initiator-iqn}
set base-url macrium-${macrium-version}/macrium-${macrium-version}-rescue-winpe-4.0-${arch}
kernel wimboot
initrd ${base-url}/bootmgr bootmgr
initrd ${base-url}/Boot/BCD BCD
initrd ${base-url}/Boot/boot.sdi boot.sdi
initrd ${base-url}/sources/boot.wim boot.wim
boot || goto failed
goto start

:dart
set base-url dart
kernel wimboot
initrd ${base-url}/bootmgr bootmgr
initrd ${base-url}/boot/bcd
initrd ${base-url}/boot/boot.sdi boot.sdi
initrd ${base-url}/sources/boot.wim boot.wim
imgstat
boot || goto failed
goto start

:macrium-linux
echo Booting Macrium Reflect ${macrium-version} (Linux ${arch}) for ${initiator-iqn}
set base-url macrium-${macrium-version}/macrium-${macrium-version}-rescue-linux
kernel ${base-url}/vmlinuz
initrd ${base-url}/initramfs.xz
imgargs vmlinuz vga=0x317
boot || goto failed
goto start

This is the error I receive:

[Image: iPXE-2014-04-30-21-57-11.png]

Any ideas?
(2014-04-30 22:24)BirtyBassett Wrote: [ -> ]
Code:
:dart
set base-url dart
kernel wimboot
initrd ${base-url}/bootmgr             bootmgr
initrd ${base-url}/boot/bcd
initrd ${base-url}/boot/boot.sdi       boot.sdi
initrd ${base-url}/sources/boot.wim    boot.wim

Spot the difference between the four initrd lines!

The second is missing the "bcd" argument, and should be:

Code:
initrd ${base-url}/bcd                 bcd

Michael
Embarrassed? Me? No, not at all!!

Many thanks for pointing out the obvious!! All up and running now. Smile
Reference URL's