MSFN Forum: How to boot/install from USB key ? - MSFN Forum

Jump to content


  • 25 Pages +
  • « First
  • 15
  • 16
  • 17
  • 18
  • 19
  • Last »
  • You cannot start a new topic
  • This topic is locked

How to boot/install from USB key ? - the historical thread - how it all began

#321 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 24 August 2007 - 03:55 AM

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.


#322 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,433
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 24 August 2007 - 05:42 AM

donkiekong55 said:

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:

Quote

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

#323 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 24 August 2007 - 06:38 AM

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.
Posted Image

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

Attached File(s)


This post has been edited by ilko_t: 24 August 2007 - 07:14 AM


#324 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,433
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 24 August 2007 - 07:25 AM

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.


ilko_t said:

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

#325 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 24 August 2007 - 08:44 AM

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.

Quote

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 :)

This post has been edited by ilko_t: 24 August 2007 - 08:46 AM


#326 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • Joined: 21-March 07

Posted 28 August 2007 - 02:41 AM

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...showtopic=20089

Regards,

wimb

Attached File(s)


This post has been edited by wimb: 30 August 2007 - 03:46 AM


#327 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 29 August 2007 - 05:58 AM

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.microso...y/aa491648.aspx
http://msdn2.microso...y/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...

#328 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,433
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 29 August 2007 - 10:34 AM

ilko_t said:

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.codeproje...ect_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

#329 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 29 August 2007 - 01:50 PM

View Postjaclaz, on Aug 29 2007, 05:34 PM, said:

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

View Postjaclaz, on Aug 29 2007, 05:34 PM, said:

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.

#330 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • Joined: 21-March 07

Posted 30 August 2007 - 12:14 AM

View Postilko_t, on Aug 29 2007, 01:58 PM, said:

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 :)

#331 User is offline   iceangel89 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 453
  • Joined: 10-February 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 17 September 2007 - 09:04 PM

View Postilko_t, on Apr 22 2007, 01:59 AM, said:

1. Format the USB stick, I used HP USB Format tool, because XP format was reported as incorrect in GRUB.
2. Install GRUB MBR on the stick, the quickest way I found is by GRUBINST_GUI for WIN
3. Get the latest GRUB4DOS and copy GRLDR to the USB root.

erm i didn't have a problem with windows formated NTFS. so i did not use HP Format Utility (or is it because i am using a internal HDD?)

View Postilko_t, on Apr 22 2007, 01:59 AM, said:

Create MENU.LST in USB root

Quote

color black/cyan yellow/cyan
timeout 15
default 1
title Phase 1 WinXP Text Mode Setup
map --read-only (hd0) (hd1)
map --hook
root (hd1,0)
chainloader /ntldrstp
title Phase 2 WinXP GUI Mode Setup
map (hd1) (hd0)
map --hook
rootnoverify (hd0)
chainloader +1

This way the default entry is GUI mode, TXT mode must be selected manually. With these GUI entries XP can be installed and booted later from another partition on the hard drive, not only from the first.

for me the text mode works but the GUI didn't... the screen flashed and i am back to OS Selection... why is this so? i think is the last line? what does it does? "chainloader +1" and is there a GRUB4DOS documentation/manual?

View Postilko_t, on Apr 22 2007, 01:59 AM, said:

4. Backup your current BOOT.INI and in the XP setup folder \I386 run

Quote

winnt32 /makelocalsource /noreboot
after it's finished restore BOOT.INI

whats this for? why do i need to backup boot.ini? and below? whats it for? edit WINNT.SIF & MIGRATE.INF. its for the Read-Only? but why read only for?

View Postilko_t, on Apr 22 2007, 01:59 AM, said:

5. Copy two new folders in the USB stick root - $WIN_NT$.~BT and $WIN_NT$.~LS

6. In \$WIN_NT$.~BT modify
WINNT.SIF

Quote

[data]
msdosinitiated="1"
floppyless="1"
AutoPartition="0"
UseSignatures="no"
InstallDir="\WINDOWS"
winntupgrade="no"
...

and also this seem to remove my nLite unattended stuff?

#332 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 17 September 2007 - 11:56 PM

Iceangel89, latest step-by-step guide is here:
http://www.msfn.org/board/boot_install_USB...636#entry659636

Latest batch file, which does 95% of the work is just a couple of posts above yours, think you can find it yourself :)

From your post I see very little usable information, need to know what exactly you are trying to achieve, what's the installation media (why talking about internal drive and NTFS? :w00t: ), what version of Windows, how many partitions on the target hard drive, how many hard drives you have, SATA or ATA, and so on...

Backup of boot.ini WAS needed with the earlier guides, because winnt32.exe whit those parameters (in the early guides) adds an entry in the existing boot.ini so on next restart TXT setup is launched. With the latest batch file this is no longer needed.

To preserve NLite customization simply add /unattend:winnt.sif

winnt32 /makelocalsource /noreboot /unattend:winnt.sif

and don't forget to delete the whole unattended section after that. Applies again ONLY for the step-by-step guide, NO need to do that if using the batch file, which checks if winnt.sif is found, /unattend:winnt.sif is used in order to preserve customizations.

Quote

...but why read only for?

You really missed where all troubles come from when installing this way :no:
Probably a little effort like reading at least pages 2 and 3 you will get why and what.

#333 User is offline   iceangel89 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 453
  • Joined: 10-February 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 18 September 2007 - 08:42 AM

Quote

From your post I see very little usable information, need to know what exactly you are trying to achieve, what's the installation media (why talking about internal drive and NTFS?), what version of Windows, how many partitions on the target hard drive, how many hard drives you have, SATA or ATA, and so on...


i am trying to make an install of XP from a HDD, USB at first but since i think my external HDD adapter is not good, i plugged the HDD directly into the comp for now, making it internal... NTFS is so that the partition can be bigger (but it works). so install media is internal HDD (any diff to the process? for now it works, internally). Version of windows - XP Pro SP2 (nLited). number of partitions - 1 Main HDD, 3 NTFS partitions, on the "Temporary Internal" HDD, 2 NTFS partitions (1 for this, and another for Misc Storage)

and so it means Read Only is for USB problems which i escaped using an internal HDD? i think...

Thanks

#334 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 19 September 2007 - 10:54 PM

The routine to install XP from USB flash drive does NOT work for now with USB hard drives, last 2 pages are all about that problem.
For your case you better read these threads:

http://www.911cd.net...showtopic=16713
http://www.911cd.net...showtopic=19745

Deletion of $win_nt$... folders is because they are considered as TEMPORARY, and as such SETUP deletes them on few stages when launched from them. This has nothing to do with USB, IDE, SATA...
These temp. folders are used when prepared by WINNT.EXE or WINNT32.EXE hard drive is started. M$ decided that when SETUP is launched from hard disk this must be one-off installation, and implemented it that way. I386 is used for CD drives and setup files detect install media.
Back to the temp. folders- if they are write protected or renamed when SETUP attempts to delete, them they survive ==> you can use the same prepared disk (usb flash drive) for another install. Basically during the posts here we learned how to invoke installation from new for XP SETUP media, how to trick it NOT to delete temp. files and folders, and how to fix the results of strange for SETUP environment (wrong boot.ini etc.).
I hope that clears a bit whats all about in this long thread.

This post has been edited by ilko_t: 19 September 2007 - 10:56 PM


#335 User is offline   happyusers 

  • Group: Members
  • Posts: 9
  • Joined: 19-September 07

Posted 20 September 2007 - 02:59 PM

Hello to the community,
I tried the procedure given by ilko_t on april 21st. It is said 100% success for ATA. I have followed the tutorial line by line. The first stage (textsetup) from the stick went ok. But I didnt manage to reboot on HDD. I had a message "NTLDR missing". I tried with stick first through grub or hdd first, always the same message. I tried fiddling with boot.ini modifying hdr parameter but everything was useless. I think that the drive could have booted, it seems that, on another computer (I took it to format it) it could have booted.
I installed Win XP Pro sp2 on a Pavilion (512Mo 250 Go sempron 3400).
Would you have diagnostic or advices ?
Thanks very much.

PS : the DOS method went OK. The hdd booted on Win98 prompt and I ran Winnt. But how long it is : 3 or 4 hours!

#336 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 20 September 2007 - 03:40 PM

@happyusers
You have used the very first guide, a lot has been improved since then, there is also a batch script preparing USB sticks, have you tried the last guide or the batch file? I'd rather use the batch file.

How many partitions you have on the destination hard drive? Were menu.lst and boot.ini amended accordingly?
Is your source on USB stick? Is it seen at bottom when TXT Setup lists hard drives to be installed on?
Is the message about missing NTLDR coming from Grub4Dos?

This post has been edited by ilko_t: 20 September 2007 - 04:22 PM


#337 User is offline   happyusers 

  • Group: Members
  • Posts: 9
  • Joined: 19-September 07

Posted 20 September 2007 - 11:46 PM

To make things simple, I had only one partition on the destination drive. I think I have written boot.ini and menu.slt correctly. My sources were on the stick and I have not really seen if it was shown. I have to try again. I had noticed the script but thought tings were more under control if I did it by myself. I shall try it. I dont think the message came from grub because I tried both ways of booting, through grub on stick and directly on the destination drive and it was the same. NTDLR missing.
Is it possible that the drive boot when placed on another computer while not on the target computer?

#338 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,433
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 21 September 2007 - 05:11 AM

"NTLDR is missing"
is an error message hardcoded in the bootsector of any partition formatted under 2K/XP/2003.
(if the "standard" english botsector is used)

So the error is generated long before BOOT.INI comes into play.

Forget for the moment anything about this thread and just:
1) Format the stick with the HP utility or petoUSB or any other method you use
2) Copy to the stick NTLDR, NTDETECT.COM and a BOOT.INI with at least two entries
3) Try booting from it

If it does, try again the method, using the latest tutorial and the batch file.

If it does not, post again, I'll try to help you in first booting part.

jaclaz

This post has been edited by jaclaz: 21 September 2007 - 05:14 AM


#339 User is offline   happyusers 

  • Group: Members
  • Posts: 9
  • Joined: 19-September 07

Posted 21 September 2007 - 06:05 AM

Thank you Jaclaz.
In fact, I got the message (in french "NTLDR manque") when booting on the target drive not on the stick, just after textsetup phase. The stick boot was OK and the first phase of installation too.
According to what you say, that message is probably coded in the boot sector of my drive. Why does that bootloader complain when I boot from drive, I wonder. Is there any diagnostic I can run on the drive to understand what is going wrong?
Perheaps what you suggest for the stick would be applicable on the drive?

#340 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 21 September 2007 - 11:50 AM

@happyusers

We could troubleshoot it, but I see no point to do it since a lot has been changed since that guide. NTLDR is missing most of the times it's not where it's expected to be. More interesting for us is why it was not there. My guesses:
1. USB stick was seen as fixed drive and boot files were (attempted to be) written there. That's why I asked you where was it in the list of available hard drives.
2. Grub4Dos didn't like your BIOS and mapping was wrong, try newer/older version. It happened to me already. Check for BIOS updates too.
For simplicity and compatibility in the latest batch file Grub4Dos is no longer used.
3. Anything else...

The batch file is open and customizable, I had no experience in batch scripts making it (wonder how it even worked :lol: ) but it's so simple so can barely call it script at all, wimb polished it a lot and there is nothing to mess with the other scripts used within (binifix.cmd and makeBS.cmd). So I suppose even if you have no experience with batch files you will see all the steps which it performs, and do them manually if you wish so. If you don't get something just ask.
I did not intend to write another guide, for now I am waiting a response in a few forums to get dummydisk.sys redone in the way we need it, then try to use it during TXT setup, test how it works and finally add comments to the BAT file, which can be used instead of a guide.

Regards,
ilko

Share this topic:


  • 25 Pages +
  • « First
  • 15
  • 16
  • 17
  • 18
  • 19
  • Last »
  • You cannot start a new topic
  • This topic is locked

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy