Jump to content

Forgotten Setup Secrets Revealed


Recommended Posts

Part 1: Not loading unnessary setup files during boot process

Question: Even after using programs to customize your unattended install, what is the most annoying part about setup?

Answer: Easy, text mode!

Despite advances in customizing windows xp setup, one part has remained elusive: the beginning. How frustrating is it to cut in half the time it takes to install windows, yet you still have to sit at the text mode screen that says, "loading windows setup, loading Adaptec SCSI controller,etc". That has always annoyed me. I've never owned anything Adaptec, so why do i have to wait as windows setup loads a bunch of SCSI drivers for Adaptec??? Booting from CD could take a couple minutes as you wait for setup to load it's drivers (I counted 80 in all).

In the past i have loosely described methods to try to reduce this wait time. Now i reveal for the first time how to reduce text mode setup's wait time by over 50%

How does text mode work when you boot from CD or run setup from a GUI and reboot?

When you boot from CD setupldr.bin starts the setup process. This is the "blue screen" you see booting from CD.

Setupldr.bin is hard coded to load core files such as the HAL, Kernel, Keyboard driver. It then loads setupreg.hiv, which is a registry hive file. The key part about the .hiv file is it has a mini copy of the CurrentControlSet, which loads all your drivers. This hive file is later merged with several .inf files to compose the initial registry (or in the case of an upgrade the registry is split and merged with the .inf files).

Setupldr.bin is then hard coded to load various sections from txtsetup.sif that have .load, such as:

[sCSI.Load]

[Display.Load]

[Hal.Load]

These sections specify what drivers to load during setup. Txtsetup.sif also specifies the name of the drivers, that you see at the bottom of the blue screen when you boot from CD. Such as:

[MouseDrivers.Load]

mouclass = mouclass.sys

mouhid = mouhid.sys

[MouseDrivers]

mouclass = "Mouse Class Driver"

mouhid = "HID Mouse Filter Driver"

In this case, setupldr.bin will load mouclass.sys and mouhid.sys and at the bottom of the screen you'll see "mouse class driver" and "hid mouse filter driver".

Like i mentioned, XP Setup loads 80 files (!) booting from cd, which takes a long time. And some files such as SCSI drivers you might never need. So the question becomes: Is there any easy way to tell setup not to load unwanted drivers that you don't need booting from the XP CD?

Tell setup not to load files

Looking through setupldr.bin, i saw "load" and "noload" mentioned twice. This got me thinking: If setupldr.bin looks for sections that have [xxx.load] in them to load files, maybe you can make a [xxx.noload] section so setup doesn't load those files. I wasn't that far off.

Looking at the txtsetup.sif for NT4 i found the following for [sCSI.Load]

;

; List of scsi miniport drivers we are to load and where

; they get copied to if installed. Note that the shortname

; must be the same as the service name in the driver load list.

;

; <shortname> = <miniport_filename>,<directory>

;

[sCSI.Load]

mkecr5xx = mkecr5xx.sys,4,noload

aic78xx = aic78xx.sys,4

mitsumi = mitsumi.sys,4,noload

Which implies you can tell setup not to load a file by adding ,,noload to a file.

Attached to this post is a copy of my txtsetup.sif for XP SP2 Pro. the only thing i changed in this file is i added noload. Search the file for noload and you'll see what i mean. Using this method i reduced the files XP Setup loads from 80 to 42. Reducing the load time by about 50%. No more waiting for drivers you don't need such as a Toshiba Floppy drive driver.

My custom txtsetup.sif stops setup from loading these drivers:

FAT support (i only use ntfs so what's the point of loading FAT?)

NO SCSI (i dont have any SCSI drivers)

No Toshiba floppy support (i dont have a toshiba)

NO Compaq support (i dont own a compaq so why would i want compaq drivers??)

However if you wanted to you could probably reduce the drivers down even more, maybe down to 20 (out of the original 80). My txtsetup.sif does NOT remove support for:

Floppy

Uniproccessors/multiprocessors/etc

Different HAL's

USB support

Intel support (i think virtual machines use intel so i left it even though i use AMD)

There is also a second way to speed things up even more...

Part 2: Expand needed files

By default XP setup will expand any files it needs on the fly into memory. The problem with this is when you are installing from CD this could be a big performance hit on setup, and it'll take up more memory. One way to avoid this performance hit is by expanding the files setup needs.

Steps:

1. Run i386\winnt32.exe /noreboot

2. Once done you'll have a folder called $WIN_NT$.~BT - this has the files used to boot/start setup

3. Any compressed files in this folder (ending in an understore, such as file.sy_) expand. Such as expand -r cdfs.sy_. Once every file is expanded copy them back into the i386 folder, and delete any compressed versions (such as cdfs.sy_). Now when you boot from CD setup will run the files directly from cd, instead of expanding them into memory.

Testing

I tested using a default install of XP SP2 Pro, using the txtsetup.sif attached. I made an ISO, burned to CDRW, then booted my computer from it and did a clean install on a new partition. I formated it NTFS - Quick. I had no problems during the install. Nothing was logged in setuperr.log. Installing from hard drive i only had a 2-3 second wait as setup loaded the 42 drivers i specified. Booting from cd it took about a minute to load the drivers but i didn't time it.

Conclusion

Using both methods will probably speed up booting from CD by over 50%. With further customizations it could be even greater. These methods combined with GUI setup customizations such as nlite will greatly speed up the booting process.

I have a feeling this method will become very popular simply because it's very easy to use and has no bugs. Since no files are removed from the CD, you don't need to worry about setup at a later point needing a file.

noload.zip

Link to comment
Share on other sites

  • 2 months later...

Thank you for your posting :) Currently having a look at all this. Very interesting. Haven't tested all this yet, but I have followed your posting in regards to the $WIN_NT$.~BT folder for a start. I was wondering though if I could do the same in regards to the $WIN_NT$.~LS folder; expanding the files and placing those in the I386 folder to speed up the installation process?

Link to comment
Share on other sites

Arie, do you have a link for the article regarding $WIN_NT$.~LS and $WIN_NT$.~BT? I'm currently trying to figure out how to preserve the i386 folder in the .~LS folder so it can function as a local installation source... Having 2 i386 folders is not that efficient!

Thanks for the info Gosh! Very interesting

Link to comment
Share on other sites

someone has made an addon that does all of this link

Thank you for the link, but I don't want to use any scripts others have written when I can do the same myself fine as well ;) I only use HFSLIP and RogueSpear's Microsoft .NET Framework packages, everything else is done by myself and I would like to keep it that way ;)

Link to comment
Share on other sites

Arie, do you have a link for the article regarding $WIN_NT$.~LS and $WIN_NT$.~BT?

I honestly have no idea what you're on about in regards to "the article"?! See the top post in this thread in regards to the $WIN_NT$.~BT folder. As for expanding the files in $WIN_NT$.~LS and adding those to my installation source, this is something which I'm figuring out myself. I hope though that "gosh" can answer my questions as it will save me the work of testing; there is no need to reinvent the wheel of course ;)

Link to comment
Share on other sites

someone has made an addon that does all of this link

Thank you for the link, but I don't want to use any scripts others have written when I can do the same myself fine as well ;) I only use HFSLIP and RogueSpear's Microsoft .NET Framework packages, everything else is done by myself and I would like to keep it that way ;)

well i didnt specifically post the link for you. i posted it for whoever might read the topic and want to try to implement this, but lacks the skill with how to do it.

Link to comment
Share on other sites

Arie:

You could expand the i386 folder for faster processing, but some files such as the .cab files need to be compressed. I tried it once and got too many errors and gave up.

cclo: thanks for that link.

It's good that people are willing to look at new ways to do old things.

-gosh

Link to comment
Share on other sites

I'll give it a try and see what I come up with. If I get it properly working, I'll write a simple batch to automate it and I'll upload it for all. But first I need to get my SP2.CAB missing error solved which I get with HFSLIP ;(

Link to comment
Share on other sites

Seeing as how I am always that .01%, I will not be telling my setup to skip loading anything. However, since my installation is already about 850MB, I might as well expand a bunch of stuff so I will not waste the majority of a DVD.

Link to comment
Share on other sites

Hi there, i have read this, and decided to make a little utility that can do all that stuff on the txtsetup file.

its the first release, so check it out and let me know.

it needs work on the gui, but the main fucntion works great.

takes out the hassle of searching and replacing stuff.

text setup modifier 1.0

let me know.

damian666

Link to comment
Share on other sites

Hi there, i have read this, and decided to make a little utility that can do all that stuff on the txtsetup file.

its the first release, so check it out and let me know.

it needs work on the gui, but the main fucntion works great.

takes out the hassle of searching and replacing stuff.

text setup modifier 1.0

let me know.

damian666

It's interesting, thanks. :)

But it just makes a few mods.

I am no programmer, and I have NO idea whether the following is possible or not, or whether it would be excessively difficult to do the same in a "portable", possiblu running from PE too,program, but I can maybe describe how ideally an all purpose program like this should work, based on a spreadsheet based one (yeah, I know, but still MUCH better than the 60 Mb of .Net stuff and libraries that need to be installed to run a "Hello, world" program).

Basically I read the entire content of TXTSETUP.SIF, order it along a more "logical" order (at least to me) of sections than the original one, then add a structured category "tag" for each entry depending on the section it is and its contents and a "flag" to disable (by adding a ";" at the beginning) then I check or uncheck either "catgories" or "items" tags and export as .txt the second sheet in the spreadsheet containing formulas that extract the data from first one.

I have tried this approach on a (VERY limited project) minimizing Recovery Console:

http://www.911cd.net/forums//index.php?sho...20983&st=18

and this (small scale) approach is rather handy and does speed up testing considerably.

Maybe if the same or similar approach is used in a "real" program, it could be very useful on larger things like a "full" install, PE builfing or whatever, even .ini files that use this

[Section]
Item=value

:unsure:

I dream about something that looks more like a filesystem (as seen in Explorer "Explore") or as the Registry (as seen in Regedit.exe) with structured tickboxes near "directories" ([sections]) and "files" (Items)... possibly such an app already exist and I never happened to find it...:blink:

jaclaz

Link to comment
Share on other sites

hi man, thanx for the heads up.

i am only making this for the first time, so expect a lot of changes and stuff.

i also want to make it a lot more usefull, more entries and stuff...

and about that gui thingy, could you make a mockup for me to show what you mean?

then i can see if i can make it ok?

see you later dude

damian666

edit: btw there is a bug in the last option, to rename the multiboot entry, it doesnt include "" which makes it error out.

will fix next version.

Edited by damian666
Link to comment
Share on other sites

I can do better than that, get this Shareware program (one month Trial) which I just found:

INI EDITOR 2001

http://phristov.4mg.com/inieditor.html

Download and screenshot:

http://www.winsite.com/bin/Info?19000000036985

Direct download :

ftp://ftp.monash.edu.au/pub/winxp/sysutil/INIED2K1.ZIP

And use it to open a (expanded) TXTSETUP.SIF (NOT a compressed TXTSTETUP.SI_) and you'll get what I mean.

If we could have a similar tool that "understands" lines prefixed by ";" and represents them as

"greyed out", plus something like a "related items" window, conceived in such a way that when you select a "key value" it parses its contents and shows other occurrencies of the same "key name" and "key value", we would have, as I see it, the perfect tool to tweak besides .ini, also .inf and .sif files.

Also a "duplicate sections" merger would be needed, since I have found that some sections ARE duplicated:

W:\OFS\TOOLS\wimb>find /n "[SourceDisksFiles]" txtsetup.sif

---------- TXTSETUP.SIF
[189][SourceDisksFiles]
[10817][SourceDisksFiles]
[10849][SourceDisksFiles]
[10890][SourceDisksFiles]
[16251][SourceDisksFiles]

jaclaz

Link to comment
Share on other sites

thanx man, i will take a look, it can be easely done, what you want with the ";".

thats easy.

i use autoit btw

just that you know, so if it finds a ";" it will grey out the option?

and it will use the noload thingy from gosh to set them?

or is that only for sif files.

we can let the program determine the type of file and then open the right tools for it sort of speak.

what you think?

damian666

btw, can you post me a txtsetupfile.sif here?

i dont have one on me...

Edited by damian666
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...