Jump to content

cdob

Member
  • Posts

    1,180
  • Joined

  • Last visited

  • Days Won

    1
  • Donations

    0.00 USD 
  • Country

    Germany

Everything posted by cdob

  1. flyakite's FAQ is very nice. But old in the meantime. Adapt instructions slightly: e.g. it's win51ip.sp2 at SP2 files. Winbom.ini is not used anymore at pebuilder (3.1.10). Ignore winbom.ini. win51, win51ip, and win51ip.sp1 are never at i386 folder. Include \win5*.* from BartPE root folder to multi-boot DVD root folder.
  2. @jaclaz I like rdisk(z-1) idea. This should work in most cases. Tests have to follow. Strange BIOS, like wanderer's BIOS, may get different results. I changed one line at binifix.cmd. rem IF "%%A"=="Default" SET DefaultEntry=%%B IF /I "%%A"=="default" SET DefaultEntry=%%B Signature compare Post #34 http://www.msfn.org/board/index.php?s=&amp...st&p=585105 Dosn't signature() contain rdisk(0) already? Do we habe to change a signature() line? Nice, your code is already fail safe Yes BOOT.INI should always be on C:\BOOT.INI, but it isn't always in real life. Please read Post #220, boot.ini is seeked at %SystemDrive%. If this fails, drive letters are seeked in decending order. This support more cases. Of course this may fail at strange machines. Given a default MS MBR: How to detect the drive letter of primary active partition? Can you backup a existing boot.ini as e.g. boot.bak? %date% from Post #220 was a bad idea. This may fail at different languages.
  3. XP Pro SP2 and XP Home SP2 can be integrated similar to Flyakite's guide. Difference: Instead of file win51ic.sp1 use file win51ic.sp2. Instead of file win51ip.sp1 use file win51ip.sp2. There are a lot of CD Boot Menu solutions. They use a loader and a configuration file. Cdshell is one example. I don't know a much simpler guide.
  4. Thanks for correcting. Sorry, bad message from bad memory last time. I opened old logs and found: U:\minint>gsar -o -s:000txtsetup.sif:000 -r:000txtsetup.off:000 setupldr.bin setupldr.bin: 6 occurrences changedYes, \txtsetup.sif is the keyfile.
  5. @ilko_t Please try A updated BOOT_REN.CMD \bootfiles is not used anymore. Ntldr and ntdetect.com are copied from $WIN_NT$.~LS Boot.ini is builded at boot time: Boot.ini maybe not at %SystemDrive%: e.g. c:\boot.ini and d:\windows If 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 off set BootIniDrive=%SystemDrive% SET TAGFILE=\BOOT.INI if 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$.~LS FOR %%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%\%%a copy %USBDRIVE%\$WIN_NT$.~LS\I386\ntldr %BootIniDrive%\ /y copy %USBDRIVE%\$WIN_NT$.~LS\I386\ntdetect.com %BootIniDrive%\ /y ren %USBDRIVE%\txtsetup.sif txtsetup.bak ren %USBDRIVE%\$WIN_NT$.~BT WIN_NT.BT ren %USBDRIVE%\$WIN_NT$.~LS WIN_NT.LS call :createBootIni goto :eof :createBootIni (echo [boot loader] echo timeout=10)>%BootIni%.new for /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%.new for /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%.new type %BootIni%.new copy "%BootIni%" "%BootIni%.%date%.txt" /y copy "%BootIni%.new" "%BootIni%" /y goto :eof Edited: Rename missed in BOOT_REN.CMD Added: rename txtsetup.sif, $WIN_NT$.~BT and $WIN_NT$.~LS
  6. [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/#setupparams 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. True, MkMigratgeInf.cmd dosn't create this line, because this line is not required in migrate.inf.@buseeliu Name 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.
  7. @ilko_t At first glance I dislike renaming $WIN_NT$ folder. Is this reliable? Contrary no long wait at T-1: You confinced me. I like renaming $WIN_NT$ folders. Nice solution, thanks. BOOT_REN.CMD: Can you backup a possible existand boot.ini? Idea, not tested: copy %SYSTEMDRIVE%\boot.ini %SYSTEMDRIVE%\boot.%date%.ini /y xcopy %USBDRIVE%\bootfiles\*.* %SYSTEMDRIVE%\ /y /h /r /k And can you create boot.ini dynamically? Not a fixed \WINDOWS, extract foldername from %SystemRoot% ? About multi boot: Setupldr.bin seek folder minint first, $WIN_NT$.~BT next. Hexedit \$WIN_NT$.~BT\setupldr.bin. Change minint to miniOf. menu.lst chainloader /$WIN_NT$.~BT/setupldr.bin chainloader /minint/setupldr.bin
  8. @jaclaz Thanks for floppy image / recocery console link. I tried direct mapping of the image and failed. And integration some Dietmar's ideas, like load USB drivers earlier, failed too. Sad, I like this idea more. This dosn't require 2003 files. Second approach: Yes, ntldr is a renamed 2003 SP1 setupldr.bin.And I forgot to mention to copy 2003 ramdisk.sy_ to image. By the way: did you opened KB310994 floppy image? Bootsector loads setupldr.bin. "hiveOEM.inf goes to H:\I386\txtsetup.sif" in more words: Edit file H:\I386\txtsetup.sif, add hiveOEM.inf entries. Copy file hiveOEM.inf to <USB drive>\$WIN_NT$.~LS\I386\hiveOEM.inf. File location hasn't changed to previous messages. The "RAMLOAD.IMG" contains: a dirtectory \I386 containing all files from \$WIN_NT$.~BT\ + txtsetup.sif And migrate.inf, if necessary for drive letter fixing. Writeprotect at migrate.inf is not necessary. Break, maybe my memory fails: did I include writeprotect in migrate.inf?. I don't recall my latests tests anymore. Good question, let's say this is my impression.SETUP dosn't list C: to a partition. C: is not assigned to a real partition. Most likely 2003 SP1 RAM loaded partition get letter X: internally. So I assume C: goes to grub4dos virtual partition. XP Embedded virtual hard disk appear in Disk Management and registry. Windows thread them as a real hard disk.For testing purposes I like to use this informations. If this leeds to a solution, VDK may come in handy. But currently I avoid additional confusion.
  9. Main idea: satisfy setupldr.bin, ntdetect.com and get rdisk(0): Map a boot image to a floppy drive. Swap USB and internal drive. A hdx is NOT doubled used, this may be a secure approach. map /boot.img (fd0) map (hd1) (hd0) map (hd0) (hd1) $WIN_NT$.~BT and $WIN_NT$.~LS are splitted: \$WIN_NT$.~BT part goes to boot image \$WIN_NT$.~LS goes to USB drive I used a floppy image from reanimatolog http://bootcd.narod.ru/images_e.htm fd011520.zip Floppy image 11.52mb (8x1.44mb) ImDisk Virtual Disk Driver mount this file. http://www.ltr-data.se/index_en.html Run ImDiks applet from the Control Panel, mount image. Let's use letter G: Format virtual drive. This creates a ntldr bootsector. 1) XP installation floppies KB310994 offers XP installation floppy images. http://support.microsoft.com/kb/310994/ Open the six floppy image files at ImDiks and copy files to drive G: Rename G:\setupldr.bin to ntldr. hiveOEM.inf goes to G:\txtsetup.sif. Setup does boot. But next a famous BSOD 0x7b Inaccesable boot device does appear. Can anybody solve this? New game: 2) Two virtual drives 2003 SP1 setupldr.bin does RAM load a image. Use 2003 SP1 setupldr.bin and ramdisk.sy_, that's not 2003 SP2 files. Mount virtual floppy again. Delete all files and add files Ntldr is the renamed 2003 SP1 setupldr.bin. G:\RAMLOAD.IMG: Use ImDisk, create a new virtual image, 10 mb. Let's use letter H: Format virtual drive. Copy \$WIN_NT$.~BT\ files to H:\I386\ Copy txtsetup.sif to H:\I386\txtsetup.sif. hiveOEM.inf goes to H:\I386\txtsetup.sif. XP installation does work. Files goes to a AHCI SATA harddisk. Boot.ini get rdisk(0). This is NOT rdisk(1). One drawback: grub4dos virtual floppy get's drive letter c: Therefore internal harddisk get's d: Sad, I expected a different behaviour because of floppy mapping. Does a more experienced grub4dos user have a solution? Fixing c: at H:\I386\migrate.inf does work too. However this is not a general soution. Partition and format at USB XP installation creates a new DiskID. Fixed c: is not valid anymore. Random idea: XP Embedded creates virtual hard disks, including MBR and MountedDevices. Extract hard disk image: dd if=raminst.sdi of=raminst.img skip=8 More testing time needed. @snowden Yes, a working \I386 solution would be nice. If you provide a working solution, I'll use this happily. Setupldr.bin support two modes: CD and floppy/harddisk mode. Selecting mode is unknown. I suspect ntdetect.com hardware findings or different file systems. IF a BIOS would boot from ISO9660 at USB... At CD mode folder \I386 is used. At floppy/harddisk mode folder \$WIN_NT$.~BT, \cmdcons or \minint is used. But there are more files involved. Setupdd.sys at textmode setup. Gui mode setup is the next difficulty. Winnt32 with options syspart and tempdrive copy \$WIN_NT$.~BT and \$WIN_NT$.~LS files to hard disk. In addition partitin is marked as active. This can be run from a running PE. In addition I wonder, what hapens if this is applied to a USB drive? And windows is installed. Are files deleted at USB drive?
  10. Try Bootable Ghost restore CD-Rom "ELGHOST" http://www.nu2.nu/bootcd/#elghost By default this creates a bootable floppy image and add ghost files to CD. Create ISO image only. Burn ISO file to DVD.
  11. @Ilko_t Don't misunderstand me. I appreciate all your testings and findings. I'm slitting myself: At testing machines insane approaches are allowed, e.g. two USB sticks. All data may be destroyed. At testing machines I like grub4dos map and boot.ini signature. I haven't understood BIOS, grub4dos and windows setup behaviour fully. Contrary a final solution has to work at unknown machines too. No partiton or data is destroyed. At unknown machines I like a low risk solution. Currently that's avoid grub4dos map. Boot.ini may have to be manually edited. If there is a secure map solution, I happily change my mind and use this solution. Thanks for migrate.inf scripting report. First version is more a basic test version. Yes write-protect entries can be added. I've limited free time: no further testings and no development so far.
  12. Different user have different needs. I consider USB WinXP installation as a emergency solution. This should work at different machines, manually parts are allowed. My menu.lst part is pretty dump title boot /$WIN_NT$.~BT/setupldr.bin chainloader /$WIN_NT$.~BT/setupldr.binAs known, this gives a broken boot.ini pointing to rdisk(1). A "map (hd0) (hd1)" use fixed hdN numbers. At different machines both source and target may use different hdN numbers. E.g. a internal card reader may result in different hdN numbers. And different BIOS use different USB boot handling. A new unkown machine may get different results to previous experience. That's not a general solution. A general working unattended solution would be nice. In the meantime I use a manually workarround: I knew false boot.ini entries from the past and will recognice this in future. I manually edit boot.ini at first reboot. $winnt$.inf was not edited, false entries are there still. Recovery console, PE and Knoppix are at this USB stick anyway. I din't used unattended feature to remove USB write protection. At first windows boot, I opened regedit.exe and deleted StorageDevicePolicies. A idea, NOT tested: hiveOEM.inf [Version] Signature = "$Windows NT$" DriverVer=07/01/2001,5.1.2600.2180 [AddReg] ;WriteProtect USB HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect",0x10001,1 ;remove WriteProtect USB at first windows boot HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce","Remove_WriteProtect",,"reg.exe delete HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies /f" ;set OEM drivers at USB U: HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","DevicePath",0x00020002,"%SystemRoot%\inf;U:\OEM_driver\int1;U:\OEM_driver\vga1"ilko_t's winnt.inf [GuiRunOnce] remove WriteProtect makes more sense. Some fun: title boot (hd1,0)/$WIN_NT$.~BT/setupldr.bin map --read-only (hd0) (hd1) map --hook root (hd1,0) chainloader (hd1,0)/$WIN_NT$.~BT/setupldr.bin savedefault 1Setup is started, textmode does work, first reboot fails. Broken boot.ini: multi(0)disk(0)rdisk(2)partition(1)\WINDOWS2 Recognice rdisk(2), that's not rdisk(1). A second USB stick was attached too. Idea: second USB stick was hd1, internal harddisk hd2. After removing second USB stick, grub4dos fails: Error 27: Disk read error. There is a internal SATA ACHI hd with NTFS partitions. Neither at second second USB stick not hard disk is a /$WIN_NT$.~BT/setupldr.bin. /$WIN_NT$.~BT/setupldr.bin exist once at hole machine. chainloader (hd1,0)/ntldr_bt give Error 27 too. Second USB stick inserted again: map --read-only (hd0) (hd2) map --hook root (hd2,0) chainloader (hd2,0)/$WIN_NT$.~BT/setupldr.binSetupldr.bin is loaded, however ntdetect failed. At the other hand boot.ini signature(de33eaf8) indicates: Windows setup detected some strange environment and use a fall back settings. Requested settings ask grub4dos to build a insane mapping: two hds mapped to the same hdX. That's a broken design. Contrary this may work at all machines or fail at some machines. I like a fixed USB drive letter still, compare OEM drivers at USB U: So I created a first version to extract MountedDevices setting. Copy MkMigratgeInf.cmd to <USB drive>\$WIN_NT$.~BT\MkMigratgeInf.cmd and launch it. This USB drive is mapped to DosDevices U:. A MIGRATE.INF.TXT is created, open it and read file. Rename file to migrate.inf. MkMigratgeInf.cmd @echo off REM MkMigratgeInf.cmd v0.01 REM created by cdob setlocal EnableExtensions set Drive=%~d1 if %Drive%.==. set Drive=%~d0 set FileName=%~2 if %FileName%.==. set FileName=MIGRATE.INF.TXT set MigrateDrive=U: if not %~d3.==. set MigrateDrive=%~d3 set Value= FOR /F "skip=2 tokens=1-2*" %%a IN ('reg query HKLM\System\MountedDevices /v \DosDevices\%Drive%') DO set Value=%%c if %Value%.==. (echo drive settings %Drive% not found & goto :EOF) set MigrateStr=%Value:~0,2% set count=2 :begin_parse call :exec set MidStr=%%Value:~%count%,2%% if %MidStr%.==. goto :exit_parse set MigrateStr=%MigrateStr%,%MidStr% set /a count+=2 goto begin_parse :exit_parse (echo [Version] echo Signature = "$Windows NT$" echo. echo [Addreg] echo HKLM,"SYSTEM\MountedDevices","\DosDevices\%MigrateDrive%",0x00030001,\ echo %MigrateStr%)>%FileName% goto :EOF :exec %* goto :EOFA XP default reg.exe is expected. By the way: A RAM loaded PE image read file \I386\system32\migrate.inf. Another untesed idea: use migrate.inf for general settings Create tow similar PE, small registry changes. Two setupldr.bin: one calls migrate.inf, another calls migrat2.inf.
  13. Setup tries to delete all files still, but can't delete files.I've no idea, how setup works internally. Yes, a batch can convert MountedDevices keys. This is a job for a Rob van der Woude third party author. Rember a fixed USB drive letter is not required, but may be nice anyway. Yes, StorageDevicePolicies could be one line in migrate.inf. REG_BINARY is easier to read and may get less errors at editing migrate.inf. And this was a hint, migrate.inf can hold additional entries. BTW: At PE setupldr.bin read \minint\system32\migrate.inf.
  14. It dosn't care about hex address: At this example 2003 SP2 files does boot. I get neither "NTLDR is corrupt" nor "NTDETECT Failed". Another hardware or name may get different result.
  15. Setup deletes files at two times: -end of textmode setup -end of graphic mode setup: T -1 minutes Set USB WriteProtect twice. First \$WIN_NT$.~BT\migrate.inf [Version] Signature = "$Windows NT$" [Addreg] ;fix USB drive letter, adjust setting to your partition HKLM,"SYSTEM\MountedDevices",,0x00000010 HKLM,"SYSTEM\MountedDevices","\DosDevices\U:",0x00030001,\ 5c,00,3f,00,3f,00,5c,00,53,00,54,00,4f,00,52,00,41,00,\ 47,00,45,00,23,00,52,00,65,00,6d,00,6f,00,76,00,61,00,62,00,6c,00,65,00,4d,\ 00,65,00,64,00,69,00,61,00,23,00,37,00,26,00,31,00,64,00,64,00,65,00,34,00,\ 37,00,39,00,65,00,26,00,30,00,26,00,52,00,4d,00,23,00,7b,00,35,00,33,00,66,\ 00,35,00,36,00,33,00,30,00,64,00,2d,00,62,00,36,00,62,00,66,00,2d,00,31,00,\ 31,00,64,00,30,00,2d,00,39,00,34,00,66,00,32,00,2d,00,30,00,30,00,61,00,30,\ 00,63,00,39,00,31,00,65,00,66,00,62,00,38,00,62,00,7d,00 ;WriteProtect USB HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1 [Strings] ;Handy macro substitutions (non-localizable) REG_SZ = 0x00000000 REG_BINARY = 0x00000001 REG_DWORD = 0x00010001 REG_MULTI_SZ = 0x00010000 REG_SZ_APPEND = 0x00010008 REG_EXPAND_SZ = 0x00020000MountedDevices fixes USB drive letter to U: This can be used at PNP time. Setting is hardware related, export MountedDevices USB setting from local registry. Different USB Sticks may require different MountedDevices settings. Create different migrate.inf. Second \$WIN_NT$.~LS\I386\hiveOEM.inf [Version] Signature = "$Windows NT$" DriverVer=07/01/2001,5.1.2600.2180 [AddReg] ;WriteProtect USB HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect",0x10001,1 \txtsetup.sif: add hiveOEM.inf [SourceDisksFiles] hiveOEM.inf = 100,,,,,,_x,,3,3 [HiveInfs.Fresh] AddReg = hiveOEM.inf,AddReg \$WIN_NT$.~BT\winnt.sif [data] msdosinitiated="1" UseSignatures="no" EulaComplete="1" Install windows. At T -1 minutes wait a looong time or remove USB stick. Setup reboots then. No files are deleted at USB stick. After windows installation USB stick is write protected still. You may change StorageDevicePolicies to 0 to disable write protection and delete USB stick in device manager. Another solution might be fbwf (File Based Write Filter Driver): write protect drive letter U: A XP Embedded user may have more knowledge.
  16. Read Post #69 http://www.msfn.org/board/index.php?showto...st&p=580692 Search string "46 da 74 03" does work at 2003 SP2 too.
×
×
  • Create New...