• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
congnt92

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

25 posts in this topic

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
0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

@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
0

Share this post


Link to post
Share on other sites

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 ;) :

jaclaz

0

Share this post


Link to post
Share on other sites

@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
0

Share this post


Link to post
Share on other sites

@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
0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

@congnt92

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

Well???

Cheers and Regards

0

Share this post


Link to post
Share on other sites

@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
0

Share this post


Link to post
Share on other sites

@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

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.microsoft.com/default.aspx?scid=kb;en-us;Q310994

(check the first floppy of the 6-floppy set ;) )

jaclaz

0

Share this post


Link to post
Share on other sites

You may not know it but you helped me a lot. Thankyou, jaclaz :thumbup :thumbup :thumbup

0

Share this post


Link to post
Share on other sites

@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
0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites

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:

0

Share this post


Link to post
Share on other sites

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:

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

jaclaz

0

Share this post


Link to post
Share on other sites

Ok. Thanks for your help, jaclaz. I'll try setup Win xp by loading ISO file to RAM :sneaky: :sneaky:

0

Share this post


Link to post
Share on other sites

thanks wimb. I use try all method to improve my knowledge :thumbup :thumbup

0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites

@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 ?

0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites

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:

page__view__findpost__p__988732?do=embed' frameborder='0' data-embedContent>

page__view__findpost__p__1001712?do=embed' frameborder='0' data-embedContent>

or Winimage (easier):

http://www.winimage.com/

Lots of info are available here:

bit - as said - they tend to be "advanced".

jaclaz

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.