Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Boot PE from Hard Drive

- - - - -

  • Please log in to reply
37 replies to this topic

#26
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,006 posts
  • Joined 29-September 05
@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.


How to remove advertisement from MSFN

#27
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04
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?

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


OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#28
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,006 posts
  • Joined 29-September 05
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
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,852 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
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
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04
@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:

Edited by Bilou_Gateux, 15 October 2005 - 11:20 AM.

OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#31
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,852 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

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.pc...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
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04

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, 17 October 2005 - 10:13 AM.

OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#33
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,006 posts
  • Joined 29-September 05
@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/...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



#34
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04

@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, 24 October 2005 - 08:15 AM.

OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#35
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,006 posts
  • Joined 29-September 05
@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



#36
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,852 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

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...877



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

lyh728
  • Member
  • 8 posts
  • Joined 07-November 04
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
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04

@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:
OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users