Jump to content

Boot PE from Hard Drive


grafx1

Recommended Posts

According to MS you need to install recovery console to boot PE from boot.ini

Well, there is another way of doing this. i prefer the new ramboot style so that will be used in this example. The iso filename should be max 8.3 according to noodles so i used test1.iso. Ofcourse you can name it whatever you like.

1. Grab a copy of mkbt and nt2peldr from bart

2. make a working ramdisk booting pe iso, place it in c:\ with the name test1.iso

3. copy setupldr.bin from a server2003sp1 disc to c:\peldr

4. run mkbt -c -x c: c:\peboot.bin

5. run nt2peldr c:\peboot.bin

6. Edit boot.ini and add a line

c:\peboot.bin="PE From ram"

7. Create a winnt.sif file with the following in it

[setupData]

BootDevice = "ramdisk(0)"

BootPath = "\i386\System32\"

OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=test1.iso"

Architecture = "i386"

Reboot the system and enjoy

This method is definitively very interesting. I use a small variant. My WinPE image is stored in a sdi file in a subfolder of my %systemdrive%

[setupData]BootDevice = "ramdisk(0)"

BootPath = "\i386\System32\"

OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=RECOVERY\WINPE.SDI"

SDI supports NTFS compression and saves a lot of space.

Infos to build SDI file comes from http://www.911cd.net/forums

System Deployment Image (SDI) is part of Microsoft Windows XP Embedded, SP2 Update Evaluation Edition.

Select Windows XP Embedded SP1 Tools option in download products list.

Edited by Bilou_Gateux
Link to comment
Share on other sites


Another possibility: boot a primary partition

Given a existing primary active partition c:

Create a additional primary partition, set drive letter x:

Format x:, bootsector loads file \ntldr.

Copy files to:

x:\ntldr (renamed setupldr.bin)

x:\ntdetect.com

x:\minint\ (from PE \I386\)

Edit C:\boot.ini, chain load bootsector x:

Bootpart does create a appropiate boot file.

http://www.winimage.com/bootpart.htm

Scroll down and read BeOS exmaple.

Changed usage: use x:\winnt.sif instead of x:\minint\.

That way, you can boot a ISO image or SDI image.

Link to comment
Share on other sites

Another possibility: boot a primary partition

Given a existing primary active partition c:

Create a additional primary partition, set drive letter x:

Format x:, bootsector loads file \ntldr.

Copy files to:

x:\ntldr (renamed setupldr.bin)

x:\ntdetect.com

x:\minint\ (from PE \I386\)

Edit C:\boot.ini, chain load bootsector x:

Bootpart does create a appropiate boot file.

http://www.winimage.com/bootpart.htm

Scroll down and read BeOS exmaple.

Changed usage: use x:\winnt.sif instead of x:\minint\.

That way, you can boot a ISO image or SDI image.

Thanks for your input, i would like to try it but due to barrier language, i need more details to understand the whole process:

Q: Additional partition with X: drive letter:

could i format it with NTFS file system?

Q: BOOTPART usage:

assuming my boot partition, which the files NTLDR, NTDETECT.COM and BOOT.INI reside on is partition(1) with drive letter C:

syntax of the bootpart command: BOOTPART 1 C:\PEBOOT.BIN WinPE correct?

Q: Changed usage use x:\winnt.sif

what should i do to use my WINPE.SDI image described in my previous post? Copy it to X:\ along with WINNT.SIF.

I'm not in front of the box with the dual boot (Windows Server 2003 SP1 and WinPE) and will check this method later. All supplemental infos you can give us will help to accomplish this method.

Link to comment
Share on other sites

Though I am not an expert with WinPe, but maybe I can clarify some of the part related to bootpart.

ANY partition, regardless if it is Primary or Logical, regardless if it is NTFS, FAT16 or FAT32, formatted under 2K/XP will have it's bootsector with the standard Microsoft code to load NTLDR.

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)

If used with entry of type 1) above, NTLDR will proceed booting the Windows NT files if used with an entry of type 2) above, NTLDR will work as a "chain" bootloader, giving full control to the RAW bootsector, just like it was the bootsector of the active partition.

Bootpart was originally developed for people wanting to double boot NT and DOS 6.22, and evolved in the years.

It can produce TWO kind of output files:

1) A standard bootsector:

the syntax is following:

bootpart <OS> <filename>

Where OS can be (case insensitive):

DOS622

MSDOS MS-DOS 6.22 I.D. MSDOS5.0

WIN95 Windows 95 I.D. MSWIN4.0

WIN95OSR2

WIN95SR2

WIN95OEMSR2 Windows 95 OEMSR2 I.D. MSWIN4.1

WIN98

WINME Windows 98 or Windows ME I.D. MSWIN4.1

NT

WINNT

WIN200

WIN2K

WINXP Windows NT/2K/XP and 2003

VISTA

WINVISTA Windows VISTA (BOOTMGR instead of NTLDR)

OPENDOS OpenDos I.D. NWDOS7.0

(the "code" of the bootsector will change, but the "data" - like number of starting position of the partition, length, etc. - will be always the same, taken by your existing bootsector

2) A copy of a bootsector ALREADY on another partition:

the syntax is following:

bootpart <partition_number_as seen_by_bootpart> <filename>

this will simply copy the bootsector of the selected partition to <filename>

The same effect can be obtained by using a diskeditor, debug or dd.

here is a link for debug:

http://www.bcpl.net/~dbryan/ntfs-dual-boot.html

(debug is already in the OS files)

and here is one for dd:

http://doc.rmplc.co.uk/linux/LDP/HOWTO/Lin...T-Loader-5.html

(dd is already in ANY Linux distro, but there a few versions for windows too:

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

If you add at the END of any of the two commands a string inside quotes, bootpart will add the entry to BOOT.INI.

There is a section in the Winimage Forums dedicated to bootpart as well:

http://forum.winimage.com/viewforum.php?f=1

where you can find many questions already answered.

jaclaz

Link to comment
Share on other sites

2) A copy of a bootsector ALREADY on another partition:

the syntax is following:

bootpart <partition_number_as seen_by_bootpart> <filename>

this will simply copy the bootsector of the selected partition to <filename>

Thanks for your input. I will change my bootpart command replacing 1 (primary partition booting Windows 2003 Server with the number of my partition where i will store my WinPE SDI image. but actually, this second primary partition is just used for storing my swap file. If the partition is formated with NTFS, i should be able to extract the boot sector.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

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

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:

ntdetect.com >>>2003 SP1<<<

NTLDR >>>renamed 2003 SP1 SETUPLDR.BIN<<<

WINNT.SIF

\RECOVERY\WINPE.SDI

pagefile.sys >>>2003 Server swap file<<<

Edited by Bilou_Gateux
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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