Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running console command with --keep option -> unable to boot
2017-01-07, 12:54 (This post was last modified: 2017-01-07 14:19 by Smokey.)
Post: #1
Bug Running console command with --keep option -> unable to boot
Hello, I'm fairly new to iPXE but I hope I can supply you with all the relevant info.

I'm unable to boot any image/kernel I tried if I use the console command with --keep option.
iPXE version used: 1.0.0+ (26050)
I tried both the ipxe.kpxe and undionly.kpxe files.

Tested with:
VMware Workstation 12 Player version 12.5.2 build-4638234 (32-bit VM)
and on real hardware (64-bit) (can post specs if needed).

I'm using dnsmasq on my router (DHCP) and my boot server (Proxy DHCP).

Image used:
Memdisk and memtest from http://ipxe.org/appnote/memtest

When I run console with --keep option before booting an image I get the following error message:
Code:
El Torito BVD sanity check failed.
El Torito boot catalog sanity check failed.
MEMDISK: Image seems to have fractional end cylinder
MEMDISK: Image appears to be truncated
After I press any key to boot, the machine (vm or real hardware) just locks up and I have to hard reset it.

This led me to believe that there was some corruption happening somewhere so I ran the tests at http://ipxe.org/dev/drvtest/md5sum
But to my confusion it passed the tests flawlessly.

iPXE compiled with:
Code:
make bin/{undionly,ipxe}.{,k,kk}pxe EMBED=../boot.ipxe

My scripts:
Embedded boot.ipxe
Code:
#!ipxe

:findserver
echo Trying DHCP... ||
dhcp || goto nodhcp
isset ${proxydhcp/dhcp-server} && set next-server ${proxydhcp/dhcp-server} ||
isset ${proxydhcp/next-server} && set next-server ${proxydhcp/next-server} ||
isset ${next-server} || goto noserver
echo Boot server found: ${next-server} ||

:chain
chain --replace --autofree http://${next-server}/ipxe/menu.php?platform=${platform}&mac=${mac} ||
set errmsg ERROR: Chainloading failed ||
prompt Press any key to continue... ||
goto error

:nodhcp
set errmsg ERROR: Cannot reach DHCP server ||
prompt Press any key to continue... ||
goto error

:noserver
set errmsg ERROR: Cannot locate boot server ||
goto error

:readip
echo -n Please enter the boot server ip address: && read next-server && goto chain ||

:error
menu -- ${errmsg} ||
item --key r -- findserver (r) Retry ||
item --key e -- readip (e) Enter ip manually ||
item --key c -- config (c) View config ||
item --key s -- shell (s) Open shell ||
item --key b -- reboot (b) Reboot ||
item --key n -- shutdown (n) Shutdown ||
item --key x -- exit (x) Exit ||
choose --default ${action} action || goto exit
goto ${action}

:config
config ||
goto error

:shell
shell ||
goto error

:reboot
reboot ||
goto exit

:shutdown
shutdown ||

:exit
echo Booting from local hard disk... ||

menu.php (I removed the php code and menu for debugging)
Code:
#!ipxe

console --x 800 --y 600 --picture menu.png --keep --left 80 --right 80 --top 60 --bottom 60

initrd files/images/memtest.iso
chain files/images/memdisk iso raw pause

I also tried booting into Windows 7 setup (from http://ipxe.org/howto/winpe)
menu.php
Code:
#!ipxe

console --x 800 --y 600 --picture menu.png --keep --left 80 --right 80 --top 60 --bottom 60

kernel files/windows/wimboot
initrd files/windows/boot/bcd BCD
initrd files/windows/boot/boot.sdi boot.sdi
initrd files/windows/sources/boot.wim boot.wim
boot
It fails with the following error message:
Code:
Bad CPIO magic
FATAL: could not extract initrd files
Press a key to reboot...

And finally I tried gparted live:
menu.php
Code:
#!ipxe

console --x 800 --y 600 --picture menu.png --keep --left 80 --right 80 --top 60 --bottom 60

kernel files/gparted/i386/vmlinuz boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=http://192.168.1.2/ipxe/files/gparted/i386/filesystem.squashfs quiet splash
initrd files/gparted/i386/initrd.img
boot
This failed with:
Code:
Initramfs unpacking failed: junk in compressed archive

Everything boots just fine without the --keep option.
Am I missing something here? What am I doing wrong?
I would include screenshots too but attachments are disabled I guess.
Feel free to ask anything, I can post more configs if needed.
Find all posts by this user
Quote this message in a reply
2017-01-07, 13:43
Post: #2
RE: Running console command with --keep option -> unable to boot
--keep keeps the data in memory and can be reused , however remember that some "next stage" kernels will load all of that data.
You can check this by using imgstat before boot

However there is lots of things that does work even with this is it is kind of missleading to say that "nothing works" Wink

as a way to fix this i would use imgfree before downloading kernel and initrds

Oh and never use undionly.kkpxe!, and ipxe.kpxe makes not sense...
only build ipxe.pxe and undionly.kpxe if you are using any of the other ones you will get issues.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2017-01-07, 14:19
Post: #3
RE: Running console command with --keep option -> unable to boot
(2017-01-07 13:43)NiKiZe Wrote:  --keep keeps the data in memory and can be reused , however remember that some "next stage" kernels will load all of that data.
You can check this by using imgstat before boot
Thanks for clarifying the issue here. Maybe it would be an idea to put a warning in http://ipxe.org/cmd/console ?
I spent about 6-8 hours swapping out different images, memdisk versions, kernels etc.

(2017-01-07 13:43)NiKiZe Wrote:  However there is lots of things that does work even with this is it is kind of missleading to say that "nothing works" Wink
Fair enough, I didn't mean it like that. I'll edit that.

(2017-01-07 13:43)NiKiZe Wrote:  Oh and never use undionly.kkpxe!, and ipxe.kpxe makes not sense...
only build ipxe.pxe and undionly.kpxe if you are using any of the other ones you will get issues.
As an iPXE noob, I had some trouble figuring out what version to use. So I figured I would just build them all and trail and error my way trough Tongue

I found a couple links with some info but no complete list about which versions you can build:
When to use undionly.kkpxe
When do I use .pxe, .kpxe, and .kkpxe?
Filename Information (most complete I could find)
Find all posts by this user
Quote this message in a reply
2017-01-07, 14:29
Post: #4
RE: Running console command with --keep option -> unable to boot
(2017-01-07 14:19)Smokey Wrote:  Thanks for clarifying the issue here. Maybe it would be an idea to put a warning in http://ipxe.org/cmd/console ?
I spent about 6-8 hours swapping out different images, memdisk versions, kernels etc.
That all depends on what you are trying to boot, but yes a note about that it remains in memory and that you should understand imgstat might be good to add yes


(2017-01-07 14:19)Smokey Wrote:  I found a couple links with some info but no complete list about which versions you can build:
When to use undionly.kkpxe
When do I use .pxe, .kpxe, and .kkpxe?
Filename Information (most complete I could find)
The FOG one is horrible, they mention that it works around some issues, but fails to mention that it will create resource leaks and other issues. :/

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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