• 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.
gosh

Unattended Secret: Reducing Size Of Source

391 posts in this topic

*************Note********************

Check my website (listed in my signature) first. My site has most of the information here, organised better. Refer to my website before asking any questions.

Please see http://gosh.msfnhosting.com/part1.htm

*************Note********************

One of the more annoying things about nt based setups is the time it takes copying files. You run setup, setup copies files. Setup reboots and copies more files. Setup reboots again and then starts installing. Despite all the changes windows has seen since nt4, it still uses this outdated method of installing. One of my best unattended secrets is to bypass most of this copying; saving time and disk space. I have only revealed this secret once, but never fully explained it.

Let's look at the i386 folder for XP Pro, with sp1 slipstreamed. The i386 folder is 478 megs. This folder has a lot of stuff you probably never need. It has code for migrations and upgrades. Code for other languages, uninstalling back to a previous os, code for running from dos mode, code for running in the gui. If you do a clean install, most of that code is never used or needed. Why not remove all the crap you don't need?

First, put in your xp cd or copy it to the hard drive. Then type winnt32.exe /noreboot. If you get any errors at this step, see Note1 at the bottom.

Once XP Setup comes up, go through the prompts, make sure you say you're doing a clean install (not upgrade). At the "Setup Options" screen, click on "Advanced Options", and make sure "copy all installation files from the CD" is checked. If it's grayed out - that's fine.

After setup finishes closes, on your c drive you will have 2 folders. These folders are hidden by default, so make sure you can see hidden files and folders in folder options:

C:\$WIN_NT$.~LS - rename this folder to install

C:\$WIN_NT$.~BT - rename this folder to BOOT (all capital letters)

Now copy the BOOT folder into the install folder. In the Install folder, delete the size.sif file. In the BOOT folder, delete winnt.sif and migrate.inf.

If you want the cd to say "press any key to boot from cd", put bootfix.bin into your BOOT folder.

If you want to do an unattended install, rename your unattend file to winnt.sif and put it in the BOOT folder.

Next, in the BOOT folder hex setupldr.bin. Replace the word i386 with BOOT (all capital letters), your hex editor should make 4 changes.

Next, in the c:\install folder we need to make the cd identification files. From your XP CD copy win51, win51IC, win51IP (and win51ip.sp1 and win51ic.sp1 if a slipstreamed cd) to c:\install. If it's a slipstreamed cd you also need spnotes.htm in the install folder.

Your c:\install folder should look like this:

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 xpboot.bin

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>          BOOT

Lastly we just need to make the boot sector. Download http://home.online.no/~msols/xpboot.bin and save it in the install folder. Hex edit it, and change i386 to BOOT.

Change from:

...h...G..........F.....F.............r..a..v.......].....$..................SETUPLDR.BINBOOTFIX.BINI386..........................................

To:

...h...G..........F.....F.............r..a..v.......].....$..................SETUPLDR.BINBOOTFIX.BINBOOT..........................................

Now build it. Using cdimage.exe type the following command:

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

You should have xpsp1.iso with a file size of 338 MB.

So as you see my method reduces the i386 folder from 478 megs to 338 megs. With that 150 megs you saved, you can add more software or other OS'. I have used this method to make a cd with xp pro, xp home, win2k pro, win2k serv, win2k adv server on 1 700 meg cd.

Another benefit of this method is XP installs a LOT faster. Awhile ago i was in a class where everyone made the same exact computer. At the end of the class we installed XP. With my computer next to another identical computer, i started installing xp with my unattended cd, and the other person used a regular cd. My CD was half way done installing when his computer was done with the file copy phase.

There is only 1 limitation to my method - you cannot do upgrades, ONLY clean installs. But then again, how many people use there unattended cd to do an upgrade?

-gosh

Note1: If you get an error such as "setup has been disabled", you will need to install the xp application toolkit. One situation you would get this error is if you are installing win2k on XP. Download the xp appcompat toolkit at http://www.microsoft.com/downloads/details...&DisplayLang=en. Install it, then go to start > programs > Microsoft Windows Application Toolkit > Compatibility Administrator Tool 3.0. Once opened, click on Applications > Windows 2000 > on right hand side right click on winnt32.exe and disable it.

Note2: If you don't feel like download the appcompat toolkit, simly rename windows\system32\ahui.exe to something else. When done, rename the file back.

Last Edited: april 1, 2004:

Added: Bootfix.bin fix

Added: made sure people were clicking on advanced options

Added: made sure people could see hidden files and folders

Added: Appcompat fix

And cleaned up some text

Added URL to site

Added alternative to disable appcompat

0

Share this post


Link to post
Share on other sites

hmmm great post here!!!

What do you mean you can`t do upgrades....like going from ME to XP?

Still you can patch it with windows apdate and all that...correct?

:)

0

Share this post


Link to post
Share on other sites

The first step is to do winnt32.exe /noreboot, then select new install. Therefore the files are only for a clean install. Other than that, it acts just like a regular install of xp. You can do windows updates, install printers, etc.

-gosh

0

Share this post


Link to post
Share on other sites
Thanks.

I`m looking for cdimage now.

Give me 10 mins after making this post and i will put cdimage, cdburn and dvdburn up from everyone.

EDIT: Download Ok here you go

0

Share this post


Link to post
Share on other sites

found it!! :)

Thanks Dave

EDIT: well i`ve launched teh setup and its says that my XP Key is invalid!

i`m lost, once more.

0

Share this post


Link to post
Share on other sites
found it!! :rolleyes:

Thanks Dave

EDIT: well i`ve launched teh setup and its says that my XP Key is invalid!

i`m lost, once more.

my placed the key on Screen for Some Reason? :)

0

Share this post


Link to post
Share on other sites

what do you mean? The key is exact! I`ve used over and over again today.

:)

0

Share this post


Link to post
Share on other sites

winnt32.exe /dudisable /noreboot /unattend:c:\winnt.sif

Just type that with the correct path to your unattend file to automate it.

-gosh

0

Share this post


Link to post
Share on other sites

in the bit where it ask for your cdkey my setup displayes my CD-Key instead of Please eneter you CD-Key must be the switch he used or something? :)

0

Share this post


Link to post
Share on other sites
Your c:\install folder should look like this:

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 xpboot.bin

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>          BOOT

For some reason my Slipstreamed XP CD only has WIN51IP.SP1, WIN51IP & WIN51 on it. Are the other two files critical to success??

0

Share this post


Link to post
Share on other sites

You only need the ic files if your cd has xp home edition i believe. I always include both the ip and ic files.

-gosh

0

Share this post


Link to post
Share on other sites

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

;

:boot

cls

print

print Press Enter to boot from CD...

getkey 5 esc

onkey esc boot 80

onkey entr goto start

; When no key found...

goto boot

:start

cls

print

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

print                 x)   More Options...

print                 q)   Quit to command prompt

print                 r)   Reboot

print                 Esc) Boot first harddisk

print

print Hit the key of choice:

:mainkey

; 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

;

:help

cls

print HELP

print ----

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

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

getkey

goto start

; EOF

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.

-gosh

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

Very interesting. Is it possible to know which files from language subdirectory is required for a particular language so I can copy only those files to my cd?

0

Share this post


Link to post
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.

-gosh

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

If you are using an unattended file there is NO WAY to access recovery console or repair xp. If you look at my 2nd post i describe how to get around this.

-gosh

0

Share this post


Link to post
Share on other sites

@gosh

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

thx

0

Share this post


Link to post
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.

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

  • Recently Browsing   0 members

    No registered users viewing this page.