Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Need Help! Parse DOSNET.INF for making $WIN_NT$.~BT Fold


  • Please log in to reply
24 replies to this topic

#1
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
Hi everyone.
Usbmuitiboot_10 is good but I want to edit USB_MultiBoot_10.cmd file to a small batch file, only use to copy xp sources and making $WIN_NT$.~BT Folder.
I use this code to making $WIN_NT$.~BT Folder ( I copied from USB_MultiBoot_10.cmd file)

@echo off
SET cpyflag=0
FOR /F "tokens=1,2,3* delims=, " %%G IN (H:\I386\DOSNET.INF) DO (
SET FTAG=%%G
SET FTAG=!FTAG:~0,13!
IF "!FTAG!"=="[FloppyFiles." (
SET cpyflag=1
IF "%%G"=="[FloppyFiles.x]" SET cpyflag=0
) ELSE (
SET FTAG=!FTAG:~0,1!
IF "!FTAG!"=="[" SET cpyflag=0
IF "!cpyflag!"=="1" (
SET btfile=%%H
IF "%%I"=="" (
SET btfile=!btfile:~0,-1!*
xcopy H:\I386\!btfile! usb_xpbt\$WIN_NT$.~BT /i /k /r /y /h
) ELSE (
copy /y H:\I386\%%H usb_xpbt\$WIN_NT$.~BT\%%I
)
)
)
)
pause>nul


( H:\ is xp source).
But I didn't succeed. So you can help me edit this code to be a right code
Great thanks :thumbup :thumbup :thumbup

Edited by congnt92, 29 April 2013 - 03:37 AM.



How to remove advertisement from MSFN

#2
wimb

wimb

    Senior Member

  • Developer
  • 679 posts
  • Joined 21-March 07
This initial code works, but it needs further improvement depending on your purpose ......

:: ==========================================================================================================================
:: ====================================== Make_XP_BT.cmd ====================================================================
:: ==========================================================================================================================
TITLE Make_XP_BT.cmd - Make XP Setup Bootfolder $WIN_NT$.~BT
@ECHO OFF
CLS

SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

ECHO  *** Make Temporary Folder usb_xpbt with Custom XP Setup BootFiles ***
ECHO.
ECHO  Parse DOSNET.INF for making Windows XP Setup Bootfolder $WIN_NT$.~BT
ECHO.

: change according to your location of XP source
SET xpsource=H:

IF EXIST usb_xpbt\nul rd /S /Q usb_xpbt
IF NOT EXIST usb_xpbt\nul MD usb_xpbt

:: Make Destination directories for XP Setup Bootfolder
IF NOT EXIST usb_xpbt\$WIN_NT$.~BT\nul MD usb_xpbt\$WIN_NT$.~BT
IF NOT EXIST usb_xpbt\$WIN_NT$.~BT\system32\nul MD usb_xpbt\$WIN_NT$.~BT\system32

SET cpyflag=0
FOR /F "tokens=1,2,3* delims=, " %%G IN (%xpsource%\I386\DOSNET.INF) DO (
  SET FTAG=%%G
  SET FTAG=!FTAG:~0,13!
  IF "!FTAG!"=="[FloppyFiles." ( 
    SET cpyflag=1
    IF "%%G"=="[FloppyFiles.x]" SET cpyflag=0
  ) ELSE (
    SET FTAG=!FTAG:~0,1!
    IF "!FTAG!"=="[" SET cpyflag=0
    IF "!cpyflag!"=="1" (
      SET btfile=%%H
      IF "%%I"=="" (
         SET btfile=!btfile:~0,-1!*
         xcopy %xpsource%\I386\!btfile! usb_xpbt\$WIN_NT$.~BT /i /k /r /y /h
      ) ELSE (
         copy /y %xpsource%\I386\%%H usb_xpbt\$WIN_NT$.~BT\%%I
      )
    ) 
  )
)

IF EXIST usb_xpbt\$WIN_NT$.~BT\NTLDR DEL usb_xpbt\$WIN_NT$.~BT\NTLDR

ECHO.
ECHO  Making Windows XP Setup Bootfolder usb_xpbt\$WIN_NT$.~BT - READY
ECHO.

ENDLOCAL

pause
EXIT

:: ==========================================================================================================================
:: ====================================== END Make_XP_BT.cmd ================================================================
:: ==========================================================================================================================

Edited by wimb, 29 April 2013 - 06:48 AM.


#3
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
Great. I did succeed. MANY THANKS for your help, wimb. Two lines: SETLOCAL ENABLEEXTENSIONS and SETLOCAL ENABLEDELAYEDEXPANSION make the difference. :yes: :yes: :yes:

Edited by congnt92, 29 April 2013 - 07:14 AM.


#4
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
@wimb, I still have a question. I'm sorry about this. I don't want to start new topic with a small problem.
I hexedited setupldr.bin and change string $WIN_NT$.~BT .by AAA\BBB\CCCC (enough 12 characters) but I get a error message "the disk labeled windows xp service pack 3 cd into A drive.....press enter when ready." It seems like the /i386/setupldr.bin finds the winnt.sif in the root of the stick and loads it, thus starting installation. And when the directory of winnt.sif file was changed, error message popup.
You can tell me how to hexedit setupldr.bin correctly
Thanks :thumbup :thumbup :thumbup

Edited by congnt92, 29 April 2013 - 11:01 AM.


#5
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,562 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

I hexedited setupldr.bin and change string $WIN_NT$.~BT .by AAA\BBB\CCCC (enough 12 characters)

WHY? :w00t:

Setupldr.bin may be not the only place where $WIN_NT$.~BT is referenced, setupdd.sys could be another place to look for it ..... :whistle:
See ;) :
http://www.msfn.org/...can-be-omitted/

jaclaz

#6
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
@jaclaz. I renamed $WIN_NT$.~BT to WXPBootFiles (12 character) and hexedited setupldr.bin too. And I don't get error message when I setup Windows. But if I rename and hexedit $WIN_NT$.~BT to AAA\BBB\CCCC (enough 12 character too) when I setup Windows, I get message error. So I think, winnt.sif can't be put in sub folder?

Edited by congnt92, 29 April 2013 - 11:38 AM.


#7
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,562 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

@jaclaz. I renamed $WIN_NT$.~BT to WXPBootFiles (12 character) and hexedited setupldr.bin too. And I don't get error message when I setup Windows. But if I rename and hexedit $WIN_NT$.~BT to AAA\BBB\CCCC (enough 12 character too) when I setup Windows, I get message error. So I think, winnt.sif can't be put in sub folder?

The given thread is about a sub-folder.
Maybe it is not possible in a sub-subfolder, or maybe the "second part" must be \I386, but if Victor888 edited setupdd.sys, maybe there was a reason for that edit. :unsure:
I tried vainly at the time to get more details/have the results of some other tests.

BTW, you did not answer to the WHY you would want to do that.

jaclaz

Edited by jaclaz, 29 April 2013 - 11:59 AM.


#8
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
So, We can rename $WIN_NT$.~BT to any string which enough 12 characters and edit setupldr.bin to reference but we can't rename $WIN_NT$.~BT to a tree directory (AAA\BBB\CCCC). That's right?
And still I have some problems. You can tell me how to move NTDETECT.COM to a folder. Edit NTLDR, edit setupldr.bin or edit setupdd.sys? :rolleyes:

Edited by congnt92, 29 April 2013 - 08:36 PM.


#9
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag
@congnt92

WHY? :w00t:


BTW, you did not answer to the WHY you would want to do that.


Well???

Cheers and Regards

Posted Image


#10
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
@jaclaz @bphlpt: I want to move NTDETECT and txtsetup.sif on USB Root to a folder in order to have a Clean Root. :rolleyes:

Edited by congnt92, 29 April 2013 - 09:57 PM.


#11
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,562 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

@jaclaz @bphlpt: I want to move NTDETECT and txtsetup.sif on USB Root to a folder in order to have a Clean Root. :rolleyes:

No. :no:
You want to have a clear root AND you assumed :ph34r: that the only way is to start doing strange things inside the files, renaming paths etc. (it's not exactly the same thing).

One of the possible answer to the simpler question:

How can I have a Clean Root?

is:
Since you are anyway using grub4dos (and if you are not now is the right moment to start using it), make a bootable NT floppy image and map it in grub4dos.
IMHO this is simpler than anything else.
See:
http://www.xxcopy.com/xxcopy33.htm
http://reboot.pro/to...s-on-hard-disk/
http://www.msfn.org/...d-winxp-64-sp2/

I can see no issues with doing the same with SETUPLDR.BIN, actually that is how the setup works when started from Floppy (yes, probably you need to go to a museum to see an actual floppy, but when XP came out in 2001 almost any PC would have had a floppy drive).
MS still provides the floppy images:
http://support.micro...b;en-us;Q310994
(check the first floppy of the 6-floppy set ;) )

jaclaz

#12
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
You may not know it but you helped me a lot. Thankyou, jaclaz :thumbup :thumbup :thumbup

#13
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
@jaclaz, please help me.

I copy files in $WIN_NT$.~BT folder and creat XP.ima with these files. I put it in USB root and use grub4dos to boot.
Here my menu.lst

title First part of Windows XP Professional setup
map --mem /XP.ima (fd0)
map --hook
root (fd0)
chainloader /SETUPLDR.BIN

title Second part of Windows XP Professional setup
root (hd0,0)
chainloader (hd0,0)/NTLDR


But I get a error message, please insert the disk labeled Windows XP Pro sp3 Setup Disk #5 into Drive A:. Press Enter when ready.
So you can help me edit menu.lst ?

p/s:
my usb root

XP.ima
grldr
menu.lst
boot.ini
$WIN_NT$.~LS
NTDETECT.COM
ntldr
txtsetup.sif

Edited by congnt92, 30 April 2013 - 07:47 AM.


#14
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,562 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
The menu.lst seems OK. :thumbup

What are the contents of the XP.ima ?
How big it is?
How did you create the .ima?

It is strange that you are asked for disk #5 (I mean, if the issue is the diskette, then it would be logical that it would have protested for #2, #3 and #4 first :unsure:)

jaclaz

#15
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag

The menu.lst seems OK. :thumbup

What are the contents of the XP.ima ?
How big it is?
How did you create the .ima?

jaclaz


I using UltraISO to creat XP.ima. I drag the files which $WIN_NT$.~BT Folder content and drop into UltraISO and save with .IMA format. So size XP.IMA aproximatelly size of $WIN_NT$.~BT Folder.
I map mem XP.ima whole $WIN_NT$.~LS folder on the USB root. The difference of directory make this error. That's right?

#16
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05

But I get a error message, please insert the disk labeled Windows XP Pro sp3 Setup Disk #5 into Drive A:. Press Enter when ready.

Add a flag file disk105 and disk106 to the floppy image.

And add a winnt.sif to the floppy image.
[Data]
MsDosInitiated="1"

Be aware:
you invent the wheel again and may get some unexpected behaviour.
Have fun.

Edited by cdob, 01 May 2013 - 04:13 PM.


#17
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
Thanks for your reply, cdob. But still it not work. I creat $WIN_NT$.~BT. Next I add winnt.sif in to this folder then drop this folder to empty XP.ima was opened by UltraISO and click save.
Finally I edit the menu.lst

title First part of Windows XP Professional setup
map --mem /XP.ima (fd0)
map --hook
root (fd0)
chainloader (fd0)/SETUPLDR.BIN

title Second part of Windows XP Professional setup
root (hd0,0)
chainloader (hd0,0)/NTLDR

But if I boot the first menu in menu.lst, the monitor display
FAT32 BPB found with 0XEB (jump) leading the bootsector
probed C/H/S = 51/8/36, probed total sectors = 14598

And then the computer reboot. You can tell me why? :rolleyes:

#18
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,562 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
As a generic tip, not necessarily applying to your case, using Ultraiso the way you are using it is likely to be part of the problem.
We old dinosaurs :ph34r: like to create a disk or diskette image, then mount it and add to it the files.
It is very possible that creating it "on the fly" with Ultraiso (and particularly editing/resizing it) makes the filesystem invalid or non bootable or however conflicting with some BIOSes.
It is also possible that the image has grown to a size that (for whatever reason) your BIOS does not "like" as a floppy (but this is unprobable, given the geometry/size you report, which is seemingly "not bad").

As cdob pointed out you are reinventing the wheel (which BTW is a very nice activity in itself :thumbup ) BUT without having first checked that the result might be a rounder wheel than existing ones :w00t: , maybe you need to learn from the words of two great inventors:

Genius is one percent inspiration, ninety-nine percent perspiration.


A lot of [Soviet Army soldiers] ask me how one can become a constructor, and how new weaponry is designed. These are very difficult questions. Each designer seems to have his own paths, his own successes and failures. But one thing is clear: before attempting to create something new, it is vital to have a good appreciation of everything that already exists in this field. I myself have had many experiences confirming this to be so.


Now, be nice, and before further attempts to "twist" the install method that Usbmuitiboot_10 uses into an image based one, take some time and examine/experiment with two alternate methods:
http://www.msfn.org/...rom-a-iso-file/
http://www.msfn.org/...aded-iso-image/

It is likely that once you will be also familiar with those you will find inspiration for "your way".... :)

jaclaz

#19
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
Ok. Thanks for your help, jaclaz. I'll try setup Win xp by loading ISO file to RAM :sneaky: :sneaky:

#20
wimb

wimb

    Senior Member

  • Developer
  • 679 posts
  • Joined 21-March 07
Or you can use:

Install of XP or Windows 7 from USB After Booting with 7 PE and
by using WinNTSetup2_x86.exe and Setup ISO file in Virtual drive

http://www.911cd.net...showtopic=24424

Edited by wimb, 02 May 2013 - 04:30 AM.


#21
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
thanks wimb. I use try all method to improve my knowledge :thumbup :thumbup

#22
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05

But if I boot the first menu in menu.lst, the monitor display
FAT32 BPB found with 0XEB (jump) leading the bootsector
probed C/H/S = 51/8/36, probed total sectors = 14598

And then the computer reboot.

Ntdetect dosn't validate floppy image.

Use a more floppy like size: multiplicate 1440 sectors
10 14400 sectors
11 15840 sectors
12 17280 sectors

Again: there are more open questions still.

Try the other approaches first.

#23
congnt92

congnt92

    Junior

  • Member
  • Pip
  • 62 posts
  • Joined 01-April 13
  • OS:Windows 7 x86
  • Country: Country Flag
@cdob: I using laptop and it's hasn't floppy drive. How can I creat a floppy image with specified sectors. Can I using UltraISO ?

#24
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05

How can I creat a floppy image with specified sectors.

How can I creat a floppy image with specified sectors.
Use ImDisk http://www.ltr-data.se/opencode.html/
Goto control panel, open Imdisk applet, mount a new virtual disk, set size of virtual disk to N blocks.
Format drive, copy files
Write image to a file

It may be the floppy size, or CHS layout.

#25
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,562 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
The issue here is that if the issue is connected with geometry of the device, you need a tool capable of "fine tuning" the image size, it's boot sector and the BPB values in it.

BUT in order to use such tools successfully you need to first learn a lot about the tunings/settings that they allow you to choose and/or make the floppy manually.
The topic, in other words requires from you a previous knowledge that you are right now seeming to be missing.

You can use (shameless plug) my spreadsheet and/or batch here:
http://www.msfn.org/...post__p__988732
http://www.msfn.org/...ost__p__1001712

or Winimage (easier):
http://www.winimage.com/

Lots of info are available here:
http://www.msfn.org/...d-their-images/
http://www.msfn.org/...oppy-emulation/
bit - as said - they tend to be "advanced".

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users