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

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.