Jump to content

How to boot/install from USB key ?


Halfwalker

Recommended Posts

Glad it worked for you. If this delay is at start you might update your BIOS and/or disconnect any other USB devices, try on different USB ports (use the ones on the back of the motherboard), play with the BIOS setting about USB- legacy support, USB 1.1/2.0 etc.

Q1- usb_prepare.cmd has nothing to do with SATA/IDE drivers, it just transfers your SOURCE to the USB stick in suitable format. If the source has drivers for the SATA controller- it will install properly. BTS mass storage drivers pack is advisable to be used.

Q2- in the tests so far REPAIR works fine, as long as the installation was made using the methods described here and binifix.cmd. The only way to break that function is if BOOT.INI on hard drive doesn't have the required line.

Example:

Typical BOOT.INI:

[Boot Loader]
Timeout=30
Default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /FASTDETECT

Repair won't work, because it points to rdisk(0), when launched from USB stick the hard disk installation will appear as rdisk(1), rdisk(0) is the USB stick.

If you simply add

multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="USB Repair Microsoft Windows XP Professional" /FASTDETECT
that will be enough for TEXT mode setup to find the installation and display repair option. Naturally if installation is on the first hard disk, first partition.

This functionality is present in binifix.cmd, which is used when SETUP is done using the method, described here- no need to add the line.

Edited by ilko_t
Link to comment
Share on other sites


That's the important part, how did you format it, from within XP using XP format? What file system?

Try formatting it using PEtoUSB or HP Format tool, links are in this thread or use GOOGLE. In the archive attached in post #294 PEtoUSB is included.

When you format it copy on USB stick ONLY ntdetect.com, NTLDR from your XP source, and create BOOT.INI in USB stick root:

BOOT.INI

[Boot Loader]
Timeout=10
Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="TEST" /FASTDETECT
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="TEST 1" /FASTDETECT

Start the PC and if you see the menu, your stick is ready- format it again and use usb_prep.cmd

PEtoUSB has an option for LBA, use it first, if doesn't boot use without that option.

HP format too can format in FAT16 and FAT32- find which one works for you.

Hi :hello: i set my bios to boot from usb and everything and then i followed these instructions to test to see if i could boot from the usb stick. However, after POST, a j appears with a blinking cursor that just sits there, and the boot menu never shows up. i tried reformating the usb stick and trying again with the different options in PEtoUSB and also tried with the HP USB Disk Format tool but the same thing happens. any suggestions on what to do?

i really appreciate all the work that you guys put into making these batch files and i would like to try them out sometime. :D

Thanks in advance

Link to comment
Share on other sites

Hi Ilko

The HP_USB_Boot_Utility.exe V2.0.6 download (2024 kB) from

http://download.chip.eu/en/USB-Disk-Storag...0.6_176935.html

gives after install two small program files in the DriveKey folder.

HPUSBFW.EXE is a portable Windows version (432 kB) and HPUSBF.EXE is a CMD-line program.

An EndUser might copy PeToUSB.exe and/or HPUSBFW.EXE in its own usb_prep folder.

It is possible to provide a command at the beginning of usb_prep.cmd

for launching the USB-stick Format program, so that one can use automatically

the right type of Format program in the automatic preparation of the usb-stick.

PeToUSB.exe is more safe and most suitable for this purpose, because it cannot format USB-harddisk !

Regards,

wimb

Edited by wimb
Link to comment
Share on other sites

Hi :hello: i set my bios to boot from usb and everything and then i followed these instructions to test to see if i could boot from the usb stick. However, after POST, a j appears with a blinking cursor that just sits there, and the boot menu never shows up. i tried reformating the usb stick and trying again with the different options in PEtoUSB and also tried with the HP USB Disk Format tool but the same thing happens. any suggestions on what to do?

i really appreciate all the work that you guys put into making these batch files and i would like to try them out sometime. :D

Thanks in advance

Hi, please read these links:

http://www.911cd.net/forums//index.php?sho...aded&start=

http://home.graffiti.net/jaclaz:graffiti.n...SB/USBfaqs.html FAQs 4,5 and 10

http://home.graffiti.net/jaclaz:graffiti.n...B/USBstick.html

If you don't get your answer please post here your Motherboard model, USB stick model and details, BIOS settings you've tried, files system and tools you've tried.

Hi Ilko

The HP_USB_Boot_Utility.exe V2.0.6 download (2024 kB) from

http://download.chip.eu/en/USB-Disk-Storag...0.6_176935.html

gives after install two small program files in the DriveKey folder.

HPUSBFW.EXE is a portable Windows version (432 kB) and HPUSBF.EXE is a CMD-line program.

An EndUser might copy PeToUSB.exe and/or HPUSBFW.EXE in its own usb_prep folder.

It is possible to provide a command at the beginning of usb_prep.cmd

for launching the USB-stick Format program, so that one can use automatically

the right type of Format program in the automatic preparation of the usb-stick.

PeToUSB.exe is more safe and most suitable for this purpose, because it cannot format USB-harddisk !

The Attachment contains usb_prep.cmd with AUTOSTART of PeToUSB.exe

Regards,

wimb

As you know USB boot is still very badly implemented in different BIOSes/Motherboards, so it will be impossible to rely only on one or another tool or file system. In my opinion one needs to find out what suits his needs and makes stick bootable.

What we can do is just to include several tools in the archive (as long as T&C allow) and possibly add some info in the script or here as short guide, the rest is improvising and experimenting.

edit: @Hitman47- seems you edited your post while I posted mine- about question 3- please read post #306, it is on this page, short answer is no (yet), at least not using the methods described here. You could have Bart PE on USB hard disk and start setup from there, or just use DOS and WINNT.EXE, without modifying the source at all. Don't forget smartdrv.exe for faster transfer. Good info how to install from DOS is in this thread.

Edited by ilko_t
Link to comment
Share on other sites

Hi, please read these links:

http://www.911cd.net/forums//index.php?sho...aded&start=

http://home.graffiti.net/jaclaz:graffiti.n...SB/USBfaqs.html FAQs 4,5 and 10

http://home.graffiti.net/jaclaz:graffiti.n...B/USBstick.html

If you don't get your answer please post here your Motherboard model, USB stick model and details, BIOS settings you've tried, files system and tools you've tried.

Hi, ilko_t. Thanks for the reply.

i've tried the suggestions in the first two links but still no success. I read through the third link but i got confused cause i don't understand all of the weird terms and many numbers and how the guy knew what to fix in the "MBR and boot record" (as i don't have much computer knowledge :blushing: )

anyway i thank you guys for helping me, but i think i'm gonna give up. lol. i just wanted to try this cause it looked interesting. :rolleyes:

btw. just in case you wanted to know what i tried: Motherboard- Asus K7v; USB stick- no name brand (just says micro center); BIOS settings- i enabled usb legacy support and usb function and for boot options i tried USB FDD and USB ZIP (I couldn't find anything else in the BIOS that said USB); File system- FAT, FAT32, and the LBA thing?; Tools- PEtoUSB, HP USB Disk Storage Format Tool, and USB Drive Key Boot Utility

again Thanks for helping :D

Link to comment
Share on other sites

donkiekong55, your motherboard uses VIA KX133 chipset which is too old and even doesn't support USB2.0, I doubt you can do anything. Even if you make it boot from USB stick it will be painfully slow. On a MB with slightly newer chipset- VIA KT266 I had no luck booting from USB.

Link to comment
Share on other sites

btw. just in case you wanted to know what i tried: Motherboard- Asus K7v; USB stick- no name brand (just says micro center); BIOS settings- i enabled usb legacy support and usb function and for boot options i tried USB FDD and USB ZIP (I couldn't find anything else in the BIOS that said USB); File system- FAT, FAT32, and the LBA thing?; Tools- PEtoUSB, HP USB Disk Storage Format Tool, and USB Drive Key Boot Utility

(bolding is mine)

This appears case 4. of FAQ #10:

motherboards that ONLY boot from USB media formatted as “Superfloppy” (a drive formatted as to have no MBR, but directly the BOOTSECTOR as Sector 0)

Besides the other consideration about speed, even if you format the stick as Superfloppy, such behaviour will NOT work for NT/2K/XP/2003 as NO ARCPATH is generated, the problem has been discussed at length on Dietmar's thread, but unfortunately no solution/workaround has been found (yet):

http://www.911cd.net/forums//index.php?showtopic=14181

The only viable solution is (possibly) through the use of makebootfat "special" MBR, but it appears that noone ever tested this (or reported findings):

http://www.911cd.net/forums//index.php?sho...13784&st=44

It seems like we are in some kind of CATCH22 here, noone with a "Superfloppy only" motherboard has the technical abilities/time/will to experiment, whilst noone that has the latter has a "Superfloppy only" motherboard to experiment with. ;)

jaclaz

Link to comment
Share on other sites

Hi jaclaz :)

I hope you had/having a good holiday.

Here are a few more pieces to the bootsectors puzzle.

Stick set as fixed using Hitachi driver.

Formated with PEtoUSB FAT16X. After Winnt32 stick boots fine.

Formated with XP format FAT16. Winnt32.exe used- stick won't boot. Put MBR made by PEtoUSB, leave bootsector (which has been changed by WINNT32.EXE) alone- stick becomes bootable again.

Another interesting (at least for me) thing- the only difference in bootsector apart from volume serial if stick is formated by XP and seen as removable (won't boot) or fixed by Hitachi driver (will boot) is seen here. MBRs are the same. Change the 00 to 80 on seen as removable stick and it boots fine. No need to use Hitachi driver anymore. It might be helpful for your lovely scripts to make any stick bootable while formated as removable, as long as this can be confirmed in other setups.

magicalsnap200708241304fa0.th.jpg

I also can 99% confirm that XP format doesn't always rewrite MBR, as I see it it checks just some parts of MBR and if they are fine skips rewriting.

See the differences between F6_FAT32_fixed_XP MBR and FAT32_Fixed_XP MBR.

Please find attached MBRs and bootsectors made using HP tool FAT16 and 32. Both boot fine before WINNT32, only FAT16 boots fine after WINNT32.

No error messages at all when it doesn't boot, just blinking cursor in the top left corner of screen.

Regards,

ilko

edit: mistyped MBR/bootsector

FAT16_32_HP_Tool.zip

Edited by ilko_t
Link to comment
Share on other sites

Hallo, Ilko_t.

Some updates, I was successful in booting recreated virtual hard disks from your previously posted files, so I can confirm that it must be something outside the bootsector/MBR.

Another interesting (at least for me) thing- the only difference in MBR apart from volume serial if stick is formated by XP and seen as removable (won't boot) or fixed by Hitachi driver (will boot) is seen here. Change the 00 to 80 on seen as removable stick and it boots fine. No need to use Hitachi driver anymore. It might be helpful for your lovely scripts to make any stick bootable while formated as removable, as long as this can be confirmed in other setups.

I doubt the above, sorry. :(

Try resetting the usual, say first 100 sectors, to F6 and try formatting the stick under XP WITHOUT the Hitachi Microfilter Driver..... :whistle:

I just checked the files in your last post, and again, there is no reason in them why they shouldn't boot.

A few ideas for you to test (for the FAT32 ones):

1) Try, after the WINNT32 (and thus on a stick that it is not booting) to copy over the bootsector a "BootSector_Before.dat" generated before (when the stick was booting ok)

2) Try changing the "spare" bootsectors found on sector 6 with a copy of the current one, theoretically if the two bootsectors

3) Check this:

http://www.boot-land.net/forums/index.php?showtopic=1647

maybe from comparing the outputs of findpart with the various options on the stick "before" and "after" one could find some other difference that might matter :unsure:

jaclaz

Link to comment
Share on other sites

Lexar 1GB

WinHex- fill whole drive with F6

Unplug stick, plug it back in and format FAT32 using XP format. Copy ntldr, ntdetect.com and valid boot.ini- "disk error, press any key to restart"

Change 00 to 80- goes in a loop, showing briefly "invalid boot.ini, booting from c:\windows" then restarts.

To play with the hidden sectors and boopart seems to take much time for my very little knowledge in this matter, giving up (grrr) with this MBR/bootsector puzzle.

3 MBRs for FAT32 formated by XP and stick removable, produced 3 different MBRs- one after F6, another if stick is formated before by PEtoUSB and the third don't even remember how was it formated before to result in another different MBR. That makes for me too many unknowns in the equation.

1) Try, after the WINNT32 (and thus on a stick that it is not booting) to copy over the bootsector a "BootSector_Before.dat" generated before (when the stick was booting ok)
As far as I remember this makes the stick bootable again.

Thanks for your guidance so far :)

Edited by ilko_t
Link to comment
Share on other sites

The batch program usb_prep2.cmd for making a bootable USB-stick for Install of Windows XP,

was further improved.

Filling of the USB-stick with files was analysed with WinHex using 1stSector column.

The MakeBS3.cmd was moved such that the Bootsector file SETUPLDR.bs gets a position

close to BOOT.INI in the beginning of the drive, instead of being the last written sector.

$OEM$\CMDLINES.TXT can be used for making UserAccounts and install of Registry Tweaks at T-12

If $OEM$ folder is present in usb_prep2 folder, then it will copied now to the right position

in the temporary drive.

On first logon the Extracted BTS DriverPacks are deleted, which normally takes a long time,

because SystemRestore copies them to System Volume Information folder.

The Disable_SystemRestore.reg Registry Tweak prevents this action, so that first logon is much faster.

Personally I am using only the 5 smallest BTS DriverPacks with Mass Storage text mode enabled.

So I do not integrate the 5 large Sound and Graphics DriverPacks, but use these Packs manually

when Updating Drivers. The extraction and deletion of these 5 large DriverPacks is taking a lot of time.

The file winnt_sif.txt can be used for making your own winnt.sif file to be placed in the xpsource\I386 folder.

If an appropriate USB-stick Format Program like PeToUSB.exe is present in the usb_prep2 folder,

it will be launched automatically at the beginning of the usb_prep2.cmd batch program.

The usb_prep2 folder is given as Attachment.

A Guide for making MultiBoot USB-stick with boot.ini Menu including other boot options like MS-DOS and Linux

is given here http://www.911cd.net/forums//index.php?showtopic=20089

Regards,

wimb

usb_prep2.zip

Edited by wimb
Link to comment
Share on other sites

That's a lot better, nice job wimb :thumbup

A small suggestion- when searching for BTS drivers I think would be better to use another marker, not the directory OEM, as it might be some OEM custom folder. Use DPsFnshr.7z in \OEM\bin or some other file, which definitely belongs to BTS pack. I believe if that file exist, presetup.cmd will exist too.

@all- any ideas how to make USB hard drive to look as removable?

My idea- the removable flag should returned as result by disk.sys or usbstor.sys. If it is written somewhere in registry and we use migrate.inf we may override this result and trick TXT Setup to think that USB disk is not fixed, thus giving it proper letter and position.

I have used similar technique to remove unwanted devices from safely remove hardware by setting device capabilities to 80, from default 64. On restart this setting is lost, because the driver returns the flag, but use reg file to change it on startup and it's fine.

In my case I wanted to remove some hard drives from safely remove list-

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\SCSI\Disk&Ven_SATA&Prod_HDS72251&Rev_\5&b721abc&1&010

http://msdn2.microsoft.com/en-us/library/aa491648.aspx

http://msdn2.microsoft.com/en-us/library/ms792967.aspx

http://support.microsoft.com/kb/298504

I was thinking would it be possible similar approach to be used. Any detailed information what exactly Hitachi microfilter does, or Dietmar's dummy.sys? We need the opposite result, but not using filter driver, or if it easy to use such at this point why not...

Link to comment
Share on other sites

I was thinking would it be possible similar approach to be used. Any detailed information what exactly Hitachi microfilter does, or Dietmar's dummy.sys? We need the opposite result, but not using filter driver, or if it easy to use such at this point why not...

A small correction, there is no such thing as a "Dietmar's dummy.sys".

The file is on CodeProject, it's author is Anton Bassov

http://www.codeproject.com/system/soviet_direct_hooking.asp

and it comes with source code and an article explaining it.

At the time I "found" it and suggested it to Dietmar:

http://www.911cd.net/forums//index.php?sho...181&st=1954

as an alternative to the Hitachi Microdrive one (that has no source code), and Dietmar tested and adopted it.

Now we need someone with programming skills and the correct DDK/Compiler etc.

jaclaz

Link to comment
Share on other sites

A small correction, there is no such thing as a "Dietmar's dummy.sys"....
Thanks for correction. :blushing:
Now we need someone with programming skills and the correct DDK/Compiler etc.

Your suggestion is to modify driver to return the opposite result and use it during Text mode right? In this case wouldn't it be difficult to use it at that stage? How do we load lowerfilter drivers via txtsetup.sif?

I did another search in registry for clues, cannot find a single entry which may override the result returned during Text mode. I am still hoping that something is written in registry and programs query that key to get removable status, rather than querying and getting result from usbstor.sys on-the fly. Find that key(s) and use migrate.inf to add it, if possible at all.

BTW source code of Hitachi microfilter driver is included in the download.

Link to comment
Share on other sites

A small suggestion- when searching for BTS drivers I think would be better to use another marker, not the directory OEM, as it might be some OEM custom folder. Use DPsFnshr.7z in \OEM\bin or some other file, which definitely belongs to BTS pack. I believe if that file exist, presetup.cmd will exist too.

Good idea, I will surely use it in the next version :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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