MSFN Forum: Forgotten Setup Secrets Revealed - MSFN Forum

Jump to content


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Forgotten Setup Secrets Revealed Rate Topic: -----

#1 User is offline   gosh 

  • gosh 2.0
  • Group: Patrons
  • Posts: 2,347
  • Joined: 03-October 03
  • OS:none specified
  • Country: Country Flag

Posted 06 November 2007 - 10:15 AM

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.

Attached File(s)




#2 User is offline   Arie 

  • One Man Army
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 27-August 07

Posted 31 January 2008 - 02:56 AM

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?

#3 User is offline   ccl0 

  • Member
  • PipPip
  • Group: Members
  • Posts: 243
  • Joined: 29-January 08

Posted 31 January 2008 - 03:59 PM

someone has made an addon that does all of this link

#4 User is offline   gn!uz 

  • Group: Members
  • Posts: 6
  • Joined: 12-March 07

Posted 01 February 2008 - 03:22 AM

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

#5 User is offline   Arie 

  • One Man Army
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 27-August 07

Posted 01 February 2008 - 03:39 AM

View Postccl0, on Jan 31 2008, 10:59 PM, said:

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 ;)

#6 User is offline   Arie 

  • One Man Army
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 27-August 07

Posted 01 February 2008 - 03:42 AM

View Postgn!uz, on Feb 1 2008, 10:22 AM, said:

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 ;)

#7 User is offline   ccl0 

  • Member
  • PipPip
  • Group: Members
  • Posts: 243
  • Joined: 29-January 08

Posted 01 February 2008 - 01:08 PM

View PostArie, on Feb 1 2008, 04:39 AM, said:

View Postccl0, on Jan 31 2008, 10:59 PM, said:

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.

#8 User is offline   gosh 

  • gosh 2.0
  • Group: Patrons
  • Posts: 2,347
  • Joined: 03-October 03
  • OS:none specified
  • Country: Country Flag

Posted 01 February 2008 - 06:08 PM

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

#9 User is offline   Arie 

  • One Man Army
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 27-August 07

Posted 02 February 2008 - 07:48 AM

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 ;(

#10 User is offline   merrell 

  • Group: Members
  • Posts: 3
  • Joined: 24-May 06

Posted 05 February 2008 - 09:13 PM

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.

#11 User is offline   damian666 

  • creator of the vistapack
  • Group: Developers
  • Posts: 677
  • Joined: 19-July 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 February 2008 - 04:02 AM

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

#12 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,576
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 08 February 2008 - 09:06 AM

View Postdamian666, on Feb 8 2008, 11:02 AM, said:

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

#13 User is offline   damian666 

  • creator of the vistapack
  • Group: Developers
  • Posts: 677
  • Joined: 19-July 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 February 2008 - 03:56 AM

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.

This post has been edited by damian666: 11 February 2008 - 04:44 AM


#14 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,576
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 11 February 2008 - 06:19 AM

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.c...?19000000036985


Direct download :
ftp://ftp.monash.edu...il/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

#15 User is offline   damian666 

  • creator of the vistapack
  • Group: Developers
  • Posts: 677
  • Joined: 19-July 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 February 2008 - 06:28 AM

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

This post has been edited by damian666: 11 February 2008 - 06:31 AM


#16 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,576
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 11 February 2008 - 02:23 PM

View Postdamian666, on Feb 11 2008, 01:28 PM, said:

btw, can you post me a txtsetupfile.sif here?
i dont have one on me...


Here you can find in the attachment a very small one (for RC):
http://www.911cd.net/forums//index.php?sho...20983&st=18

jaclaz

#17 User is offline   damian666 

  • creator of the vistapack
  • Group: Developers
  • Posts: 677
  • Joined: 19-July 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 13 February 2008 - 01:51 AM

ok man, thanx, i did try te program... i hate shareware!!!
but i did see your point, so tell me .
should i make it for .sif only? which will be easyer.
or a lot of files? like ini inf and stuff?
and, should i take the look of that program and go on from there or make one from scratch?
and some help would be great dude.
i never have wrestled with this stuff so...

damian666

#18 User is offline   kickarse 

  • the free techie
  • PipPip
  • Group: Members
  • Posts: 227
  • Joined: 26-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 13 February 2008 - 08:26 AM

Now if only I could adapt this setupldr.bin to change the hal on a syspreped machine!

#19 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,576
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 13 February 2008 - 11:23 AM

@damian666

Actually, .ini, .inf and .sif files present the same "basic" structure, i.e.:

[Section]
Item=value


with just a few minor changes, for example the linked to .ini viewer seems not to "like" items inside double quotes, but I guess that can be easily fixed, in other words, if it will work for .sif files then it will work also for .ini and .inf ones ;).


About helping you, I am afraid I am the latest person on this board with programming knowledge, exception made for a few small batches....

.... but I know AutoIt has a treeview feature, so it should be possible to write this thingie in AutoIt language.

jaclaz

#20 User is offline   damian666 

  • creator of the vistapack
  • Group: Developers
  • Posts: 677
  • Joined: 19-July 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 14 February 2008 - 02:30 AM

well, then i will just try some stuff man.
check back next week or so to see if i ave made a start ok?

see ya

damian666

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

21 User(s) are reading this topic
0 members, 21 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy