Автор Jasper, 09 Сентября 2009, 13:36:20
0 Пользователей и 1 Гость просматривают эту тему.
default /defaulttitle Boot from Hard Drive - Windows XP (NTLDR)fallback 1find --set-root --ignore-floppies --ignore-cd /ntldrmap () (hd0)map (hd0) ()map --rehookfind --set-root --ignore-floppies --ignore-cd /ntldrchainloader /ntldrsavedefault --wait=2title Boot from Hard Drive - Windows Vista/7 (BOOTMGR)fallback 2find --set-root --ignore-floppies --ignore-cd /bootmgrmap () (hd0)map (hd0) ()map --rehookfind --set-root --ignore-floppies --ignore-cd /bootmgrchainloader /bootmgrsavedefault --wait=2title --------------------roottitle Start Hiren's BootCDfallback 4find --set-root /HBCD/boot.gzmap --mem /HBCD/boot.gz (fd0)map --hookchainloader (fd0)+1rootnoverify (fd0)map --floppies=1boot# If you have any problem loading the above grub4dos map commands then try using memdisk kernel# title Start Hiren's BootCD# find --set-root /HBCD/boot.gz# kernel /HBCD/memdisk# initrd /HBCD/boot.gztitle Mini Windows Xpfallback 5find --set-root /HBCD/XPLOADER.BINchainloader /HBCD/XPLOADER.BIN
Цитата: ashes от 18 Сентября 2009, 19:52:24Но поставить винду например таким способом не выйдет ...Да и ваще ИМХО проще распаковать ISO хирена и прописать что-то типа :[/quote ]Хирен без распаковки:title Hiren's.bootcd 9.6find --set-root /hbcd.iso map --mem /hbcd.iso (0xff) map --hook chainloader (0xff) savedefault --wait=2По поводу виндовс:ЦитироватьHere is a quick guide how I proceeded with 100% success on ATA hard drives.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 (https://sourceforge.net/project/showfiles.php?group_id=104188&package_id=215976) for WIN3. Get the latest GRUB4DOS (http://grub4dos.jot.com/WikiHome) and copy GRLDR to the USB root.Create MENU.LST in USB rootcolor black/cyan yellow/cyantimeout 15default 1title Phase 1 WinXP Text Mode Setupmap --read-only (hd0) (hd1)map --hookroot (hd1,0)chainloader /ntldrstptitle Phase 2 WinXP GUI Mode Setupmap (hd1) (hd0)map --hookrootnoverify (hd0)chainloader +1This 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.4. Backup your current BOOT.INI and in the XP setup folder \I386 run winnt32 /makelocalsource /noreboot after it's finished restore BOOT.INI5. Copy two new folders in the USB stick root - $WIN_NT$.~BT and $WIN_NT$.~LS6. In \$WIN_NT$.~BT modifyWINNT.SIF[data]msdosinitiated="1"floppyless="1"AutoPartition="0"UseSignatures="no"InstallDir="\WINDOWS"winntupgrade="no"win9xupgrade="no"[GuiRunOnce]"regedit /s %systemdrive%\windows\system32\undoUSBWP .reg"andMIGRATE.INF[Version]Signature = "$Windows NT$"[Addreg]HKLM,"SYSTEM\MountedDevices",,0x00000010HKLM,"SYSTEM\ControlSet001\Control\StorageDevi cePolicies","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 you could preserve your USB storage drive letter keeping the relevant entries in migrate.inf. Note your current USB drive letter and find the line (mine is set to U) HKLM,"SYSTEM\MountedDevices","\DosDevices\U:",0x00030001,\5c,00,3f,00,3f,00,5c,00,53,00,54,00,4f,0 0,52,00,41,00,47,00,45,00,23,00,52,\00,65,00,6d,00,6f,00,76,00,61,00,62,00,6 c,00,65,00,4d,00,65,00,64,00,69,00,\61,00,23,00,37,00,26,00,31,00,34,00,39,0 0,31,00,63,00,63,00,33,00,34,00,26,\00,30,00,26,00,52,00,4d,00,23,00,7b,00,3 5,00,33,00,66,00,35,00,36,00,33,00,\30,00,64,00,2d,00,62,00,36,00,62,00,66,0 0,2d,00,31,00,31,00,64,00,30,00,2d,\00,39,00,34,00,66,00,32,00,2d,00,30,00,3 0,00,61,00,30,00,63,00,39,00,31,00,\65,00,66,00,62,00,38,00,62,00,7d,00 , I found that it's not needed. [Strings] must be present.7. Create:undoUSBWP.regWindows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl Set\Control\StorageDevicePolicies]"WriteProtect"="0" andhiveOEM.inf[Version]Signature = "$Windows NT$"DriverVer=07/01/2001,5.1.2600.2180[AddReg];WriteProtect USBHKLM,"SYSTEM\CurrentControlSet\Control\Storage DevicePolicies","WriteProtect",0x10001,1 and place them in $WIN_NT$.~LS\i3868. Copy TXTSETUP.SIF, SETUPLDR.BIN and NTDETECT.COM from \$WIN_NT$.~BT to root of USB stick. Delete BOOTSECT.DAT (necessary?) and rename SETUPLDR.BIN to NTLDRSTP, or modify the relevant entries in MENU.LST9. Add the following lines to TXTSETUP.INF[SourceDisksFiles]..........hiveOEM.inf = 100,,,,,,_x,,3,3undoUSBWP.reg = 100,,,,,,_x,2,0,0........[HiveInfs.Fresh]AddReg = hiveOEM.inf,AddReg10. If you use unattended mode for the setup make sure you delete the whole [Unattend] section, otherwise you won't be able to use System Restore and SETUP will not prompt on which partition to install.I used BTS mass-storage drivers pack, with KTD option and Nlited fully unattended installation, to keep Nlite options copy the relevant entries from the original WINNT.SIF to the new one, don't forget to delete the whole [Unattended] section. [Data] section do not modify except UseSignatures="no". Also copy $OEM$ to \$WIN_NT$.~LS\i386 and OEM (BTS scripts) to the root of USB stick.Thanks a lot to porear and jaclazAll credits for the most important part- how to write- protect the USB flash go to cdob, many thanksedit: Forgot to mention that removing write-protect mode after GUI is finished is also done in steps 6 and 7.http://www.msfn.org/board/index.php?showtopic=61384
ЦитироватьHere is a quick guide how I proceeded with 100% success on ATA hard drives.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 (https://sourceforge.net/project/showfiles.php?group_id=104188&package_id=215976) for WIN3. Get the latest GRUB4DOS (http://grub4dos.jot.com/WikiHome) and copy GRLDR to the USB root.Create MENU.LST in USB rootcolor black/cyan yellow/cyantimeout 15default 1title Phase 1 WinXP Text Mode Setupmap --read-only (hd0) (hd1)map --hookroot (hd1,0)chainloader /ntldrstptitle Phase 2 WinXP GUI Mode Setupmap (hd1) (hd0)map --hookrootnoverify (hd0)chainloader +1This 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.4. Backup your current BOOT.INI and in the XP setup folder \I386 run winnt32 /makelocalsource /noreboot after it's finished restore BOOT.INI5. Copy two new folders in the USB stick root - $WIN_NT$.~BT and $WIN_NT$.~LS6. In \$WIN_NT$.~BT modifyWINNT.SIF[data]msdosinitiated="1"floppyless="1"AutoPartition="0"UseSignatures="no"InstallDir="\WINDOWS"winntupgrade="no"win9xupgrade="no"[GuiRunOnce]"regedit /s %systemdrive%\windows\system32\undoUSBWP .reg"andMIGRATE.INF[Version]Signature = "$Windows NT$"[Addreg]HKLM,"SYSTEM\MountedDevices",,0x00000010HKLM,"SYSTEM\ControlSet001\Control\StorageDevi cePolicies","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 you could preserve your USB storage drive letter keeping the relevant entries in migrate.inf. Note your current USB drive letter and find the line (mine is set to U) HKLM,"SYSTEM\MountedDevices","\DosDevices\U:",0x00030001,\5c,00,3f,00,3f,00,5c,00,53,00,54,00,4f,0 0,52,00,41,00,47,00,45,00,23,00,52,\00,65,00,6d,00,6f,00,76,00,61,00,62,00,6 c,00,65,00,4d,00,65,00,64,00,69,00,\61,00,23,00,37,00,26,00,31,00,34,00,39,0 0,31,00,63,00,63,00,33,00,34,00,26,\00,30,00,26,00,52,00,4d,00,23,00,7b,00,3 5,00,33,00,66,00,35,00,36,00,33,00,\30,00,64,00,2d,00,62,00,36,00,62,00,66,0 0,2d,00,31,00,31,00,64,00,30,00,2d,\00,39,00,34,00,66,00,32,00,2d,00,30,00,3 0,00,61,00,30,00,63,00,39,00,31,00,\65,00,66,00,62,00,38,00,62,00,7d,00 , I found that it's not needed. [Strings] must be present.7. Create:undoUSBWP.regWindows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl Set\Control\StorageDevicePolicies]"WriteProtect"="0" andhiveOEM.inf[Version]Signature = "$Windows NT$"DriverVer=07/01/2001,5.1.2600.2180[AddReg];WriteProtect USBHKLM,"SYSTEM\CurrentControlSet\Control\Storage DevicePolicies","WriteProtect",0x10001,1 and place them in $WIN_NT$.~LS\i3868. Copy TXTSETUP.SIF, SETUPLDR.BIN and NTDETECT.COM from \$WIN_NT$.~BT to root of USB stick. Delete BOOTSECT.DAT (necessary?) and rename SETUPLDR.BIN to NTLDRSTP, or modify the relevant entries in MENU.LST9. Add the following lines to TXTSETUP.INF[SourceDisksFiles]..........hiveOEM.inf = 100,,,,,,_x,,3,3undoUSBWP.reg = 100,,,,,,_x,2,0,0........[HiveInfs.Fresh]AddReg = hiveOEM.inf,AddReg10. If you use unattended mode for the setup make sure you delete the whole [Unattend] section, otherwise you won't be able to use System Restore and SETUP will not prompt on which partition to install.I used BTS mass-storage drivers pack, with KTD option and Nlited fully unattended installation, to keep Nlite options copy the relevant entries from the original WINNT.SIF to the new one, don't forget to delete the whole [Unattended] section. [Data] section do not modify except UseSignatures="no". Also copy $OEM$ to \$WIN_NT$.~LS\i386 and OEM (BTS scripts) to the root of USB stick.Thanks a lot to porear and jaclazAll credits for the most important part- how to write- protect the USB flash go to cdob, many thanksedit: Forgot to mention that removing write-protect mode after GUI is finished is also done in steps 6 and 7.http://www.msfn.org/board/index.php?showtopic=61384