buseeliu Posted June 2, 2007 Share Posted June 2, 2007 (edited) 8. Create:BOOT_REN.CMDCODE@echo offSET TAGFILE=\bootfilesFOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:xcopy %USBDRIVE%\bootfiles\*.* %SYSTEMDRIVE%\ /y /h /r /kren %USBDRIVE%\txtsetup.sif txtsetup.bakren %USBDRIVE%\$WIN_NT$.~BT WIN_NT.BTren %USBDRIVE%\$WIN_NT$.~LS WIN_NT.LSexitIn step 8, Undo_Ren.CMD Should change back to undoren.cmd in order to match Step 6 Edited June 2, 2007 by buseeliu Link to comment Share on other sites More sharing options...
jaclaz Posted June 2, 2007 Share Posted June 2, 2007 @buseeliuGood find!It's good to have more eyes checking, typos are so easy to go undetected. See you soon ilko_t, be well. jaclaz Link to comment Share on other sites More sharing options...
buseeliu Posted June 3, 2007 Share Posted June 3, 2007 @buseeliuGood find!It's good to have more eyes checking, typos are so easy to go undetected. See you soon ilko_t, be well. jaclazmy effort is too small actually, just want to help each other within my ability. Link to comment Share on other sites More sharing options...
buseeliu Posted June 3, 2007 Share Posted June 3, 2007 Another interesting for me thing- I had Bart PE minint folder on the root of the same stick, while testing I have noticed that if txtsetup.sif in root is missing or renamed, Bart PE is launched instead of TEXT mode setup. It might have been already discussed somewhere, but gives a good idea how both may coexist, without having to create second partition for it. I am going to test it further and report results.@buseeliu- try some random shots to see why your USB stick is so slow:1. Update your BIOS2. Check setting in BIOS for USB, make sure USB2.0 is enabled, play a bit with the other settings for USB- legacy support etc.3. Test the same stick on another motherboard/system, which is known to support faster speeds4. Test on your motherboard another stick, which is known to be fast5. Unplug all other USB devices while testing6. Use one by one the rear USB ports, try do disconnect fron USB ports from motherboardMay be jaclaz can help you with some other ideas, hes knowledge about usb sticks is amazing @jaclaz- Have you had a chance to look what was going wrong with MBRs?I think the main problem is my usb 2.0 stick is not fast enough , if i copy file to notebook harddisk through, the speed is very fast. Maybe i need to buy another high speed usb stick later. Thks for your advice. Link to comment Share on other sites More sharing options...
buseeliu Posted June 3, 2007 Share Posted June 3, 2007 Step 6MIGRATE.INFCODE[Version]Signature = "$Windows NT$"[Addreg]HKLM,"SYSTEM\MountedDevices",,0x00000010HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1[strings];Handy macro substitutions (non-localizable)REG_SZ = 0x00000000REG_BINARY = 0x00000001REG_DWORD = 0x00010001REG_MULTI_SZ = 0x00010000REG_SZ_APPEND = 0x00010008REG_EXPAND_SZ = 0x00020000If you wish to preserve your USB storage drive letter use CDOB's script to create MIGRATE.INF, don't forget to add the above entries :Actually, i have tried to use notebook harddisk to install window xp by using the above method. but it fails.If i use the above code in migrate.inf , i can't not install window xp and there is a warning message that my harddisk c:(should be the drive of the stick) has been damaged. cannot continue setup window anymore, press any key to exit.If i use CDOB's Script, i can continue to setup window even copying temporary file to 3.5" harddisk, however when the PC restarts, there is a warning that ntldr is missing. If i copy ntldr manually to that 3.5" harddisk, i can enter ther screen of installing win xp , however , further warning message is prompt that my setup file is missing. \globalroot\hardiskvolume2\xxxx. How can fix it? I think using notebook hdd to installing xp is faster than using flash drive. Thks for all of your effort again. Link to comment Share on other sites More sharing options...
wimb Posted June 4, 2007 Share Posted June 4, 2007 (edited) MIGRATE.INF[Version]Signature = "$Windows NT$"[Addreg]HKLM,"SYSTEM\MountedDevices",,0x00000010HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1[Strings];Handy macro substitutions (non-localizable)REG_SZ = 0x00000000REG_BINARY = 0x00000001REG_DWORD = 0x00010001REG_MULTI_SZ = 0x00010000REG_SZ_APPEND = 0x00010008REG_EXPAND_SZ = 0x00020000The Renaming of the $WIN_NT$.~BT and $WIN_NT$.~LS folders, and the TXTSETUP.SIF file,using boot_ren.cmd and undoren.cmd is a very nice solution for the long-wait problem at T-1.SetupParams executes from winnt.sif at T-9 minute stage, and is indeed very usefull for the temporary renaming with boot_ren.cmd There are some changes necessary in the MIGRATE.INF file !Adding the "WriteProtect" registry entry and the [strings] section in MIGRATE.INF are no longer needed,because we use now Renaming instead of WriteProtection.If the USB-stick is connected when making the LocalSource on harddisk C: , one can simply keep the USB-stick relevant entry forHKLM,"SYSTEM\MountedDevices","\DosDevices\U:",0x00030001,\in the MIGRATE.INF file produced in the $WIN_NT$.~BT folder, note its drive letter and change the drive letter to U: as proposed in post #129 ,instead of using MkMigratgeInf.cmd.With MkMigratgeInf.cmd you are missing in MIGRATE.INF the registry entryHKLM,"SYSTEM\MountedDevices",,0x00000010 Edited June 4, 2007 by wimb Link to comment Share on other sites More sharing options...
cdob Posted June 4, 2007 Share Posted June 4, 2007 Adding the "WriteProtect" registry entry and the [strings] section in MIGRATE.INF are no longer needed,because we use now Renaming instead of WriteProtection.[SetupParams]UserExecute = "%systemdrive%\windows\system32\boot_ren.cmd"Yes, boot_ren.cmd is executed at T-9.http://unattended.msfn.org/unattended.xp/v...19/#setupparamsThe above will execute the quotes command at T-9 during setup.boot_ren.cmd is processed after first reboot. Dosn't setup delete files earlier at textmode?Writeprotect in migrate.inf does prohibit deleting files at textmode.ilko_t remode HiveOEM.inf, because renaming replace this.With MkMigratgeInf.cmd you are missing in MIGRATE.INF the registry entryHKLM,"SYSTEM\MountedDevices",,0x00000010True, MkMigratgeInf.cmd dosn't create this line, because this line is not required in migrate.inf.@buseeliuName your boot.ini. There maybe false settings.Which hardware and partitions do you use?Do you use a SATA hard disk?Short notice about 2003 setupldr.bin RAM loaded idea.I made a false assumption in the past.Booting to recovery console (press F10 at F6 message) list 2003 setupldr.bin drive as C:Grub4dos loaded image is not listed.This is contrary to a 2003 setupldr.bin PE image: drive X: is used. Link to comment Share on other sites More sharing options...
wimb Posted June 5, 2007 Share Posted June 5, 2007 (edited) Dosn't setup delete files earlier at textmode?Writeprotect in migrate.inf does prohibit deleting files at textmode.The WriteProtect registry entry in MIGRATE.INF is indeed essential !Without this rule, I lost a lot of setup files from the $WIN_NT$.~LS folder.Thank you cdob for making me aware of its function. I am sorry for the mistake, that I have made. Edited June 5, 2007 by wimb Link to comment Share on other sites More sharing options...
jaclaz Posted June 8, 2007 Share Posted June 8, 2007 Inspired by one of cdob's hints, I made a small batch file to (maybe) solve the NTLDR/SETUPLDR.BIN renaming problem.Here:http://www.boot-land.net/forums/index.php?showtopic=2362jaclaz Link to comment Share on other sites More sharing options...
cdob Posted June 10, 2007 Share Posted June 10, 2007 (edited) @ilko_tPlease try A updated BOOT_REN.CMD\bootfiles is not used anymore.Ntldr and ntdetect.com are copied from $WIN_NT$.~LSBoot.ini is builded at boot time:Boot.ini maybe not at %SystemDrive%: e.g. c:\boot.ini and d:\windowsIf a signature line exist, boot.ini is not updated.SystemRoot folder and partition number are read from boot.ini.rdisk is set from 0 to 3.@echo offset BootIniDrive=%SystemDrive%SET TAGFILE=\BOOT.INIif not exist %BootIniDrive%%TAGFILE% FOR %%h IN (Z Y X W V U T S R Q P O N M L K J I H G F E D C) DO IF EXIST "%%h:%TAGFILE%" Set BootIniDrive=%%h:set BootIni=%BootIniDrive%%TAGFILE%echo SystemDrive %SystemDrive%echo BootIniDrive %BootIniDrive%echo BootIni %BootIni%SET USBDRIVE=SET TAGFILE=\$WIN_NT$.~LSFOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:echo USBDRIVE %USBDRIVE%for %%a in (ntldr ntdetect.com boot.ini) do attrib -r -s -h %BootIniDrive%\%%acopy %USBDRIVE%\$WIN_NT$.~LS\I386\ntldr %BootIniDrive%\ /ycopy %USBDRIVE%\$WIN_NT$.~LS\I386\ntdetect.com %BootIniDrive%\ /yren %USBDRIVE%\txtsetup.sif txtsetup.bakren %USBDRIVE%\$WIN_NT$.~BT WIN_NT.BTren %USBDRIVE%\$WIN_NT$.~LS WIN_NT.LScall :createBootInigoto :eof:createBootIni(echo [boot loader]echo timeout=10)>%BootIni%.newfor /f "tokens=1-9* skip=2 delims=(=)" %%a IN (%BootIni%) DO ( if %%a.==signature. (del %BootIni%.new & goto :eof) if %%a.==default. echo %%a=%%b^(%%c^)%%d^(%%e^)%%f^(%%g^)%%h^(%%i^)%%j >>%BootIni%.new)echo [operating systems] >>%BootIni%.newfor /f "tokens=1-10* skip=4 delims=(=) " %%a IN (%BootIni%) DO ( if %%a.==multi. ( echo %%a^(%%b^)%%c^(%%d^)%%e^(0^)%%g^(%%h^)%%i=%%j rdisk^(0^) %%k >>%BootIni%.new echo %%a^(%%b^)%%c^(%%d^)%%e^(1^)%%g^(%%h^)%%i=%%j rdisk^(1^) %%k >>%BootIni%.new echo %%a^(%%b^)%%c^(%%d^)%%e^(2^)%%g^(%%h^)%%i=%%j rdisk^(2^) %%k >>%BootIni%.new echo %%a^(%%b^)%%c^(%%d^)%%e^(3^)%%g^(%%h^)%%i=%%j rdisk^(3^) %%k >>%BootIni%.new ))(echo.echo [debug]echo SystemDrive %SystemDrive%echo BootIniDrive %BootIniDrive%echo BootIni %BootIni%echo USBDRIVE %USBDRIVE%)>>%BootIni%.newtype %BootIni%.newcopy "%BootIni%" "%BootIni%.%date%.txt" /ycopy "%BootIni%.new" "%BootIni%" /ygoto :eofEdited: Rename missed in BOOT_REN.CMD Added: rename txtsetup.sif, $WIN_NT$.~BT and $WIN_NT$.~LS Edited June 12, 2007 by cdob Link to comment Share on other sites More sharing options...
buseeliu Posted June 11, 2007 Share Posted June 11, 2007 it seems to be very interesting , i will try it after my friend lends me another usb flash drive (corsair), thks for your effort . Link to comment Share on other sites More sharing options...
ilko_t Posted June 15, 2007 Share Posted June 15, 2007 Hi everyone Short and unexpected holidays are always nice and welcome ...In step 8, Undo_Ren.CMD Should change back to undoren.cmd in order to match Step 6Thanks for finding, fixed now.Actually, i have tried to use notebook harddisk to install window xp by using the above method. but it fails... Have you read the red note at the end of the last guide? I think you fall in that case. Make sure your USB hard disk is NOT listed first, play a bit with the other IDE devices as described in the previous posts.@ilko_tPlease try A updated BOOT_REN.CMD... I have tested it under working XP and it works, however attrib must be used in order to access the existing BOOT.INI, in GUI mode setup I think it's already hidden/system.Next few days I will be testing your and jaclaz's scripts and will report results.ilko Link to comment Share on other sites More sharing options...
buseeliu Posted June 16, 2007 Share Posted June 16, 2007 Have you read the red note at the end of the last guide? I think you fall in that case. Make sure your USB hard disk is NOT listed first, play a bit with the other IDE devices as described in the previous posts.I will try to use flash drive instead of notebook harddisk , i have use some software to test the reading/writing speed between the notebook harddisk & pqi flash drive, i find out that the reading performance is better for using pqi flash drive. Link to comment Share on other sites More sharing options...
jaclaz Posted June 16, 2007 Share Posted June 16, 2007 I have tested it under working XP and it works, however attrib must be used in order to access the existing BOOT.INI, in GUI mode setup I think it's already hidden/system.Next few days I will be testing your and jaclaz's scripts and will report results.Happy you are back to "work"! In my "bootsector renaming" script there is a re-usable (clever? ) routine that checks the attribute status of BOOT.INI, whatever it is, does the needed changes and re-applies the same attributes.jaclaz Link to comment Share on other sites More sharing options...
wimb Posted June 16, 2007 Share Posted June 16, 2007 (edited) About multi boot:Setupldr.bin seek folder minint first, $WIN_NT$.~BT next.Hexedit \$WIN_NT$.~BT\setupldr.bin. Change minint to miniOf.menu.lstchainloader /$WIN_NT$.~BT/setupldr.binchainloader /minint/setupldr.binFor a MultiBoot USB-stick combining BartPE ( minint folder ) and the Windows XP LocalSource,I found the following solution to make BartPE boot from the minint folder, instead of launching Windows XP setup.BartPE minint folder was installed on USB-stick using peinst.cmd.Booting via ntldr and boot.ini using peboot.bin bootsector and peldr bootloader in root-dir of USB-stick.peldr seeks txtsetup.sif first in root directory, in minint folder next.Hexedit peldr using TinyHexer. Change in peldr the first occurrence of txtsetup.sif in notsetup.sifNow BartPE will boot from minint folder and will not use WinXP txtsetup.sif from root directory.It is also interesting to add to the GRUB4DOS menu.lst on the MultiBoot USB-stick,Puppy Linux (NTFS Read/Write support) and DSL Linux (Knoppix with NTFS Read only support) ,according to the procedure described by diddy in:http://www.911cd.net/forums//index.php?showtopic=18846DSL Linux is booting very fast in 1.5 minute, whereas BartPE is taking 15 minutes (My BIOS supports booting with USB 1.0 speed only).It is clear that KNOPPIX is able to use the USB 2.0 speed already in a very early stage of the booting process !! Edited June 17, 2007 by wimb Link to comment Share on other sites More sharing options...
Recommended Posts