Jump to content

Superfast automated nLited XP installation from HDD for testing nLite


wht36

Recommended Posts

Preamble:

I tried to search for topics similar like this, and there are SO many posts related to hard drive XP installs that I gave up to see if there is an identical idea to this. So if an exact same thing has been done before, I apologise for wasting your valuable time.

Acknowledgements

wimb - http://www.msfn.org/board/index.php?showtopic=121446

many others: msfn, Microsoft, Horst, wiki, msdn, flatassembler, google...

So for whom this may be suitable?

- If you have XP installed and you want to test how an nLited xp distribution would work and you are sick of burning the distribution to CD everytime you decided to test a new nLite distribution.

So why use this method:

- Original XP source on harddrive is not altered in anyway, i.e. you can use nLite unlimited number of times without having to copy the original XP source from CD everytime

- nLited XP distribution is not deleted by XP setup afterwards

- Duplication is done using NTFS hardlinks, so files are not actually copied, so this method is extremely fast (<1min on my PC).

- The actual scripts are batch files, so they are very easy to edit and change to your liking

- Has its own commandline program (setfile.exe) so it is not dependent on other commandline programs (it should work even if you don't have fsutil)

- Accepts commandline parameters. Will also work without commandline parameters as long as xp source files are copied onto the "xp_cd" subfolder

Basic requirements:

- NTFS formatted primary drive

- Original XP CD source

- Rescue CD/USB/floppy ready in case things go bad

- Administrator privilege

- Files MUST be installed on the primary boot drive (because NTFS hardlinks cannot work across drives)

Warning:

- I have only used XP, so I can't give advice on doing this under vista or other OS

- As far as I can tell, McAfee and NOD32 finds everything to be clean, but one can never tell. Scan everything with your virus scanner. If you are not happy, don't use it.

- md5 sums:

aa412cfe01876c0f5dfd30e73d19ea86 *BOOTSECT.DAT

e384a447b57fec04f57fdec11049fa47 *nLitePrep.cmd

20b875bff6feac7f87ee1566bb17b911 *PrepXP.cmd

264ae29105d512aa3c58f88dc7d41a9a *setfile.exe

Usage:

- Extract boot.7z to C:. I have placed the files in C:\BOOT, so by default after extraction the files will be in a folder "boot", which should have the following files:

PrepXP.cmd

nLitePrep.cmd

setfile.exe

BOOTSECT.DAT

- Copy XP source from setup CD to a folder on C: (I use C:\BOOT\XP_CD)

- Run nLitePrep.cmd to duplicate "xp_cd" to a folder ("disk"). This folder ("disk") can then be altered by nLite without altering the original "xp_cd" folder. Note that if the destination folder ("disk") already exists before you run nLitePrep, nLitePrep will fail (if will NOT overwrite it, I think it is too risky); you MUST delete/move/rename that folder yourself if it already exists.

- Use PrepXP.cmd to duplicate nlited "disk" folder to XP setup folders (C:\$WIN_NT$.~LS, C:\$WIN_NT$.~BT)

- Reboot and select "Windows XP Setup" to run setup

Commandline options

nLitePrep

Usage: nLitePrep [XP_source] [nLite_source]
Example: nLitePrep xp_cd disk
Purpose: nLitePrep duplicates the XP setup CD files in XP_source to nLite_source
so that users can use nLite to alter nLite_source without altering XP_source

XP_source must exist and nLite_source must not exist for nLitePrep to work
XP_source and nLite_source must be on the same drive
Default XP_source is "xp_cd"
Default nLite_source is "disk"

PreXP

Purpose: PrepXP sets up XP for installation from NTFS Hard disk
Usage: PrepXP nLite_source
nLite_source is the path where nLited XP setup CD is copied on to
nLite_source needs to be in a folder on C:
so that PrepXP can hardlink the install files
(to prevent XP setup from deleting the actual install files)
Default XP_source is "disk"

You can use nlite to customise the installation files and

there is no need to create iso or burn to CD afterwards

I usually create a folder, e.g. "boot" and place PrepXP inside it

Then I put the setup files in a subfolder, e.g. "disk"

SetFile.exe

SetFile.exe provides support for editing of .SIF files and boot.ini, as well as making hardlinks, decompressing NTFS files, and setting file attributes, all of which are needed for setting up XP to install from HD.

SetFile.exe i IniFilePath [section] key="string"
key= remove key
key== clear key
= delete section

SetFile.exe l ExistingFile NewFileLink
New file must be in the same drive

SetFile.exe a [+/-attributes] File [NewJunctionFolder]
Attributes (+ or - to set or unset):
a (archive), c (compressed), d (directory), e (encrypted), h (hidden), i (indexed)
j (junction), n (normal), o (offline), r (readonly), s (system), t (temporary), v (volume)

If things go badly...

Okay, things shouldn't go badly. I think the batch file will not delete or overwrite stuff. The only files it may overwrite is the temporary windows xp setup folders on the harddrive, which can be deleted unless you have specific uses for them. It will also put an entry into c:\boot.ini so that you can run XP setup from hard disk. This entry will be removed by XP setup if XP setup is successful.

Probably the worst thing that could happen is that XP setup will not run. Well... if it doesn't work, then I apologise for wasting your time. Although, if it doesn't run, I suspect it will not run if your burn it on to the CD either, then in that case it is a good thing that you find out that it won't run. Just remember to delete C:\$WIN_NT$.~LS and C:\$WIN_NT$.~BT aftewards.

boot.7z

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