Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WinPE Bad Magic, right names
2013-11-12, 10:06
Post: #1
WinPE Bad Magic, right names
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
Find all posts by this user
Quote this message in a reply
2013-11-12, 15:44
Post: #2
RE: WinPE Bad Magic, right names
(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
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-11-13, 08:07
Post: #3
RE: WinPE Bad Magic, right names
(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?
Find all posts by this user
Quote this message in a reply
2013-11-13, 10:41 (This post was last modified: 2013-11-13 11:07 by Luvan.)
Post: #4
RE: WinPE Bad Magic, right names
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
Find all posts by this user
Quote this message in a reply
2013-11-13, 11:57 (This post was last modified: 2013-11-13 13:02 by Luvan.)
Post: #5
RE: WinPE Bad Magic, right names
Think i got it to work when i changed to path in boot.ipxe to ipadress.
Thanks Smile
Find all posts by this user
Quote this message in a reply
2013-11-14, 09:16
Post: #6
RE: WinPE Bad Magic, right names
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-11-22, 11:32
Post: #7
RE: WinPE Bad Magic, right names
It works fine now, i created a dns record and all is good Smile
Find all posts by this user
Quote this message in a reply
2014-04-30, 22:24 (This post was last modified: 2014-04-30 22:45 by BirtyBassett.)
Post: #8
RE: WinPE Bad Magic, right names
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?
Find all posts by this user
Quote this message in a reply
2014-05-02, 17:42
Post: #9
RE: WinPE Bad Magic, right names
(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
Visit this user's website Find all posts by this user
Quote this message in a reply
2014-05-04, 16:46
Post: #10
RE: WinPE Bad Magic, right names
Embarrassed? Me? No, not at all!!

Many thanks for pointing out the obvious!! All up and running now. Smile
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)