IPB

Welcome Guest ( Log In | Register )

6 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Bartpe Usb One Button Installer, pe2usb UPDATED for HDD like install
fafot
post Mar 6 2005, 03:40 AM
Post #1


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



After reading the 2 topics:
Boot Bartpe From Usb Flash Drive, please try this!
Pe2usb: Installing Bartpe To Usb Flash Disk
of how to install BartPE/XPE/Any other PE to USB, I tried them and found the following test results:

I am using UFD Kingston Data Traveller Elite (the fastest in the market today) 512Mb. I made a XPE 1.02 with Bart 3.1.3 total size of BartPE directory: 485Mb, total size of ISO 470Mb (using the -duplicates-once option). I also have AutoRamResizer 1.9 that setup memory between 216 and 255Mb and Ramdriv 5.2.10.2m. I also used ramsize manual script setups and on all of them 256mb was working OK.

Way 1. Bart's pe2usb - the load took 15 minutes!!! on my 2 PC's and laptop.
Way 2. Copying like to HDD and adding setupldr and ramdisk from server2003sp1 like Bart described. That load took on Athlon 2500+ PC with 512Mb memory 4:47 minutes, on P4 3200 1Gb memory: 7:36 min and on Laptop Celeron D 2.666Ghz 768Mb memory: 7:37. (see the script below).

My conclusions: The second way is faster by at least 50% and is not dependent on the ISO size to PC memory relation to load!

a) By using the second way the I could load that 495Mb XPE with 256Mb memory setup by ramsize/AutoRamResizer on 512 Mb PC that is just impossible with the ISO.
b ) The loading time is twice to 3 times faster. I don't know why on the Athlon PC it loaded faster (the 1 Gb memory on the P4 3200 is faster) but it looks to me that on any Pentium PC it is taking the same time. The laptop has much slower memory that the P4 PC and it took exactly the same time!

I tried using different format utilities and different HP format utilities. That is another crazy thing. The only format utility that worked OK is the HP HPUSBFW Windows-based Format Utility for HP Drive Key or DiskOnKey USB version 2.00.006 A (6 Feb 04). The newer one version 2.1.8 A from (17 May 04) or (20 Jan 05) did NOT made the stick bootable! The same with the command line HP utility from all 3 packages! mad.gif

I created a pe2usb-FULL.cmd script that is based on two Bart's scripts: pe2usb and peinst. (This is close to what blackbox described in the other thread). That script does the following:
1. If needed formats the UFD by calling the HPUSBFW.EXE.
2. Checking the UFD boot sector.
3. Copy srsp1\ramdisk.sys to the source\i386\system32\drivers.
4. Copy srsp1\setupldr.bin to UFD as ntldr.
5. Copy i386\ntdetect.com to UFD root.
6. Doing HDD like install on the UFD by copying the I386 as minint and Programs.

NO other modifications are needed.
(Format the UFD to FAT to be most compatible. I notice that formatting with Fat32 boot on my 2 PC's but NOT on the laptop. NTFS does not boot at all. blink.gif )

Usage is like Bart’s pe2usb:
Pe2usb-FULL [-f] <USB drive:>

Before using that script do the following:
EDIT: You should copy the pe2usb-FULL.cmd to your <pebuilder> directory.
A. Download the HP format utility from the link above, install and copy the HPUSBFW.EXE to <pebuilder>\srsp1
B. Do steps 2 and 3 from Bart’s pe2usb:
QUOTE
2) Server 2003 SP1 (or a release candidate). You can download this from
   http://www.microsoft.com/downloads/details...20-8E1708C3ED46
   This file is large, about 350MB!!!
  Unpack the files from the service pack (this is not installing) with:
  sr1sp.exe -x, lets assume you extract it to c:\server2003sp1
  Copy the file c:\server2003sp1\i386\setupldr.bin to the <pebuilder>\srsp1 folder
  Expand the file c:\server2003sp1\i386\ramdisk.sy_ to the <pebuilder>\srsp1 folder
  expand -r c:\server2003sp1\i386\ramdisk.sy_ <pebuilder>\srsp1
  You can now remove the c:\server2003sp1 folder, not needed anymore...
3) Build BartPE using pebuilder as normal, you must set the output folder to
   "BartPE", you do not need to generate an ISO image for now.



pe2usb-FULL.cmd
CODE
echo off
title BartPE USB Installer for USB HDD like install (minint and programs)
echo.
echo BartPE USB Installer v1.0.1.1 UPDATED for HDD like install
echo Copyright (c) 2005 Bart Lagerweij. All rights reserved.
echo This program is free software. Use and/or distribute it under
echo the terms of the Nu2 License.
echo.
echo Updated by fafot for USB - HDD like install (minint and programs) (not for ISO)
echo.
setlocal
set _format=
set _target=
set _base=%~dp0
if "%1" == "-f" set _format=1& shift
set _target=%~d1
echo %_target%
echo %_base%
if "%_target%" == "" (
    echo Usage pe2usb [-f] ^<drive:^>
    echo.
    echo Where:
    echo     ^<drive:^> The drive letter of your USB flash drive
    echo     -f       Format USB drive and install patched bootsector
    echo              ^(this is only needed the first time^)
    goto _err)
echo USB target drive set to "%_target%"
echo Checking drive "%_target%"
if not exist %_target%\nul (
    echo Error: Drive "%_target%" does not exist!
    goto _err)
if "%_target%" == "%SystemDrive%" (
    echo Error: Trying to install to your SystemDrive?!?
    goto _err)
echo Checking files...
for %%i in (%_base%plugin\peinst\mkbt.exe %_base%srsp1\ramdisk.sys %_base%srsp1\setupldr.bin) do if not exist "%%i" (
    echo Error: File %%i not found!
    echo Please check the pe2usb.txt for details!
    goto _err)
if not "%_format%" == "1" goto _install
echo.
echo *******************************************************************************
echo Drive %_target% will be formatted!!! All data on drive will be erased!
echo *******************************************************************************
echo.
set /p _answer=Type "YES" (uppercase) to continue:
if "%_answer%" == "YES" goto _format
echo You type "%_answer%", format aborted...
goto _err
:_format
echo Formating drive "%_target%"...

%_base%srsp1\HPUSBFW.EXE %_target%
if errorlevel 1 (
    echo Error: Format %_target% failed!
    goto _err)

:_install
:: Finding sourcs directory
FOR /f "tokens=1* delims== skip=1 eol=;" %%a IN (%_base%input.inf) DO IF "%%a"=="fulloutdir" SET _source=%%b
echo Source directory from input.inf: %_source%


echo Checking bootsector from drive %_target%
%_base%plugin\peinst\mkbt.exe -x -i %_target%
if errorlevel 1 (
    echo Error: Boot sector inspection failed!
    goto _err)
echo Copying %_base%srsp1\ramdisk.sys to %_source%i386\system32\drivers
copy /y %_base%srsp1\ramdisk.sys %_source%i386\system32\drivers
if errorlevel 1 (
    echo Error: copy %_base%srsp1\ramdisk.sys to %_source%i386\system32\drivers failed!
    goto _err)
echo Copying %_base%srsp1\setupldr.bin to %_target%\ntldr
copy /y %_base%srsp1\setupldr.bin %_target%\ntldr
if errorlevel 1 (
    echo Error: copy %_base%srsp1\setupldr.bin to %_target%\ntldr failed!
    goto _err)
echo Copying %_source%i386\ntdetect.com to %_target%\
copy /y %_source%i386\ntdetect.com %_target%\
if errorlevel 1 (
    echo Error: copy %_source%i386\ntdetect.com to %_target%\ failed!
    goto _err)

:: Copy I386 and Programs
echo Copying %_source%i386 to %_target%\minint
call :_copy i386 minint
if errorlevel 1 goto _err
echo Copying %_source%programs to %_target%\programs
call :_copy programs programs
if errorlevel 1 goto _err
goto _done

:_copy
if "%~1" == "" goto :eof
if "%~2" == "" goto :eof
if not exist "%_source%\%~1" goto :eof
if exist "%_target%\%~2" (
    echo pe2USB-FULL: Checking for BartPE tag file ^(save removal^)...
    if not exist "%_target%\%~2\bartpe.tag" goto _tagErr
    echo pe2USB-FULL: Removing %_target%\%~2
    rmdir /s /q "%_target%\%~2\")
    if errorlevel 1 goto :eof
    mkdir "%_target%\%~2\"
    if errorlevel 1 goto :eof
    echo pe2USB-FULL: Tag file for BartPE do not remove! > "%_target%\%~2\bartpe.tag"
    if errorlevel 1 goto :eof
echo pe2USB-FULL: Copying files from "%_source%\%~1" to "%_target%\%~2"
xcopy /e /s "%_source%\%~1\*.*" "%_target%\%~2\"
goto :eof
:_tagErr
echo pe2USB-FULL: Tag file "%_target%\%~2\bartpe.tag" not found!
echo pe2USB-FULL: Not safe to remove directory!
echo.
echo pe2USB-FULL: Workaround:
echo pe2USB-FULL: You could delete the folder "%_target%\%~2" manually and restart the installation...
rem set errorlevel to 1 by (mis)using color
color 00
goto _end

:_done
echo.
echo Ready!
echo.
goto _end

:_err
echo.
echo Aborted...
echo There was an error, script aborted!!!
rem set errorlevel to 1 by (mis)using color
color 00

:_end
endlocal
echo.
echo Done (program will be closed)
pause
exit


--------------------
Go to the top of the page
 
+Quote Post
Cqz
post Mar 6 2005, 03:38 PM
Post #2


Silver Member
***

Group: Members
Posts: 247
Joined: 16-May 03
Member No.: 778



@fafot,

Thank you for posting the results of your experiments and your script. I have not used any of this yet, but wish to give some quick feed back and thanks.

It is interesting to note that you also observerd that different versions of hp utility behaves differently. I had similar results, but had not known this for a very long time. Whenever I had tried some scripts poseted in this forum, it failed; but I was all the time using the wrong version of the formatter up until a weeks ago. The version I found which works here is SP27213.exe (I do not remember where I downloaded that from) but has the same number as the one at the url you provided.

How does the USB build time compare in your method to that of bart's?


--------------------
Cordially, Cqz
Go to the top of the page
 
+Quote Post
fafot
post Mar 6 2005, 06:57 PM
Post #3


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



@Cqz

The USB build time - if you mean how long it take to create the ISO on the USB or copy the files - nearly the same tme - few minutes.

No the HP utility version that works for me is version 2.00.006 A (6 Feb 04).


--------------------
Go to the top of the page
 
+Quote Post
Cqz
post Mar 6 2005, 09:02 PM
Post #4


Silver Member
***

Group: Members
Posts: 247
Joined: 16-May 03
Member No.: 778



@fafot.

The installation file at the url you gave has the name SP27213.exe. That was the same name when I downloaded it, af ew weeks ago. It is possible HP does not update the installation file name. After install, when I run it, it shows version 2.0.6 on the tittle bar. From the file properties of the executable HPUSBFW.EXE,
file version 2.0.6.0, date modified 2004.01.21. size 432K (Of course the date created is a later one, the day I installed it.)

It is posibble we have different version, and there may be more that one working version.


--------------------
Cordially, Cqz
Go to the top of the page
 
+Quote Post
fafot
post Mar 6 2005, 11:40 PM
Post #5


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



@Cqz

We have the same versions! I just checked - 432K 21 Jan 2004.


--------------------
Go to the top of the page
 
+Quote Post
Cqz
post Mar 7 2005, 12:16 AM
Post #6


Silver Member
***

Group: Members
Posts: 247
Joined: 16-May 03
Member No.: 778



There is a an error in the posted script (this might have happened with the web posting)
:: Finding sourcs directory
FOR /f "tokens=1* delims== skip=1 eol=;" %%a IN (%_base%input.inf) DO IF "%%a"=="fulloutdir" SET _source=%%b\
The last \ was missing on the post (at least waht I can see and copy).


--------------------
Cordially, Cqz
Go to the top of the page
 
+Quote Post
fafot
post Mar 7 2005, 03:32 AM
Post #7


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



QUOTE
The last \ was missing on the post (at least waht I can see and copy).

NO - nothing is missing You don't need the closing slash!
Did you try to run it????unsure.gif


--------------------
Go to the top of the page
 
+Quote Post
fly
post Mar 7 2005, 10:45 AM
Post #8


Member
**

Group: Members
Posts: 83
Joined: 7-March 05
Member No.: 10,668



QUOTE (fafot @ Mar 6 2005, 08:40 AM)
Way 1. Bart's pe2usb - the load took 15 minutes!!! on my 2 PC's and laptop.
Way 2. Copying like to HDD and adding setupldr and ramdisk from server2003sp1 like Bart described. That load took on Athlon 2500+ PC with 512Mb memory 4:47 minutes, on P4 3200 1Gb memory: 7:36 min and on Laptop Celeron D 2.666Ghz 768Mb memory: 7:37. (see the script below).


Why is it taking so long for you? It takes <1 minute on my new Dell GX280s, and not more than 5 minutes on my GX270s...
Go to the top of the page
 
+Quote Post
fafot
post Mar 7 2005, 03:11 PM
Post #9


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



What is the size of your BartPE directory? 485Mb or much less?


--------------------
Go to the top of the page
 
+Quote Post
Cqz
post Mar 7 2005, 05:16 PM
Post #10


Silver Member
***

Group: Members
Posts: 247
Joined: 16-May 03
Member No.: 778



QUOTE (fafot @ Mar 7 2005, 01:32 AM)
QUOTE
The last \ was missing on the post (at least waht I can see and copy).

NO - nothing is missing You don't need the closing slash!
Did you try to run it????unsure.gif

@fafot,
I had to add the \ before it will run here, under winXP SP2.

BTW, for me to build the USB (the copy using your script) for PE of about 450M, it takes about 5 min or more. It is usb 2.0 interface and the cpu is 1.6GHz. I think the speed depends a lot on the speicifics of how the motherboard/bios implemented the usb interface. If I had formatted the USB as NTFS, the copy will be almost 5x faster, but unfortunately here that format does not boot sad.gif. The reason the ntfs fails boot, I suspect, is beacuse the that particular bootloader we use with usb is not capable of handling NTFS. What do you think?


--------------------
Cordially, Cqz
Go to the top of the page
 
+Quote Post
fafot
post Mar 7 2005, 09:36 PM
Post #11


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



@Cqz

QUOTE
I had to add the \ before it will run here, under winXP SP2.
That is quite a mystery for me!!!! rolleyes.gif I am using XP Pro, SP2 and I don't need the \ .

QUOTE
If I had formatted the USB as NTFS, the copy will be almost 5x faster,
Yes, I expirience the same problem. The copy speed depends on the UFD read\write speed. On my UFD the copy takes only 2:25 min for 495Mb that is becoming 511Mb on FAT formatted UFD. Fat32 is a bit faster, 2.15 min but its real advantage is that the same 495Mb takes only 504Mb on UDF. The disadvantage is that it does not want to boot on the laptop. mad.gif

I think that we are probably missing some sort of USB driver that should sit in the UFD root and will enable smooth booting with any formatting.


--------------------
Go to the top of the page
 
+Quote Post
powaking
post Mar 8 2005, 01:08 PM
Post #12


Silver Member
***

Group: Members
Posts: 163
Joined: 19-July 04
Member No.: 6,709



I'm actually getting progress using this method. Now when my flash starts to boot I get this error:

File \minint\system32\ntoskrnl.exe could be loaded
The error code is 14

Did a search on the flash drive and ntoskrnl.exe is no where to be found.

Edit: Manually copied this file into the folder and its booting. See how far it goes.
I'm using a Sandisc Cruzer Mini 1gb on an HP NC6000 laptop.

Edit 2: It boots up but I find I have to launch the network config app manually. During the installation of the network card it locked up my machine. Still needs a little work but this is huge progress.
Go to the top of the page
 
+Quote Post
webmedic
post Mar 8 2005, 01:10 PM
Post #13


Gold Member
****

Group: Members
Posts: 612
Joined: 26-August 03
Member No.: 1,504



i get this exact same error but like above it is better than nothing.
Go to the top of the page
 
+Quote Post
fafot
post Mar 8 2005, 04:39 PM
Post #14


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



@powaking & webmedic

Have you checked that the system32\ntoskrnl.exe exists in the BartPE\i386\system32 ? As I see, it has nothing to do with the script because it just copy the files as they are in BartPE on the HDD.


--------------------
Go to the top of the page
 
+Quote Post
powaking
post Mar 8 2005, 04:56 PM
Post #15


Silver Member
***

Group: Members
Posts: 163
Joined: 19-July 04
Member No.: 6,709



I did a search and its not in there. Kind of strange as my CD boots just fine. I copied the file manually and it boots up. Just locks up now when it trys to load the nic drivers.
Go to the top of the page
 
+Quote Post
jaclaz
post Mar 8 2005, 04:59 PM
Post #16


Platinum Member
*****

Group: Moderator
Posts: 4,581
Joined: 25-July 04
From: Italy
Member No.: 6,779



QUOTE (fafot)
Fat32 is a bit faster, 2.15 min but its real advantage is that the same 495Mb takes only 504Mb on UDF. The disadvantage is that it does not want to boot on the laptop.


Try checking this:
http://fuzzymunchkin.dyndns.org/tdot/usbke...yfob/index.php3

it has this info that might just resolve your problem:

QUOTE
This part deals with a problem that the HP utility has; it sets the partition ID of the partition it creates to HEX code 'e', which means "W95 FAT16 LBA"; this doesn't work on many machines because the BIOS expects HEX code '6' ("FAT16"), like for instance, all three of my machines. The goal of this part is to change the partition ID. Historically this has proven the hardest part of this whole webpage for some users, so I've spent almost a full week working out how to make it all possible without having to download and install Linux. Basically, I couldn't find a windows-native utility that allows you to change the partition ID of a USB keyfob, *while still booted in Windows*. Read on...


If this is the problem, you can change the partition type with tools and methods you can find here:
http://therdcom.com/asm/mbr/BootToolsRefs.htm
or using mbrfix:
http://www.msfn.org/board/index.php?showtopic=30378
http://www.911cd.net/forums/index.php?showtopic=10956
to copy the MBR to a file, then hexedit it and save it back.

jaclaz


--------------------
- Fighting against bloatware since 2004, and proud of it. -
Go to the top of the page
 
+Quote Post
tjmax
post Mar 8 2005, 05:39 PM
Post #17


Member
**

Group: Members
Posts: 20
Joined: 15-February 05
Member No.: 10,248



I have a question, been looking for a way to run it directly from a usb hard drive. Now i understand this is for flash drives, but will it or is there some similar method to run it from an external drive? I seem to remeber seeing something. but i for the life of me cant find it.
Go to the top of the page
 
+Quote Post
jaclaz
post Mar 8 2005, 06:36 PM
Post #18


Platinum Member
*****

Group: Moderator
Posts: 4,581
Joined: 25-July 04
From: Italy
Member No.: 6,779



@tjmax
there should be NO difference, after all to the PC BIOS, both the Flash Disk and the Hard Disk are disks, to be more precise block devices.

jazlaz


--------------------
- Fighting against bloatware since 2004, and proud of it. -
Go to the top of the page
 
+Quote Post
fafot
post Mar 8 2005, 07:03 PM
Post #19


Platinum Member
*****

Group: Members
Posts: 1,139
Joined: 4-March 04
Member No.: 4,555



@jaclaz
Tx, I will look at this and adjust the script if needed.


--------------------
Go to the top of the page
 
+Quote Post
tjmax
post Mar 8 2005, 07:12 PM
Post #20


Member
**

Group: Members
Posts: 20
Joined: 15-February 05
Member No.: 10,248



QUOTE (jaclaz @ Mar 8 2005, 11:36 PM)
@tjmax
there should be NO difference, after all to the PC BIOS, both the Flash Disk and the Hard Disk are disks, to be more precise block devices.

jazlaz

well there would have to be some differences, the HP utility as far as i can tell, can not be used on a USB hard drive, i tried partitioning the drive to a 2 gig partition and the HP utility simply nukes the partition then craps out.

What i am trying to do now is piece together the drive as my local c drive then manually sort through some of the changes slap it back into the usb case to see if i can get it to boot.
Go to the top of the page
 
+Quote Post

6 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 9th February 2010 - 07:51 AM