IPB

Google Frontpage Forums Unattended CD/DVD Guide
 Forum Rules Unattended CD/DVD Guide Homepage · MSFN Forum Rules
20 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Unattended Secret: Reducing Size Of Source
gosh
post Oct 8 2003, 09:22 PM
Post #1


gosh 2.0
Group Icon

Group: Patrons
Posts: 2208
Joined: 3-October 03
Member No.: 7679
OS: none
Country Flag


*************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:

QUOTE
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:

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


To:

QUOTE
...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
Go to the top of the page
 
+Quote Post
edg21
post Oct 8 2003, 09:38 PM
Post #2


Member
**

Group: Members
Posts: 196
Joined: 29-August 03
From: PDX, USA
Member No.: 6006



I'll have to give this a try... thanks smile.gif
Go to the top of the page
 
+Quote Post
The Saint
post Oct 8 2003, 09:38 PM
Post #3


Junior
*

Group: Members
Posts: 52
Joined: 6-October 03
Member No.: 7790



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?

blushing.gif
Go to the top of the page
 
+Quote Post
gosh
post Oct 8 2003, 10:08 PM
Post #4


gosh 2.0
Group Icon

Group: Patrons
Posts: 2208
Joined: 3-October 03
Member No.: 7679
OS: none
Country Flag


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
Go to the top of the page
 
+Quote Post
The Saint
post Oct 8 2003, 10:11 PM
Post #5


Junior
*

Group: Members
Posts: 52
Joined: 6-October 03
Member No.: 7790



Thanks.

I`m looking for cdimage now.
Go to the top of the page
 
+Quote Post
DaveXP
post Oct 8 2003, 10:19 PM
Post #6


The One
******

Group: Members
Posts: 1295
Joined: 15-July 03
From: England, Leicester
Member No.: 4982
Country Flag


QUOTE (The Saint @ Oct 9 2003, 05:11 AM)
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
Go to the top of the page
 
+Quote Post
The Saint
post Oct 8 2003, 10:20 PM
Post #7


Junior
*

Group: Members
Posts: 52
Joined: 6-October 03
Member No.: 7790



found it!! smile.gif

Thanks Dave

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

i`m lost, once more.
Go to the top of the page
 
+Quote Post
DaveXP
post Oct 8 2003, 10:29 PM
Post #8


The One
******

Group: Members
Posts: 1295
Joined: 15-July 03
From: England, Leicester
Member No.: 4982
Country Flag


QUOTE (The Saint @ Oct 9 2003, 05:20 AM)
found it!! smile.gif

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? huh.gif
Go to the top of the page
 
+Quote Post
The Saint
post Oct 8 2003, 10:32 PM
Post #9


Junior
*

Group: Members
Posts: 52
Joined: 6-October 03
Member No.: 7790



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

sad.gif
Go to the top of the page
 
+Quote Post
gosh
post Oct 8 2003, 10:34 PM
Post #10


gosh 2.0
Group Icon

Group: Patrons
Posts: 2208
Joined: 3-October 03
Member No.: 7679
OS: none
Country Flag


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

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

-gosh
Go to the top of the page
 
+Quote Post
DaveXP
post Oct 8 2003, 10:34 PM
Post #11


The One
******

Group: Members
Posts: 1295
Joined: 15-July 03
From: England, Leicester
Member No.: 4982
Country Flag


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? newwink.gif
Go to the top of the page
 
+Quote Post
The Saint
post Oct 8 2003, 10:37 PM
Post #12


Junior
*

Group: Members
Posts: 52
Joined: 6-October 03
Member No.: 7790



arghhhh,,


So what can i do? realmad.gif
Go to the top of the page
 
+Quote Post
DaveXP
post Oct 8 2003, 10:40 PM
Post #13


The One
******

Group: Members
Posts: 1295
Joined: 15-July 03
From: England, Leicester
Member No.: 4982
Country Flag


QUOTE (The Saint @ Oct 9 2003, 05:37 AM)
arghhhh,,


So what can i do?  realmad.gif

fix it realmad.gif ...lol
Go to the top of the page
 
+Quote Post
The Saint
post Oct 8 2003, 10:43 PM
Post #14


Junior
*

Group: Members
Posts: 52
Joined: 6-October 03
Member No.: 7790



no.gif
Go to the top of the page
 
+Quote Post
keenie
post Oct 8 2003, 11:42 PM
Post #15





Group: Members
Posts: 6
Joined: 20-September 03
Member No.: 7059



QUOTE (gosh @ Oct 8 2003, 09:22 PM)
Your c:\install folder should look like this:

QUOTE

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??
Go to the top of the page
 
+Quote Post
gosh
post Oct 8 2003, 11:54 PM
Post #16


gosh 2.0
Group Icon

Group: Patrons
Posts: 2208
Joined: 3-October 03
Member No.: 7679
OS: none
Country Flag


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
Go to the top of the page
 
+Quote Post
keenie
post Oct 9 2003, 12:12 AM
Post #17





Group: Members
Posts: 6
Joined: 20-September 03
Member No.: 7059



cool smile.gif
Go to the top of the page
 
+Quote Post
gosh
post Oct 9 2003, 12:47 AM
Post #18


gosh 2.0
Group Icon

Group: Patrons
Posts: 2208
Joined: 3-October 03
Member No.: 7679
OS: none
Country Flag


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

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

QUOTE
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:

QUOTE
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
Go to the top of the page
 
+Quote Post
996
post Oct 9 2003, 01:47 AM
Post #19


Member
**

Group: Members
Posts: 116
Joined: 19-September 03
Member No.: 6982



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.
Go to the top of the page
 
+Quote Post
amirali_esh
post Oct 9 2003, 01:54 AM
Post #20


Newbie


Group: Members
Posts: 27
Joined: 14-August 03
Member No.: 5750



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?
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

20 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 




Lo-Fi Version Time is now: 22nd November 2009 - 09:18 AM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2009 msfn.org
Privacy Policy