Jump to content

Boot PE from Hard Drive


grafx1

Recommended Posts

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.pcministry.com/asm/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

Link to comment
Share on other sites


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.

Edited by Bilou_Gateux
Link to comment
Share on other sites

@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:

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

Link to comment
Share on other sites

@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:

* Expert mode (-x)

* Copy bootsector mode (-c)

Reading source boot sector from "\\.E:"

Writing boot sector back to "c:\bootstrap-e"

Edited by Bilou_Gateux
Link to comment
Share on other sites

@Bilou_Gateux

Strange, version from posted link I get

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

$ dd if=//./e: of=c:/bootstrap-e-dd count=16

16+0 records in

16+0 records out

Link to comment
Share on other sites

Another possibility: cygwin dd

Other possibilities (just for the record):

dd for windows:

http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htm

Findpart, see my post here:

http://www.911cd.net/forums//index.php?sho...877entry89877

@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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...
@Bilou_Gateux

Strange, version from posted link I get

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:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...