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

#1
grafx1

grafx1

    Advanced Member

  • Member
  • PipPipPip
  • 497 posts
can i run (boot) Windows PE from Hard Drive ? How ?
Thank you.
Posted Image


How to remove advertisement from MSFN

#2
mats

mats

    Member

  • Member
  • PipPip
  • 206 posts
Yes you can.

The exact steps are described in winpe.chm which is in the docs directory of the original winpe cd or download.

#3
n00dles

n00dles

    Newbie

  • Member
  • 21 posts
And in case you want to get WinPE from Hard drive into RAM, here's a shamelessly self promoting link

Run Windows PE from RAM

This is how I'm remotely deploying servers now... boot remote server off a floppy, dump an image of a disk with PE on it, reboot and run PE from RAM.

#4
mats

mats

    Member

  • Member
  • PipPip
  • 206 posts
Nice one n00dles

#5
stasys44

stasys44

    Member

  • Member
  • PipPip
  • 186 posts
There is another topic that is earlier than here, why to create the same?

(For your attention there are useful articles from www.911cd.net forum (I am guest there))

Dr. Hoang posted 14th August
MSFN Forums > Unattended Windows Discussion & Support > Windows PE
>Help in run Bart PE from HD ?!:

quote=xtremee,Jun 21 2005, 12:02 PM]Hi Xtremee,
You could read two newest articles of mine :
http://www.911cd.net...showtopic=13087 How to run XPE in hard disk ( different ways for any new bie )
http://www.911cd.net...showtopic=13125 Create the real DOS to XPE in another primary partition . You could get rid off the dos PE plugin
I think you make out of it soon. Good luck
Dr Hoang from Vietnam


DrHoang
Regarding the article "How to run XPE in hard disk"

I made another partition for XPE and copied folders and files, renamed files, made this partition primary, hide my partition with Windows XP. (My second HDD with FAT partition FDD does not see?)
But I got error - Cannot find Autocheck and reboot.

#6
stasys44

stasys44

    Member

  • Member
  • PipPip
  • 186 posts
n00dles

Could you share files:
ntldr, ntdetect and ramdisk.sys from a Windows Server 2003 + SP1 source

#7
DrHoang

DrHoang

    Newbie

  • Member
  • 37 posts

n00dles

Could you share files:
ntldr, ntdetect and ramdisk.sys from a Windows Server 2003 + SP1 source

<{POST_SNAPBACK}>

Hi Stasys 44.
Send me an E mail, I would like to share you those 3 files you want
You got that error( Cannot find Autocheck and reboot ) because you don't unhide that XPE just created .
To unhide this primary partition, you have to use pqbw.exe( from PM 8 ) to choose XPE and start now. Reboot and you could boot to XPE now after unhiding it.
Dr Hoang

Edited by DrHoang, 24 August 2005 - 08:02 AM.


#8
mats

mats

    Member

  • Member
  • PipPip
  • 206 posts
Stasys44:

No offence but the main difference is that this is Winpe not barts variant and that matters for many of us who got relations with microsoft since MS want touch bartPe but they will support WiinPE

#9
stasys44

stasys44

    Member

  • Member
  • PipPip
  • 186 posts
Ooops, sory

I saw what i want to see.
Excuse me.

#10
mats

mats

    Member

  • Member
  • PipPip
  • 206 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

#11
rnsavage

rnsavage
  • Member
  • 2 posts
Tried both the n00dles approach and mats, and get the cursor flashing on boot, rather than booting my winpe.iso image

Used WinPE supplied with Embedded Studio, and created an ISO image using Barts BCD process, with the ramdisk.sys from Windows 2003 SP1 source.

Have managed to get WinPE dual-booting using the bootsect.dat file, but this will be no use in the environment I am creating.

I have got legacy hardware that does not have External USB boot (and does not have an internal CD-ROM). I will not have the option of PXE boot into WinPE.

The only thing I have is a floppy drive, which I can get to see the External USB DVD-ROM, but you cannot get WinPE to then boot (as there is no run EXE you can run from DOS to kick of the WinPE startup!). The only way I could see is to copy a Ghost image across to the harddrive which contained WinPE running in a RamDrive.

Does anybody have any ideas why my WinPE ISO would not boot? Can anybody think of a better way?

Rick

#12
mats

mats

    Member

  • Member
  • PipPip
  • 206 posts
If you can build an image from server 2003 with pe2005 and then try my version. It's still in our labs but it is working on about ten diffrent systems so far

#13
1993

1993
  • Member
  • 5 posts
You mean an external HD? USB?

#14
rnsavage

rnsavage
  • Member
  • 2 posts
Trying both external USB CD-ROM (with no BIOS boot)

or copying the ISO to the harddrive (internal IDE)

Rick

#15
mats

mats

    Member

  • Member
  • PipPip
  • 206 posts
Internal ide with a 2003 image works. I deployed a few yesterday. Now got a script that will install pe on the remote machine. Add pe to boot ini.

When i want to reinstall that system i just run a script that changes boot.ini and reboots the system into pe. my Pe image will then reinstall the system

#16
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 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

<{POST_SNAPBACK}>


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, 05 October 2005 - 01:57 AM.

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

#17
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts
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.

#18
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts

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

#19
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,019 posts
  • OS:none specified
  • Country: Country Flag
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/...-dual-boot.html
(debug is already in the OS files)
and here is one for dd:
http://doc.rmplc.co....T-Loader-5.html
(dd is already in ANY Linux distro, but there a few versions for windows too:
http://uranus.it.swi...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.winimag...ewforum.php?f=1
where you can find many questions already answered.

jaclaz

#20
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts

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

#21
getwired

getwired

    Member

  • Member
  • PipPip
  • 231 posts

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
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,019 posts
  • OS:none specified
  • Country: Country Flag
Yep, I was referring to how the "real" NTLDR works.

jaclaz

#23
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts
@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...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.

#24
mats

mats

    Member

  • Member
  • PipPip
  • 206 posts
just to clarify setupldr will read the first file with a .sif extension it finds. Not just txtsetup.sif

#25
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
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, 10 October 2005 - 03:04 AM.

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



How to remove advertisement from MSFN