Jump to content











Photo
- - - - -

Trying to PXE Boot an XP hdd img. gettin an error with ntoskrnl


  • Please log in to reply
17 replies to this topic

#1 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 17 August 2010 - 03:59 PM

So i created a win.img file as instructed from this guide: http://www.boot-land...?showtopic=5000. I used mkimg.exe to create a 600mb image. Once it mounted, I tried xcopy C:\* F:\* /e/v/h/f. I unmounted the image and copied win.img, win.$$$ and win.pl to my pxeboot server. My default file is using pexlinux.0, memdisk and points to win.img

I tired booting that and no luck, got an error:
Windows could not start because the following file is missing or corrupt: <Windows root>\system32\ntoskrnl.exe

I checked the img and it is definately there. So I tried the same process using robocopy instead of xcopy as described here: http://www.soloenter...ks/robocopy.php

And the same issue arose.

Suggestions?

#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 August 2010 - 04:14 PM

A few questions:

1) Under which OS?
2) mkimg.exe or mkimg.cmd?
3) WHICH EXACT settings did you use for the image?
4) Have you checked the Image disk signature?
5) Is the "xcopy C:\* F:\* /e/v/h/f" what I think it is? :cheers: An attempt to xcopy files from currently booted system? :smiling9:


And a couple of checks:
  • Try booting the image in Qemu, before attempting anything PXE.
  • Mount it with VDK or IMDISK or whatever and check that <Windows root>\system32\ntoskrnl.exe is actually there.

:(
Wonko

#3 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 17 August 2010 - 04:53 PM

A few questions:

1) Under which OS?
2) mkimg.exe or mkimg.cmd?
3) WHICH EXACT settings did you use for the image?
4) Have you checked the Image disk signature?
5) Is the "xcopy C:\* F:\* /e/v/h/f" what I think it is? :cheers: An attempt to xcopy files from currently booted system? :smiling9:


And a couple of checks:

  • Try booting the image in Qemu, before attempting anything PXE.
  • Mount it with VDK or IMDISK or whatever and check that <Windows root>\system32\ntoskrnl.exe is actually there.

:(
Wonko


1) Img is Windows XP Pro. PXE server is Ubuntu 10
2)mkimg.cmd my bad, thought exe
3)filelocation= same dir; win.img. size = 600M. cylinder setup: 255/63. format: ntfs
4) Yes I ran an md5sum on the win.img in my /tftpboot dir, and on the mounted share that win.img is on.
5)hmm good point. I did the mkimg on the system to get that mbr copied into it and not another.

Ill try your first suggestion with Qemu

I did mount the image and saw ntoskrnl. The size was the same as the one on the C drive, however the size on disk was different, so maybe some corruption there.

Thanks Wonko

#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 August 2010 - 05:29 PM

4) Yes I ran an md5sum on the win.img in my /tftpboot dir, and on the mounted share that win.img is on.

I'll try again. :cheers:

Have you checked the Disk Signature?

Translates to:

Have you checked that four bytes at offset 440 decimal are NOT all 00's?

or to:
Try opening the .img with tinyhexer using my MBRview structure viewer:
http://www.boot-land...?showtopic=8734
is the disk signature non-zero?

I did the mkimg on the system to get that mbr copied into it and not another.


Well, no. :(

The MBR (CODE only) is taken from a system file, it's only a way to avoid redistributing it - which - you never know - could be some queer infringment of the MS licenses, there are several urtilities that embed it (or the various bootsector codes) that had no problmes, however.

In the batch:
SET Sysfile=%SystemRoot%\System32\dmadmin.exe

REM SET Sysfile=%SystemRoot%\System32\spcmdcon.sys

REM SET Sysfile=%SystemRoot%\ServicePackFiles\I386\setupdd.sys

:(
Wonko

#5 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 17 August 2010 - 06:58 PM

Does your computer you're trying to boot from network still includes the internal hard drive?

Sometimes, branded computers have an hidden partition before the OS partition. Post the content of your boot.ini.

If boot.ini is missing or wrong ARC path in it, NTLDR will default to \Windows on the first partition of the first hard drive.
Windows NT startup process

#6 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 17 August 2010 - 07:18 PM

Does your computer you're trying to boot from network still includes the internal hard drive?

Sometimes, branded computers have an hidden partition before the OS partition. Post the content of your boot.ini.

If boot.ini is missing or wrong ARC path in it, NTLDR will default to \Windows on the first partition of the first hard drive.
Windows NT startup process


I'm doing this all on virtual machines in VMware workstation. And the network machine I'm using has an Ubuntu install on it and nothing else, so it won't be pulling the ntoskrnl.exe if thats what you're asking.

The boot.ini for the imaged hard drive is:
&#91;boot loader&#93;

timeout=30

default=multi&#40;0&#41;disk&#40;0&#41;rdisk&#40;0&#41;partition&#40;1&#41;\WINDOWS

&#91;operating systems&#93;

multi&#40;0&#41;disk&#40;0&#41;rdisk&#40;0&#41;partition&#40;1&#41;\WINDOWS=&#34;Microsoft Windows XP Professional&#34; /noexecute=optin /fastdetect


#7 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 18 August 2010 - 12:58 PM

Well Wonko, in mbrview ive got:

440 01B8 Signature: 0x00000000 No signature.

Looks like you're on the money there. Any ideas on where to take this from here?

#8 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 August 2010 - 02:11 PM

Well Wonko, in mbrview ive got:

440 01B8 Signature: 0x00000000 No signature.

Looks like you're on the money there. Any ideas on where to take this from here?


If you want to actually boot from the copied files (something that most probably won't work anyway) you should copy the signature from the actual hard disk you imaged the files from.

MBRFIX or MBRWIZARD will do nicely.

Otherwise any non-zero values will do.

:smiling9:
Wonko

#9 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 18 August 2010 - 02:14 PM

If you want to actually boot from the copied files (something that most probably won't work anyway) you should copy the signature from the actual hard disk you imaged the files from.

MBRFIX or MBRWIZARD will do nicely.

Otherwise any non-zero values will do.

:smiling9:
Wonko


Copying them was just the only way I could figure to get the full system files and such onto an hdd image. I'll see where copying the drive sig takes me

#10 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 18 August 2010 - 02:56 PM

Yeah sig didn't help. Thanks for the idea though. If you can think of any other ways to properly image a drive for booting, im all ears.

I did install qemu on my Linux machine, but because its in VMware qemu wont work.

#11 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 August 2010 - 03:32 PM

I know I will seem more grumpy than I really am, but you are COMPLETELY failing to post any meaningful data. :smiling9:

What the heck do you think we can get from this sentence ? :cheers::

I did install qemu on my Linux machine, but because its in VMware qemu wont work.


Using one of my (in)famous car comparisons:

I did put a baby seat on the 4 WD pickup, but because it's diesel, the left blinker won't work.


In what the heck does VMware run? :cheers:

Why can't you run the Qemu on your Windows machine? :cheers:

Anyway, the initial goal is OUTSIDE your possibilities right now, if I get it right you want to copy files from a running XP, "put them" in a hard disk image and then PXE boot it.

This is NOT possible, and definitely NOT with your approach.

IF it is possible, you will need to do a lot of experiments, and get a far deeper knowledge of the topic, in a nutshell you will need to use a RAMDISK approach AND fiddle a lot with services and their settings.

Try (temporarily) downsizing your expectations, and test a Recovery Console (far easier, since it is documented)
http://www.boot-land...showtopic=11084
http://www.boot-land...showtopic=11393

Then, start reading here:
http://www.boot-land...?showtopic=2798

:(
Wonko

#12 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 18 August 2010 - 05:51 PM

I know I will seem more grumpy than I really am, but you are COMPLETELY failing to post any meaningful data. :cheers:

What the heck do you think we can get from this sentence ? :cheers::


Using one of my (in)famous car comparisons:


In what the heck does VMware run? :smiling9:

Why can't you run the Qemu on your Windows machine? :cheers:

Anyway, the initial goal is OUTSIDE your possibilities right now, if I get it right you want to copy files from a running XP, "put them" in a hard disk image and then PXE boot it.

This is NOT possible, and definitely NOT with your approach.

IF it is possible, you will need to do a lot of experiments, and get a far deeper knowledge of the topic, in a nutshell you will need to use a RAMDISK approach AND fiddle a lot with services and their settings.

Try (temporarily) downsizing your expectations, and test a Recovery Console (far easier, since it is documented)
http://www.boot-land...showtopic=11084
http://www.boot-land...showtopic=11393

Then, start reading here:
http://www.boot-land...?showtopic=2798

:cheers:
Wonko


Because of the way VMware is constructed you cannot make a virtual machine inside a virtual machine. The BIOS that VMware provides for each VM doesn't support the virtualization options that qemu needs to boot.

I was considering putting qemu on my windows, but because its in alpha I was hesitant. If the image happens to run in qemu, that just says that my pxesetup isnt proper for it. Though I have gotten other PXE boots to work: clonezilla for example.

I did try following the recovery console guides. But i kept running into problems, and decided to try and spend time to get this working instead.

It doesnt matter to me if I copy files or not. I just want an image of Windows that I can pull from the network and run in RAM. The requirement of the image is that .NET can be installed and so forth.

Also, you havent seemed grumpy to me yet. And im thankful for the time youve taken to help. :(

#13 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 August 2010 - 09:12 PM

Also, you havent seemed grumpy to me yet. And im thankful for the time youve taken to help. :)

Hmm. Let's see if the following is grumpy enough. :smiling9:

I did try following the recovery console guides. But i kept running into problems, and decided to try and spend time to get this working instead.


In other words:
Since I cannot replicate a relatively simple, reported to be working, fully detailed, step-by-step guide, then I decided to try doing something undocumented, without any guidelines, which noone, not even people who do have a far deeper knowledge of PXE and XP than I have, ever reported as working.
Additionally, I gathered some info here and some info there and assembled them in a semi-random way.....:(

:D
Wonko

#14 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 19 August 2010 - 06:18 PM

I'm doing this all on virtual machines in VMware workstation. And the network machine I'm using has an Ubuntu install on it and nothing else, so it won't be pulling the ntoskrnl.exe if thats what you're asking.


you don't give any infos about how you setup the host server (DHCP,TFTP,PXE and files added to allow network boot).

From the very little experience i have to network booting, your server side is missing some parts.

As a check, you can rename boot.ini to boot.bak inside your hdd image and try again.

You will see it doesn't change anything. You probably get the initial NT boot file via TFTP server (startrom.0 and then load ntldr). but you never get access to the content of the hdd image file. Your image is probably correct but method used to load it and boot from is probably wrong.

i have found on old thread about network booting and it may help you to understand the boot process and methos used to access the file system with Windows XP install on it stored on hdd image or on network (SMB)

Network Booting XP, With net(0)\windows!

#15 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 20 August 2010 - 02:24 PM

you don't give any infos about how you setup the host server (DHCP,TFTP,PXE and files added to allow network boot).

From the very little experience i have to network booting, your server side is missing some parts.

As a check, you can rename boot.ini to boot.bak inside your hdd image and try again.

You will see it doesn't change anything. You probably get the initial NT boot file via TFTP server (startrom.0 and then load ntldr). but you never get access to the content of the hdd image file. Your image is probably correct but method used to load it and boot from is probably wrong.

i have found on old thread about network booting and it may help you to understand the boot process and methos used to access the file system with Windows XP install on it stored on hdd image or on network (SMB)

Network Booting XP, With net(0)\windows!


hmm could be onto something there.

My DHCP server allows the pxelinux.0 file through. In pxelinux.cfg/default I have:
DEFAULT net

PROMPT 0



LABEL local

	 LOCALBOOT 0



LABEL net

	KERNEL memdisk

	APPEND initrd=win.img


#16 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 August 2010 - 02:56 PM

OK. :(

HOW is supposed the Windows inside win.img to "hook" the MEMDISK loaded image, according to you? :cheers:

Or, in other words, have you integrated/installed WinVblock (or any similar RAMDISK driver capable of hooking MEMDISK mapped images) to the image?

:(
Wonko

#17 Hybrid461

Hybrid461

    Newbie

  • Members
  • 13 posts
  •  
    Canada

Posted 20 August 2010 - 03:40 PM

OK. :(

HOW is supposed the Windows inside win.img to "hook" the MEMDISK loaded image, according to you? :cheers:

Or, in other words, have you integrated/installed WinVblock (or any similar RAMDISK driver capable of hooking MEMDISK mapped images) to the image?

:(
Wonko


http://silent.gumph....indows-pxe.html

This guys did that with win98 and it worked. I have installed firadisk driver into the image.

#18 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 August 2010 - 04:04 PM

http://silent.gumph....indows-pxe.html

This guys did that with win98 and it worked. I have installed firadisk driver into the image.


And you do think that Win98 works the same as NT based systems :cheers:, i.e. if I get it right your line of thought is more or less

since "these guys made it with Win98" then I can make it with XP

:(

We are back EXACTLY to square #0, please, take your time reading these two seemingly unrelated threads AND links within them:
http://www.boot-land...?showtopic=8944
http://www.boot-land...?showtopic=4952

I'll try again:
PXE booting is a particularly complex way of IMAGE booting which is a complex way of RAMDISK booting (when we are talking of NT based systems).

  • RAMDISK booting a RC is easy.
  • RAMDISK booting a PE 1.x is relatively easy.
  • RAMDISK booting an XP is VERY difficult.

You have a long way before you, I'm afraid :(, but IMNSHO you should find a way, ANY way, to test RAMDISK booting locally BEFORE "going PXE".

:cheers:
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users