MSFN Forum: Boot PE from Hard Drive - MSFN Forum

Jump to content


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Boot PE from Hard Drive can i ? Rate Topic: -----

#21 User is offline   getwired 

  • Member
  • PipPip
  • Group: Members
  • Posts: 231
  • Joined: 20-November 04

Posted 08 October 2005 - 01:54 PM

View Postjaclaz, on Oct 8 2005, 12:17 PM, said:

Once NTLDR has started, it reads BOOT.INI, where you can put two types of entries:
1) An arcpath to a Windows NT (NT here means NT/2K/XP/2003) install (i.e. something like multi(0)disk(0)rdisk(0)partition(1)\NTEXP="Windows 2000 PRO" /fastdetect)
2) A direct path to a copy of a RAW bootsector (i.e. something like C:\Bootsect.w98="Windows 98 Command Line" /win95)


Note that if you are using the setupldr.bin renamed as NTLDR route mentioned above - a boot.ini - even if it is on the disk - is never read. Setupldr.bin never reads boot.ini files - only a txtsetup.sif. The code to read boot.ini is only in the true NTLDR.


#22 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,409
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 09 October 2005 - 09:41 AM

Yep, I was referring to how the "real" NTLDR works.

jaclaz

#23 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 09 October 2005 - 01:27 PM

@Bilou_Gateux

File system dosn't matter. Yes, you can use NTFS.

Bootpart.txt section 'Windows NT Multiboot menu' describe this feature.

I wrote a bootpart example in May 2004:
http://www.911cd.net/forums/index.php?show...indpost&p=38311

BOOTPART list your partitions.
'BOOTPART 1 C:\PEBOOT.BIN WinPE' maybe correct. Compare bootpart partion number.

Quote

OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=RECOVERY\WINPE.SDI"
Use files
x:\winnnt.sif
x:\RECOVERY\WINPE.SDI

You don't have to use drive letter X:.
You can assign another drive letter to that partition and use that drive letter, e.g. e:


File ntldr is loaded. You can use in different ways:
File can be ntldr or renamed setupldr.bin or renamed bootmgr.

#24 User is offline   mats 

  • Member
  • PipPip
  • Group: Members
  • Posts: 206
  • Joined: 10-May 05

Posted 10 October 2005 - 12:47 AM

just to clarify setupldr will read the first file with a .sif extension it finds. Not just txtsetup.sif

#25 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 10 October 2005 - 02:06 AM

boot.ini:
[boot loader]
timeout=7
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Windows Server 2003, Web" /noexecute=optout /fastdetect
c:\peboot.bin="RAMDisk WinPE"
c:\xpe.bin="Windows XP Embedded"
c:\bootpe.bin="WinPE Recovery"


Partition information from MBRFixGUI 2.1
# Boot Size (MB) Type
1 502 7 NTFS or HPFS
2 7 69 Boot-US boot manager / Priam / Enhanced Write Filter
3 Yes 7797 7 NTFS or HPFS
4 20300 7 NTFS or HPFS


From the active partition, SystemBootDevice multi(0)disk(0)partition(3) i can boot:
"Windows Server 2003, Web" on partition(3)
"RAMDisk WinPE" SDI Image on partition(3)\Recovery
"Windows XP E" on partition(1) with xpe.bin bootsector created with bootpart util
the fourth option:
"WinPE Recovery" SDI Image on partition(4)\Recovery
don't works. i've got only the header from bootpart util

Quote

BootPart 2.60 Bootsector © 1993-2005 Gilles Vollant http://www.winimage.com/bootpart.htm
Loading new partition
Bootsector from C.H. Hochstätter

and a blinking cursor

On the fourth partition (where i try to add my WinPE image built with 2K3SP1 binaries as source) i have the following files:

Quote

ntdetect.com >>>2003 SP1<<<
NTLDR >>>renamed 2003 SP1 SETUPLDR.BIN<<<
WINNT.SIF
\RECOVERY\WINPE.SDI
pagefile.sys >>>2003 Server swap file<<<

This post has been edited by Bilou_Gateux: 10 October 2005 - 03:04 AM


#26 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 10 October 2005 - 02:07 PM

@Bilou_Gateux
Bootpart use a own partition numbers, starting at zero.
Don't use another partition numbers, e.g. MS or MBRFixGUI.

Either you selected a wrong partition or your partiton is not bootable.

Remenber your pagefile partition size.
Boot recovery console:
map list your partitions, recognice your pagefile partition.
fixboot (your pagefile partition)

Bootpart list numbers. Post that numbers.
Which command line did you used?

Another idea:
What's Boot-US boot manager?
Boot Boot-US and select your pagefile partition.

Next idea:
Boot Windows, set pagefile partition actice and reboot.
This may fail: keep a boot media by hand to set c: active.


@jaclaz
Yes, bootpart is not necessary. Thanks.

Cygwin dd:
$ dd if=//./x: of=c:/bootsector count=1

c:\boot.ini:
C:\bootsector="Bootsector X:"

PE boots.

#27 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 11 October 2005 - 01:45 AM

I will try again.

Using bootpart /list:
Physical number of disk 0 : 73f973f9
 0 : C:  type=7  (HPFS/NTFS), size= 514048 KB, Lba Pos=63
 1 : C:  type=45 , size= 8032 KB, Lba Pos=1028160
 2 : C:* type=7  (HPFS/NTFS), size= 7984305 KB, Lba Pos=1044225
 3 : C:  type=7  (HPFS/NTFS), size= 20788110 KB, Lba Pos=17012835


Applying command: BOOTPART 0 LBA C:\xpe.bin "Windows XP Embedded", i'm able to boot partition 0 from active partition 2.

Applying command: BOOTPART 3 LBA C:\bootpe.bin "WinPE Recovery"; i get the blinking cursor as mentionned in my previous post.
it look like there is an issue with my partition 3. I have to make some backup of data content and delete and recreate it to check again.

i hope the issue is not related to Server 2003 with SP1 used as source to build my WinPE.
What OS source were you using?

cdob said:

I wrote a bootpart example in May 2004:
http://www.911cd.net/forums/index.php?show...indpost&p=38311


#28 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 12 October 2005 - 02:45 PM

Thanks for detailed list.

Blinking cursor indicates, partition 3 is not bootable.
Backup data, boot recovery console and run 'fixboot "DriveLetter:"'
You don't have to delete that partiton.

I doubt, windows version does matter in that case.

I used XP SP1 source in may 2004 and XP SP2 source today.
There is no difference in minint booting, if I use XP SP2 setupldr.bin or 2003 SP1 setupldr.bin.
OF course, SDI booting requires 2003 SP1 setupldr.bin.

#29 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,409
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 13 October 2005 - 04:05 AM

Just to make sure, download this uti:
BEEBLEBROX
http://students.cs.byu.edu/~codyb/

And examine the Bootsector of that partition, in the "Jump" editbox you should have "EB5290"

jaclaz

#30 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 15 October 2005 - 11:10 AM

@Jaclaz

Here the report:
Partition 3 (which i can't boot with Bootpart added bootsector in boot.ini)
NTFS boot sector jump value = EB5B90

Partition 0 (which boot with Bootpart added C:\xpe.bin bootsector in boot.ini)
NTFS boot sector jump value = EB5290

What's strange is that i have started a new 2003 SP1 install on this Partition 3 drive letter E: from my current running Win2003Server (WINNT32.EXE /syspart:E: blahblahblah_others_switches_here) in order to get a bootable partition. Unfortunately, when reboot done, my active partition becomes this Partition 3 and isn't bootable (blinking cursor).

Question: can i change the Jump value of partition 3 to EB5290 without backing first all data (is this change destructive?)

@cdob
Is there a tool to do the same from within WinPE.
My laptop has no internal or external CD Drive and can't boot from USB Key. I can only boot from Network (PXE) or from a PCMCIA 5Gb hard drive which i don't have (too expensive)
to do some manipulation on the MBR, I PXEboot a SDI WinPE in RAM for example to switch back Partition 2 to active with MBRTool.
I haven't got a PXEBootable from LAN image of recovery console

Thanks for your help to both, i will becomes a MBR / bootsector expert

:lol:

This post has been edited by Bilou_Gateux: 15 October 2005 - 11:20 AM


#31 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,409
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 16 October 2005 - 09:31 AM

Bilou_Gateux said:

My laptop has no internal or external CD Drive and can't boot from USB Key. I can only boot from Network (PXE) or from a PCMCIA 5Gb hard drive which i don't have


Well, that's a clear example of a "Virtual" drive!
:lol:

Seriously,
the EB5290 is the standard "jump" code for NTFS partitions.
The "jump" code tells where the next instruction is to be found, so
EB=jump instruction
52=offset (i.e. distance where to jump)
90=nop (No operation, just a value to "pad" a byte)

As 52 hex means 82 decimal, and 5B hex means 91, "your" bootsector jumps 9 bytes longer than it should, unless the boot code you have is not the original one.

Best option, as I see it, would be to re-format that partition, but you can try checking the following (you need a hex editor capable of opening directly a disk or use a disk editor to copy that sector to a file, then use the hex editor:
1) If from byte 54 hex you find values FA 33 C0, the boot record seems ok and probably just the 52/5B is an error
2) If from byte 54 hex you do not find values FA 33 C0, the boot record is UNKNOWN.

here is a reference to NT/2K/XP bootcode:
http://thestarman.pcministry.com/asm/mbr/M...tail.htm#ntfsbr
http://thestarman.pc.../mbr/NTFSBR.htm

With that reference and a copy of the bootsector of another NTFS partition, you should be able to re-write manually the bootrecord wht an hex editor.

jaclaz

#32 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 17 October 2005 - 09:24 AM

View Postjaclaz, on Oct 16 2005, 09:31 AM, said:

Best option, as I see it, would be to re-format that partition
jaclaz


I've have found an alternative to hexedit some bootsector. I've have restored from network the original OS image shipped on a recovery CD by the manufacturer. Image was made with Ghost and i've used GhosCast Server from Symantec Ghost solution Suite to restore gho image stored on network shared CD to my local notebook HDD.

Partition restored is FAT32. Now, i can boot the partition 3.
Next step, on partition 3 i have swapped XP files (ntdetect.com ntldr) with 2003 Server SP1 files.

This post has been edited by Bilou_Gateux: 17 October 2005 - 10:13 AM


#33 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 24 October 2005 - 04:51 AM

@Bilou_Gateux
I'm glad, you got boot working.

Are you ready for the next step?

As jaclaz pointed above, ms use a bootcode "bootstrap code".

Bootpart copy 512 byte bootsector only.

Recocery Console use C:\CMDCONS\BOOTSECT.DAT, 8 kb.
That's bootsector and "bootstrap code".
How to use that way?

Given a primary active partition c: and a partition e:

Grap bootstrap from partition e:
http://www.nu2.nu/mkbt/
c:\>mkbt -x -c e: c:\bootstrtap-e
File bootstrtap-e is written, filesize 8 kb.


Copy recocery console files to e:\cmdcons and edit c:\boot.ini
c:\bootstrap-e="Boot e:" /cmdcons
Booting recory console from e: is possible.

By the way: of course [MassStorageDrivers] section is used, there are:
e:\cmdcons\winnt.sif
e:\cmdcons\$OEM$


geitonaki found a solution for multibooting WinXP/Win2003:
http://www.msfn.org/board/index.php?s=&showtopic=58410
Thanks.

Boot different SDI images from one partition:
bootstrap-e loads file ntldr. bootstrap-e contains file name ntldr.
Copy bootstrap-e to bootstrap-e01
Hexedit bootstrap-e01 offset 514, change ntldr to ldr01.
Create file e:\ldr01 (editable w2003 sp1 setupldr.bin)
Hexedit e:\ldr01: change winnt.sif win01.sif
Edit e:\win01.sif, set another image.
Edit c:\boot.ini: c:\boot-e01="Boot e: win01.sif"

Repeat above steps and create c:\boot.ini:
c:\bootstrap-e01="Bootstrap e: 01"
c:\bootstrap-e02="Bootstrap e: 02"
c:\bootstrap-e03="Bootstrap e: 03"
c:\bootstrap-e04="Bootstrap e: 04"


Files exit:

Quote

c:\bootstrap-e01
c:\bootstrap-e02
c:\bootstrap-e03
c:\bootstrap-e04
e:\ldr01
e:\ldr02
e:\ldr03
e:\ldr04
e:\WIN01.SIF
e:\WIN02.SIF
e:\WIN03.SIF
e:\WIN04.SIF


#34 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 24 October 2005 - 08:13 AM

View Postcdob, on Oct 24 2005, 04:51 AM, said:

@Bilou_Gateux
I'm glad, you got boot working.

Are you ready for the next step?

Given a primary active partition c: and a partition e:

Grap bootstrap from partition e:
http://www.nu2.nu/mkbt/
c:\>mkbt -x -c e: c:\bootstrtap-e
File bootstrtap-e is written, filesize 8 kb.


C: is my primary active partition (Win2003ServerSP1)
E: is another primary partition (WinXPSP1 restored from recovery CD)
when i grap bootstrap from partition e:
the size of the created file on root of c: is only 512 byte?

the output of mkbt -x -c e: c:\bootstrap-e command:

Quote

* Expert mode (-x)
* Copy bootsector mode (-c)
Reading source boot sector from "\\.E:"
Writing boot sector back to "c:\bootstrap-e"

This post has been edited by Bilou_Gateux: 24 October 2005 - 08:15 AM


#35 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 24 October 2005 - 02:26 PM

@Bilou_Gateux

Strange, version from posted link I get

Quote

D:\mkbt20>mkbt -x -c e: c:\bootstrap-e2
* Expert mode (-x)
* Copy bootsector mode (-c)
NTFS, settings number of sectors to 16
Do you use a NTFS partiton?

Another possibility: cygwin dd

Quote

$ dd if=//./e: of=c:/bootstrap-e-dd count=16
16+0 records in
16+0 records out


#36 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,409
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 25 October 2005 - 07:03 AM

Quote

Another possibility: cygwin dd


Other possibilities (just for the record):
dd for windows:
http://uranus.it.swi...rawwrite/dd.htm


Findpart, see my post here:
http://www.911cd.net/forums//index.php?sho...877&#entry89877



@cdob
The length of the NTFS (complete) boot code appears to be 6 (+1) sectors long, see links in my previous post here and in the one on the 911CD board linked to above, sectors after the first 7 (0÷6) are just zero byte filled.

jaclaz

#37 User is offline   lyh728 

  • Group: Members
  • Posts: 8
  • Joined: 07-November 04

Posted 11 November 2005 - 09:30 AM

can winpe installed and run from logical partition?

i know it can run from primary partition ,but i can not make it run from logical parttion

error said can not systemroot\system32\ntoskrnl.exe
but i do not know how pe know systemroot

#38 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 18 December 2005 - 12:17 PM

View Postcdob, on Oct 24 2005, 02:26 PM, said:

@Bilou_Gateux

Strange, version from posted link I get

Quote

D:\mkbt20>mkbt -x -c e: c:\bootstrap-e2
* Expert mode (-x)
* Copy bootsector mode (-c)
NTFS, settings number of sectors to 16

Do you use a NTFS partiton?


Yes.
Finally got it to work using nu2.nu Bart tools mkbt20 to create the bootstrap and nt2peldr.exe.

I have now 2 sets of file for booting 2 different SDI images in my root.
peboo1.bin 8K
peboot.bin 8K
peldr (patched setupldr.bin and hexedited)
peld1 (patched setupldr.bin and hexedited)
winnt.sif
win01.sif


boot.ini
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\peboot.bin="RAMDisk -winpe" 
C:\peboo1.bin="RAMDisk -minint" 
C:\xpe.bin=" Windows XP Embedded" 
C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons


winnt.sif
[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=RECOVERY\WINPE.SDI"


win01.sif
[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=RECOVERY\MININT.SDI"


Thanks for help and support. :rolleyes:

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy