How to boot/install from USB key ? - the historical thread - how it all began
Posted 24 August 2007 - 03:55 AM
Posted 24 August 2007 - 05:42 AM
(bolding is mine)
This appears case 4. of FAQ #10:
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):
The only viable solution is (possibly) through the use of makebootfat "special" MBR, but it appears that noone ever tested this (or reported findings):
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.
Posted 24 August 2007 - 06:38 AM
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.
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.
edit: mistyped MBR/bootsector
Number of downloads: 21
This post has been edited by ilko_t: 24 August 2007 - 07:14 AM
Posted 24 August 2007 - 07:25 AM
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.
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.....
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:
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
Posted 24 August 2007 - 08:44 AM
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.
Thanks for your guidance so far
This post has been edited by ilko_t: 24 August 2007 - 08:46 AM
Posted 28 August 2007 - 02:41 AM
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
Number of downloads: 123
This post has been edited by wimb: 30 August 2007 - 03:46 AM
Posted 29 August 2007 - 05:58 AM
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-
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...
Posted 29 August 2007 - 10:34 AM
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
and it comes with source code and an article explaining it.
At the time I "found" it and suggested it to Dietmar:
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.
Posted 29 August 2007 - 01:50 PM
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.
Posted 30 August 2007 - 12:14 AM
Good idea, I will surely use it in the next version
Posted 17 September 2007 - 09:04 PM
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?)
title Phase 1 WinXP Text Mode Setup
map --read-only (hd0) (hd1)
title Phase 2 WinXP GUI Mode Setup
map (hd1) (hd0)
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?
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?
6. In \$WIN_NT$.~BT modify
and also this seem to remove my nLite unattended stuff?
Posted 17 September 2007 - 11:56 PM
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? ), 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.
You really missed where all troubles come from when installing this way
Probably a little effort like reading at least pages 2 and 3 you will get why and what.
Posted 18 September 2007 - 08:42 AM
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...
Posted 19 September 2007 - 10:54 PM
For your case you better read these threads:
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
Posted 20 September 2007 - 02:59 PM
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!
Posted 20 September 2007 - 03:40 PM
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
Posted 20 September 2007 - 11:46 PM
Is it possible that the drive boot when placed on another computer while not on the target computer?
Posted 21 September 2007 - 05:11 AM
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.
This post has been edited by jaclaz: 21 September 2007 - 05:14 AM
Posted 21 September 2007 - 06:05 AM
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?
Posted 21 September 2007 - 11:50 AM
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 ) 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.