Jump to content











Photo
- - - - -

Boot loop

pxe winpe ghost

  • Please log in to reply
4 replies to this topic

#1 DPA

DPA
  • Members
  • 3 posts
  •  
    Netherlands

Posted 03 June 2012 - 05:37 PM

Hi all,

I wasn't 100% sure which section to post this under, hopefully I got it right. This is the situation:


I've been asked to create a PXE boot environment using WInPE and ghost, that can do two things:

1. The network admin wants to be able to image all the workstations at once, by having them boot into the ghost console (once a day)
2. Because it's an environment where some users use different OS's, it should be able to display a menu that lets you choose different OS's and ghost the right image accordingly (rest of the day)


I've done both things by PXE booting into WinPE (using WDS) and having a script either show the menu or connecting to the ghost console when needed (I don't think the details of this script are relevant, but I can provide it if needed).

Now here is my problem: PXE must be the first boot option in BIOS; if this were not the case, the network admin would have to choose PXE manually on each and every PC when he wants them all to PXE boot. This however creates a problem for the OS menu: someone chooses an OS from the menu and it is ghosted to his machine, then his machine reboots; now because PXE is the first boot option, it will simply go back to the OS menu, creating a boot loop.

What I want to do is check whether an image has just been ghosted from the menu (which I have already scripted), and if so, simply booting the OS from hard drive, thus solving the boot loop. This last part is what I can't figure out, because I would have to boot from hard drive out of WinPE. Obviously there aren't any simple DOS commands to do this, it would have to be something like a bootloader, perhaps Grub4dos. However I am not sure whether this is possible.

Is there a way to boot an OS from hard drive out of WINPE, using grub4dos or some other method? Or have I built myself into a dead end?


Hopefully I was able to explain the problem in a clear enough manner :) Thanks in advance for any help!

Edited by DPA, 03 June 2012 - 05:40 PM.


#2 IceBlackIce

IceBlackIce

    Newbie

  • Members
  • 13 posts
  •  
    Portugal

Posted 03 June 2012 - 09:26 PM

Doesnt WDS have an option to stop serving clients?
You could use that and have a period where you what to have WDS running, or you could use some scripts on the server to stop or start the service i guess.

#3 DPA

DPA
  • Members
  • 3 posts
  •  
    Netherlands

Posted 04 June 2012 - 12:16 AM

That crossed my mind as well; the problem is that if I turn off WDS, PXE booting is gone completely, which means the users cannot bring up the menu which lets them choose their OS. This is also done by PXE booting into WinPE, where a script is started that lets them choose an OS and accordingly pushes a ghost image (windows.gho, linux.gho, etc.).

This is exactly the problem; if it weren't for that, I could simply turn off WDS and have the clients boot straight from HDD. However because of the above, PXE needs to be running at all times, meaning I'm stuck with having to boot from HDD out of WinPE. So either there has to be a way to do that, or the way I set it up is just completely doomed :)


Thanks for replying.

#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 04 June 2012 - 07:41 AM

PXE booting works by TFTP looking for a default file, but before that it looks for a file matching the MAC address file of the client system. See screenshot...Posted Image
So rename the default file to default.org.

Schedule a script on the PXE server to copy default.org to all MAC files every day at 3am - e.g.
copy default.org xxpxelinux.cfgC0A80203
copy default.org xxpxelinux.cfgC0A80204
etc

Now the stations will only PXE boot if their MAC address file is present.
Now each system will boot in the morning and PXE boot as their MAC file is present, otherwise it will default to booting from HDD.

If it does PXE boot - boot to WinPE and check if it has the latest image, if it does then delete the MAC file from the PXE server and reboot, otherwise display a menu, after Ghost has run successfully, delete the PXE server MAC file for the client MAC address that is running (the server folder will need a share and you can use NET USE with a password to access it).

I am not sure of WDS paths, but I think the same type of system still applies. If it does not, then checkout Serva.

#5 DPA

DPA
  • Members
  • 3 posts
  •  
    Netherlands

Posted 04 June 2012 - 10:43 AM

Thanks for taking the effort to reply, looks very promising. I'm going to take a shot at it and reply back :)





Also tagged with one or more of these keywords: pxe, winpe, ghost

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users