Jump to content

Unattended Secret: Reducing Size Of Source


Recommended Posts

I tried to keep my first post as simple as possible so people didn't get lost. Hopefully i didn't lose anyone. For those people who successfully made the slimmed down xp cd, let's take it a step further.

Most people making unattended cd's just try to make a typical cd that just installs stuff such as software and hotfixes. They read microsoft articles on making unattend files, slipstreaming, etc and they stop there. But once you've made an unattended cd you have a problem: you can only use the cd for unattended installs. You cannot use it for recovery console or to repair XP. You also can only use 1 unattend file, you can't have multiple unattend files. Let's take my original post further so you can use the cd to make an unattended install, -OR- use recovery console or repair XP.

I'm going to assume you've already followed my first post and still have c:\install

First, rename the BOOT folder to VOL1. Then copy the contents of the VOL1 folder to 2 other folders - VOL2 and VOL3 (make sure VOL1, VOL2, VOL3 are capital letters). SO VOL1, VOL2, VOL3 should all have the same files and be the same size. All 3 folders should be in c:\install

Next, hex c:\install\VOL1\setupldr.bin, replace BOOT with VOL1, the hex editor should find 4 matches (you might need to make a brand new setupldr.bin file if the hex editor finds more than 4 matches). Then hex c:\install\VOL2\setupldr.bin, replace BOOT with VOL2, the hex editor should find 4 matches. Then hex c:\install\VOL3\setupldr.bin, replace BOOT with VOL3, the hex editor should find 4 matches.

Make sure VOL1 doesn't have a winnt.sif file. Put your unattend file into VOL2. Ignore VOL3 for now.

Rename xpboot.bin to VOL1.DAT (all capital letters). Copy VOL1.DAT to VOL2.DAT and VOL3.DAT. So we should have VOL1.DAT, VOL2.DAT, VOL3.DAT, that are all identical. Hex VOL1.DAT and replace BOOT with VOL1. Hex VOL2.DAT and replace BOOT with VOL2. Hex VOL3.DAT and replace BOOT with VOL3.

Now download http://www.nu2.nu/nu2files/diskem1x.zip and extract the file to a temp location. From this temp location, copy these files to your c:\install folder:

Deload.bin, diskem1x.bin, loader.bin

Copy what's below and save it as c:\install\diskemu.cmd





print Press Enter to boot from CD...

getkey 5 esc

onkey esc boot 80

onkey entr goto start

; When no key found...

goto boot




print ------------------------------------------------------------------------------

print                                cd name here

print                                     by gosh

print ------------------------------------------------------------------------------

print F1=Help

print                 0)   WINXP PRO Volume License SP1 Regular

print                 1)   WINXP PRO Volume License SP1 Unattended

print                 2)   WINXP PRO Volume License SP1 OEMPreinstall


print                 x)   More Options...

print                 q)   Quit to command prompt

print                 r)   Reboot

print                 Esc) Boot first harddisk


print Hit the key of choice:


; timeout is 30 seconds, default key is escape

getkey 30 esc

onkey 0 run VOL1.DAT

onkey 1 run VOL2.DAT

onkey 2 run VOL3.DAT

onkey q quit

onkey r reboot

onkey x goto dev

onkey f1 goto help

onkey esc boot 80

; When no key found...

goto mainkey




print HELP

print ----


print Hit the key of your choice (1,2,q,r or <Esc>) in the main menu ->

print Hit the key "d" will bring you to the hidden Development menu  ->


print Press any key to return to main menu...


goto start


Ok so now in your c:\install folder you should have the following:
Directory of c:\install

10/08/2003  06:58 PM    <DIR>          .

10/08/2003  06:58 PM    <DIR>          ..

10/08/2003  06:58 PM    <DIR>          I386

10/08/2003  07:52 PM             2,048 VOL1.DAT

08/23/2001  09:00 AM                10 WIN51

08/23/2001  09:00 AM                10 WIN51IC

08/23/2001  09:00 AM                 2 WIN51IC.SP1

08/23/2001  09:00 AM                10 WIN51IP

08/23/2001  09:00 AM                 2 WIN51IP.SP1

08/23/2001  09:00 AM            11,387 SPNOTES.HTM

10/08/2003  06:58 PM    <DIR>          VOL1

08/23/2001  09:00 AM             2,980 DISKEMU.CMD

08/23/2001  09:00 AM               512 DELOAD.BIN

08/23/2001  09:00 AM            12,288 DISKEM1X.BIN

08/23/2001  09:00 AM             2,048 LOADER.BIN

10/08/2003  07:52 PM             2,048 VOL2.DAT

10/08/2003  07:52 PM             2,048 VOL3.DAT

10/08/2003  11:38 PM    <DIR>          VOL2

10/08/2003  11:38 PM    <DIR>          VOL3

That's it. Now let's build it with cdimage.exe:

cdimage -lXPSP1 -t08/23/2001,09:00:00 -bc:\install\loader.bin -h -n -m -o c:\install c:\xpsp1.iso

You now have a bootable XP Pro SP1 cd. When you boot from it, if you chose option 0, it's just a regular xp install. You will be able to use recovery console, repair xp, and you can chose every option in xp seteup. If you chose option 2, you will do an unattended install. If you do option 3, it'll do whatever you want it to. In my example, i made it an OEMPreinstall.


Link to comment
Share on other sites

gosh, forgive me for saying this but one can cut down the size of the i386 folder to 340 megs without going through the lengthy prcedure you are describing. the LANG folder can be safely deleted among other things for example. some cab files can be removed also by taking your INF method a step further (test results on this soon). scancurban mentioned a method of creating silent rar sfx archives for themes and other apps to cut down the total size of the cd.

Link to comment
Share on other sites

Well of course if you manually delete files on your xp cd it'll reduce the size. The reason i use my method is because it's quick, it allows you to use several unattend files, it saves 150 megs, and it'll cause no problems.

Using my method is exactly the same thing as running winnt32.exe and doing a clean install. Manually deleting files, deleting folders, could cause unforseen problems. And my way you don't remove any features. When you manually remove windows media player and stuff like that you are removing features, mine is feature complete. Also compressing files using winrar will cause setup to take longer as it uncompresses the files.

And even if you make a huge batch file that removes hundreds of files from the xp install, you still won't have access to recovery console using an unattended install, or have the option to repair XP.


Link to comment
Share on other sites

One question...

I have made an unattended CD without deleting any of the original files. I have only altered the winnt.sif. The disk will not display the recovery console nor allow me to repair an existing XP installation.

This is my only problem with my unattended disk. Do you know how I'd fix that? It must be an entry in winnt.sif, can't think of anything else.

Link to comment
Share on other sites


does it run with a real unattended installation not over cd with winnt.sif?

I'm connecting to a share and run

set ntpfad=v:\i386
%ntpfad%\WINNT  /S:%ntpfad% /U:%ntpfad%\_unat.txt /UDF:ue%ANS%,%ntpfad%\_udf.txt /E:C:\winnt\install2.bat

via this method, the setup have 2 parts for copy files


Link to comment
Share on other sites

This is something i am going to try as i like the idea, But i have one question for you.

When is the HAL created?

If it is in the stage that creates the two folders then this process is only good for the pc it is created on.

If it is after that then all is well and it can be used for all pc's.

Can anyone give any details on the HAL and when it it created as this is something i don't know much about.

Link to comment
Share on other sites

I've followed your guide gosh and Setup still goes through textmode setup before continuing GUImode setup. Should that be happening? Also, when I tried to run winnt32 with the unattend switch it told me that my winnt.sif was invalid. Any ideas?

Link to comment
Share on other sites

anyone know why i only get one folder and that one is $WIN_NT$.~BT i dont get the other one?

I tried this with the same result.

When i use 'winnt' unter DOS, the 2nd folder is created.

No explanation to this behavior...

Be careful with editing the Diskemu.cmd:

Never use TAB and never leave spaces at the end of each line,

the batch will NOT run.


And don't forget the EOF at the end of the script.

If you burn with Nero:

('cause cdimage.exe is "For internal use only" and don't burn)

Bootfile is loader.bin

No Emulation

Segments 4

...like normal XP-BootCD

Summary, i use this GREAT method to have the opinion to include a WIN98SE-BOOTDISK

to create partitions with Xfdisk or other tools.

-Thanx gosh

Link to comment
Share on other sites

Let me do a little more explaining.

You should only run winnt32.exe /noreboot from the GUI. When you run this command, all setup does is copy files using dosnet.inf. Then it restarts your computer and runs setup from your hard drive.

If you look at the ~LS folder you will see several files are not there, such as winnt32.exe and winnt.exe. Microsoft's documentatioln says that when you boot from an xp cd, winnt32.exe is launched. As you can see, this is not true. Using my method our cd won't have winnt32 or winnt. When you boot from cd, setupdd.sys is run (text mode setup). After rebooting into GUI mode, syssetup.dll is run under the setup.exe process.

You can only use this method to install from CD, since there is no winnt or winnt32. And like i said you can only do clean installs, not upgrades.


Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...