chiraag Posted March 5, 2009 Posted March 5, 2009 Hello Everyone,I am trying to build something which need me to switch between Win PE and Win XP. My system has the following:Disk 0C: WinPE [Partition 1]D: WinXP [Partition 2]Disk 1 e: USB [WinPE]Here i boot the uSB and let it load WinPE in ram. After this I am using the solution by Wrex described on this discussion [http://www.msfn.org/board/index.php?showtopic=118332&st=0&p=768846entry768846] where i do the following xcopy e:\Boot\*.* /e/f/y c:\Bootcopy e:\BootMGR c:\IF EXIST C:\BOOT\BCD DEL C:\BOOT\BCDIF NOT EXIST C:\TEMP MD C:\TEMPIF EXIST C:\TEMP\BCD DEL C:\TEMP\BCDbcdedit -createstore C:\TEMP\BCDbcdedit -store C:\TEMP\BCD -create {bootmgr} /d "Boot Manager"bcdedit -store C:\TEMP\BCD -set {bootmgr} device bootbcdedit -store C:\TEMP\BCD -create {ramdiskoptions} /d "WinPE"bcdedit -import C:\TEMP\BCDbcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:bcdedit -set {ramdiskoptions} ramdisksdipath \BOOT\BOOT.sdifor /f "tokens=3" %%a in ('bcdedit -create /d "WinPE" -application osloader') do set guid=%%abcdedit -set %guid% device ramdisk=[C:]\WINPE\WINPE.WIM,{ramdiskoptions}bcdedit -set %guid% path \WINDOWS\SYSTEM32\BOOT\WINLOAD.EXEbcdedit -set %guid% osdevice ramdisk=[C:]\WINPE\WINPE.WIM,{ramdiskoptions}bcdedit -set %guid% systemroot \WINDOWSbcdedit -set %guid% winpe yesbcdedit -set %guid% detecthal yesbcdedit -displayorder %guid% -addlastbcdedit -create {ntldr} /d "Windows XP Professional"bcdedit -set {ntldr} device bootbcdedit -set {ntldr} path \ntldrbcdedit -displayorder {ntldr} -addfirstbcdedit -default {ntldr}bcdedit -timeout 5bootsect /nt60 C:I also add NTLDR, NTDETECT.COM, and boot.ini files in the root of C: [i get these files from my windows xp cd]My boot.ini file is as follows[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetectNow when i execute this code and restart my machine, it starts my windows xp but after displaying the Windows XP logo it hangs on the windows xp blue screen [before it displays login screen]I am really not sure what i am doing wrong here. I guess it could be something regarding the ndldr files i am using as i have never seen Windows XP start booting and hang in between. Please help..........~Chiraag
jaclaz Posted March 5, 2009 Posted March 5, 2009 I XP is in:Disk 0C: WinPE [Partition 1]D: WinXP [Partition 2]why are you chainloading:[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetectAdd a line to BOOT.INI as follows:multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetectAlso, generally "blue screen" means nothing, you must provide the STOP error number or however the text that is displayed when the error happens in order for anyone to help.jaclaz
WreX Posted March 5, 2009 Posted March 5, 2009 My systems have WinPE on C: and Windows on D: as well and yes, all you should need to do is change your (1) values in boot.ini to (2) and it should boot properly. That would make your boot.ini look like mine and get you where you need to go.
chiraag Posted March 5, 2009 Author Posted March 5, 2009 (edited) oh thats my bad, actually i have my boot.ini set to partition 2 and it still does not boot.multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetectThe blue screen is not an error screen or something, if u observe, while booting, WinXP first displays a big Microsoft Windows XP logo then it displays a small windows xp logo after which it displays a welcome message and lastly the login screen.My machine hangs on the small windows xp logo [i.e it does not show me welcome]. Hope this makes sense.Wrex in order to boot your winxp you place NTLDR, NTDETECT.COM, and boot.ini files in the root of C: [Win PE] and do you get these files from the windows xp cd or you are using the pe version of all these files....Thanks so much for all these replies....would be great if i could solve this issue.... Edited March 5, 2009 by Tripredacus added codebox
jaclaz Posted March 5, 2009 Posted March 5, 2009 Ok,but I need some more details.How was XP installed?Was it installed while the partition where WinPE now is was hidden/not yet existant?Did it boot normally before?The code by Wrex is just a way to add the entries to the BCD needed to chainload from bootmanager NTLDR (and from it BOOT.INI)The "stall" you are reporting is usually somehow connected to changed drive letters. jaclaz
chiraag Posted March 5, 2009 Author Posted March 5, 2009 I have a bear metal on which i boot WinPE through a USB [e:]. Then i use diskpart to create two partitions in disk 0.Partition 1 [c:]= Winpe [using http://technet.microsoft.com/en-us/library/cc766195.aspx]Partition 2 [d:]= Winxp ..For WinXP i first create a partition [as shown below] and then copy an image [e:\imagex.exe /apply f:\Image.wim 1 d:]diskpart select disk 0 create partition primary size=<Size of partition to create in MB> select partition 2 active exit format d: /fs:ntfs /yAfter i have copied the winxp image i add entries to BCD [using Wrex code] and then restart my machine. What i actually want is that when i restart i get winxp.
jaclaz Posted March 5, 2009 Posted March 5, 2009 After i have copied the winxp image i add entries to BCD [using Wrex code] and then restart my machine. What i actually want is that when i restart i get winxp.I'll try to rephrase. Where does the XP image come from?Was it an XP installed on first partiton (with drive letter C:\)?How are you managing the MBR disk signature?jaclaz
chiraag Posted March 5, 2009 Author Posted March 5, 2009 I have an image of Winxp [image1.wim] on a uSB. I capture this image of another Windows xp machine [After Syspreping that machine to factory [sysprep.exe –factory]] using the following command.ImageX /capture C: E:\Image1.wim " factory image"YES!!!! this other machine from where i captured the image did have WinXP installed on first partition ( C:\)I am sorry i am not aware of how MBR disk signature is managed. How could i check that??After i have captured this image from another machine, i restore this image in the D drive [Partition 2] using the commande:\imagex.exe /apply f:\Image.wim 1 d:Once i have copied the image, i add BCD entries [Wrex code] and then i restart my machine to expect Winxp to boot. I hope i am clear, the setup is a bit complicated. thanks soo much for your quick responses. Appreciate that.
jaclaz Posted March 5, 2009 Posted March 5, 2009 (edited) Actually XP boot is based on some information that is "hardcoded" to a given machine, and also to some "paths".I am not familiar with the sysprepping procedure , so this might be a loonng (or completely wrong ) shot, based only on the symptoms.MBR signature:http://thestarman.pcministry.com/asm/mbr/Win2kmbr.htmhttp://www.911cd.net/forums//index.php?showtopic=19663Problem about "moving" 2K/XP:http://support.microsoft.com/kb/249321/en-usIf I were you, I would simply try restoring (temporarily) the image you have on first partition of the new machine and see if anything changes.You can use an "offline Registry viewer":http://www.gaijin.at/dlregview.phphttp://72.14.221.132/translate_c?hl=en&...qSsTSebrDC2-Jsgor an "offline Registry editor" (warning: EXPERIMENTAL/UNFINISHED):http://www.boot-land.net/forums/?showtopic=4684to check values of relevant Registry keys in the deployed image.Or maybe you may want to try offlinesysprep :http://www.911cd.net/forums//index.php?showforum=43http://www.911cd.net/forums//index.php?showtopic=19397jaclaz Edited March 5, 2009 by jaclaz
chiraag Posted March 5, 2009 Author Posted March 5, 2009 Thanks a lot. I will check these links to troubleshoot.FYII have been using this image for restores previously. My first setup was running WinPE through a usb [d:] [without installing WiN PE on THE HARD DISK c:]. Disk 0 had just one partition which had WinXP installed. [Pre-requisite]. These were my steps1. Boot [WAKE of lan (network booting)] using a usb which loaded WinpE on RAM.2. Run a bat file which would copy Image1.wim into c: [Overwriting the Winxp installed ]d:\imagex.exe /applye e:\Image.wim 1 c:3. restart the machine using shutdown -rThe issue i faced is that when i restart, it boots from the USB again, thereby booting WINPE even though my boot order in the bios said "boot from the harddisk".This is why i though i should have another partition which would contain WINPE, and using Wrex code i could change the bcd and restart my machine into Winxp.one last question would be, In order to add bcd entrie, do i need to have a hard disk partition for WinPE?? or can i do it somehow just using the usb??Thanks a lot.
jaclaz Posted March 5, 2009 Posted March 5, 2009 The issue i faced is that when i restart, it boots from the USB again, thereby booting WINPE even though my boot order in the bios said "boot from the harddisk".This is why i though i should have another partition which would contain WINPE, and using Wrex code i could change the bcd and restart my machine into Winxp.This one can easily be solved by using grub4dos on the USB stick/drive and exchange/omit to exchange (hd0) with (hd1).See this for a quisck reference:http://www.boot-land.net/forums/index.php?...c=2568&st=7one last question would be, In order to add bcd entrie, do i need to have a hard disk partition for WinPE?? or can i do it somehow just using the usb??Well no.Basically you are simply editing a BCD store, it can be wherever you want, as long as it is on a writable filesystem (not on a CD/DVD or .iso).Try opening the actual BCD store with RAWREG.......it's simply a file for the boot loader. (though boot.ini is easier to edit )Check these:http://www.multibooters.co.uk/bootmgr.htmlhttp://www.multibooters.co.uk/cloning.htmlAlso, you can use "specialized" GUI programs:http://www.vistabootpro.org/http://neosmart.net/dl.php?id=1jaclaz
allanf Posted March 6, 2009 Posted March 6, 2009 @chiraag,Here is a screenshot of my bcdedit commands to set up a Dual-Boot-XP-WinPE from the Same Partition. bootsect and bcdedit are run from WinPE. The procedure starts with having no existing BCD on the HDD.One error is highlighted - the /addlast command - which seems to require at least two boot entries (... logically ...).The procedure following the Wrex batch does create entries in a different order to me, so the error may not apply. Nevertheless, it seems you are not getting the Boot Manager Screen, which indicates that the display order only has a single entry that is booted by default. (Perhaps that is what you want?)Regardshttp://www.boot-land.net/forums/index.php?...ost&p=54593http://technet.microsoft.com/en-us/library/cc721886.aspxhttp://technet.microsoft.com/en-us/library/cc721886.aspx
WreX Posted March 9, 2009 Posted March 9, 2009 The Sysprep Windows XP image I install on D:\ was installed and sealed on D:\, so I don't think you can install and seal an image on C:\ and expect it to automatically adjust to work when you apply it to D:\. I suggest you either re-create your XP image or swap your partitions around so XP is on C:\ and PE is on D:\.
TheReasonIFail Posted March 12, 2009 Posted March 12, 2009 (edited) Which partion is set as active?I have a post on here where I accomplished this using the new Vista bootsector to boot between WinPE/WinRE and Windows XP.I actually set the WinPE partition to be hidden so Windows XP was still set as C:\ and it was safe from the end users.I created the Windows XP image on a PC with only one partition and was able to successfully deploy it to machines with WinPE on first and WinXP on second. I assume that as long as you're using the same drive letter and edit the boot.ini file accordingly, it should work.Here's the script I use:@ECHO OFFSET CD=D:SET RECVY=W:SET WINXP=C:SET REGUID=572BCD55-FFA7-11D9-AAE0-0007E994107DREGEDIT -S VDS.REGDISKPART -S PREPART.TXTBOOTSECT.EXE /NT60 %RECVY%BOOTSECT.EXE /NT52 %WINXP%IMAGEX /APPLY BOOT.WIM 1 %RECVY%IMAGEX /APPLY WINXPSP3.WIM 1 %WINXP%START /WAIT WSCRIPT WIMHALDETECT.VBSATTRIB -R -H -S %WINXP%\NTLDRATTRIB -R -H -S %WINXP%\NTDETECT.COMATTRIB -R -H -S %WINXP%\BOOT.INICOPY %WINXP%\NTLDR %RECVY%\COPY %WINXP%\NTDETECT.COM %RECVY%\COPY %WINXP%\BOOT.INI %RECVY%\ATTRIB +R +H +S %RECVY%\NTLDRATTRIB +R +H +S %RECVY%\NTDETECT.COMATTRIB +R +H +S %RECVY%\BOOT.INIDEL %WINXP%\NTLDRDEL %WINXP%\NTDETECT.COMDEL %WINXP%\BOOT.INIMD %RECVY%\BOOT\XCOPY %CD%\BOOT\*.* /E /F %RECVY%\BOOT\COPY %CD%\BOOTMGR %RECVY%DEL %RECVY%\BOOT\BCDBCDEDIT -CREATESTORE %RECVY%\BOOT\BCDBCDEDIT -STORE %RECVY%\BOOT\BCD -create {BOOTMGR} /d "Boot Manager"BCDEDIT -STORE %RECVY%\BOOT\BCD -SET {BOOTMGR} DEVICE BOOTBCDEDIT -STORE %RECVY%\BOOT\BCD -CREATE {NTLDR} /D "Windows XP"BCDEDIT -STORE %RECVY%\BOOT\BCD -SET {NTLDR} DEVICE PARTITION=%WINXP%BCDEDIT -STORE %RECVY%\BOOT\BCD -SET {NTLDR} PATH \ntldrBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {NTLDR} LOCALE EN-USBCDEDIT -STORE %RECVY%\BOOT\BCD -create {%REGUID%} /D "Backup and Restore" -APPLICATION OSLOADERBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} OSDEVICE BOOTBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} DEVICE BOOTBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} PATH \windows\system32\boot\winload.exeBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} SYSTEMROOT \WindowsBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} WINPE YESBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} DETECTHAL YESBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} NX OPTINBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} CUSTOM:46000010 YESBCDEDIT -STORE %RECVY%\BOOT\BCD -SET {%REGUID%} LOCALE EN-USBCDEDIT -STORE %RECVY%\BOOT\BCD -DEFAULT {NTLDR}BCDEDIT -STORE %RECVY%\BOOT\BCD -SET {DEFAULT} RECOVERYSEQUENCE {%REGUID%}BCDEDIT -STORE %RECVY%\BOOT\BCD -SET {DEFAULT} RECOVERYENABLED YESBCDEDIT -STORE %RECVY%\BOOT\BCD -DISPLAYORDER {NTLDR} {%REGUID%}BCDEDIT -STORE %RECVY%\BOOT\BCD -TIMEOUT 2WPEUTIL REBOOT Edited March 12, 2009 by TheReasonIFail
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now