Jump to content











Photo
- - - - -

Universal XP HDD images (IMG_XP.exe)


  • Please log in to reply
81 replies to this topic

#51 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 433 posts
  •  
    Thailand

Posted 10 October 2009 - 11:10 AM

When booting with full XP Intel RAMBOOT image on AMD64 machine, then frequently the Wizard New Hardware found appears,
which requires user interaction.

1. One way to prevent New Hardware Wizard is making the device not new.
If devices is already installed, it is not new hardware. Just like when you prevent RAM Disk installation message.
http://www.boot-land...?...ost&p=79761
After you install drivers in RAM Windows, you may save SYSTEM hive to image and manually copy driver files (.sys, .dll) to disk image. This can prevent New Hardware Wizard only in known machine.

2. When you insert new USB flash drive, there is no New Hardware Wizard appearing.
It seems if Windows already have driver that match new device installed and and the driver package have been signed by trusted publisher. It will install driver for new device automatically.

#52 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 10 October 2009 - 11:56 AM

2. When you insert new USB flash drive, there is no New Hardware Wizard appearing.
It seems if Windows already have driver that match new device installed and and the driver package have been signed by trusted publisher. It will install driver for new device automatically.

Yes, it would be interesting if we can use this mechanism for all devices.
But what are the required registry settings to treat any device in this way ?

#53 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 10 October 2009 - 12:18 PM

The mechanism is present on Windows XP Embedded (very similar to the poorman's way previously hinted):
http://www.msfn.org/...ard-t62224.html
but it seems like it is not working on "normal" XP (things may have changed with later SP's/hotfixes)

Something that may clear part of the questions:
http://technet.micro...y/bb490837.aspx

Note Some buses, such as Peripheral Component Interconnect (PCI) and universal serial bus (USB), take full advantage of Plug and Play. Older buses, such as Industry Standard Architecture (ISA), do not take full advantage of Plug and Play, and require more user interaction to ensure that devices are correctly installed


Some more things to read/explore:
http://support.micro...kb/938596/en-us
http://msdn.microsof...y/ms790308.aspx

:thumbsup:

jaclaz

#54 rawr

rawr

    Frequent Member

  • Advanced user
  • 162 posts

Posted 10 October 2009 - 01:50 PM

When booting with full XP Intel RAMBOOT image on AMD64 machine, then frequently the Wizard New Hardware found appears,
which requires user interaction.
....
Does anyone has a working solution ?


i think this is covered by registry entries jfx posed (iv not played with fira disk + universal setup so far ) ,
maby something (batch/reg/script) in this of use ..

http://www.jimsingh....vmware-esx.html

#55 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 11 October 2009 - 02:30 PM

1. One way to prevent New Hardware Wizard is making the device not new.
If devices is already installed, it is not new hardware. Just like when you prevent RAM Disk installation message.
http://www.boot-land...?...ost&p=79761
After you install drivers in RAM Windows, you may save SYSTEM hive to image and manually copy driver files (.sys, .dll) to disk image. This can prevent New Hardware Wizard only in known machine.

Thanks karyonix, this is the way to go. :thumbsup:

  • Boot with full XP FiraDisk RAMBOOT Image e.g. XPRT.img
  • Install Drivers with DriverForge
  • Run ERUNT.exe to collect Registry files SYSTEM SOFTWARE SECURITY and SAM
  • Reboot with XP Workstation
  • Mount XPRT.img with ImDisk
  • Upate in mounted XPRT \WINDOWS\system32\config the 4 registry files SYSTEM SOFTWARE SECURITY and SAM
  • Update in mounted XPRT \WINDOWS\system32\drivers and \WINDOWS\inf folders with driver files
  • UnMount XPRT.img
After doing the above procedure on several machines you have a portable (almost) Universal XP OS.
Take care to set intelppm Service to Manual with Start=3 for SYSTEM registry collected on Intel machine.

In this way you can gradually improve your XP registry of portable Universal XP to be more compatible with various computers. <_<


:frusty:

#56 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 11 October 2009 - 03:52 PM

In this way you can gradually improve your XP registry of portable Universal XP to be more compatible with various computers. :thumbsup:


...and gradually get very far from the idea of a portable XP, what you describe seems more like a set of pre-made exchangeable "blocks" (that need a pre-boot to be exchanged). :hypocrite:

Or am I getting it wrong? ;)

And the "update" (which is the part I don't understand :frusty:) means adding partial info to the Registry (and make at each step a bigger Registry)? :smart:

Till now I thought that the idea was to create a "neutral" XP capable of self-adapting to the machine on which it was booted.... <_<

:hypocrite:

jaclaz

#57 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 12 October 2009 - 08:15 AM

The full XP RAMBOOT Image is bootable on new machine, but some drivers can be missing.

The Info on New Hardware can be added to existing image in the way described above.

It is a learning process where the Image after some time is becoming Universal XP,
which will boot on a lot of machines very fast without the need to Install New Hardware.

Booting in about 1 min when Image loaded from HD
and about 3 min when loaded from USB-stick on computer having USB 2.0 boot speed.

The described learning process procedure is useful.
The increase in size of the registry files is limited and no problem.

:thumbsup:

#58 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 12 October 2009 - 08:44 AM

The described learning process procedure is useful.


Yes :thumbsup: , but NO :smart:, still it isn't. :hypocrite:

I mean,
  • when you start with the first "pseudo-universal" image, it knows nothing but the drivers for the system where it was originally built/installed.
  • when you get a new machine (that needs different drivers) you have to go through the "install new hardware" and the image "learns" with your method.
  • every new machine needing different drivers you have to loop to 2.
  • after several iterations you have a "learned" image
  • we don't know however if accumulating data will lead to conflicts at a given point or if the image with added data and drivers will at a certain point become "unpractical"

Every time the image "update" needs to be "freezed" by re-mounting the image and changing the Registry files.

Now the mechanism I would like (you know how I am an optimist at heart, and hoping costs nothing), would be that once "your" image has learnt about a given hardware, this info can be "shared", so that "my" image (or member xy's one ) can learn from it.

To this there are two approaches (as I see it):
  • creating a package with a "diff" Registry file and the needed drivers for each "new machine" (and share the package), then find a way to add this info selectively
  • finding a way to replicate what the new hardware does on a given machine and be able to do it while booting

...a man can dream....:hypocrite:

:hypocrite:

jaclaz

#59 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 12 October 2009 - 09:50 AM

Life is tough, but this may help to make things easier ....

After booting with full XP RAMBOOT Image you can Install ImDisk,
which is interesting as a means to direct update the RAMBOOT Image from which you just booted.
Then TotalCommander can be used with Asymmetric Synchronizing of directories to Update your RAMBOOT Image file.

The procedure is then as follows:

  • Boot with full XP FiraDisk RAMBOOT Image e.g. XPRT.img
  • Install Imdisk if not done already
  • Install Drivers with DriverForge
  • Take care on Intel machine to set intelppm Service to Manual using regedit
    In registry key HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\intelppm make value Start = 3
  • Run ERUNT.exe to collect Registry files SYSTEM SOFTWARE SECURITY and SAM
  • Mount XPRT.img with ImDisk using R-mouse menu
  • Upate in mounted XPRT \WINDOWS\system32\config the 4 registry files SYSTEM SOFTWARE SECURITY and SAM from C:\WINDOWS\ERDNT folder
  • Update in mounted XPRT \WINDOWS\system32\drivers and \WINDOWS\inf folders with driver files
    using portable TotalCommander and Asymmetric Synchronizing of directories excluding unwanted files like e.g. *.PNF
    Update also folders C:\WINDOWS\system32\CatRoot and C:\WINDOWS\system32\CatRoot2 and C:\WINDOWS\system32 and root files in C:\WINDOWS
  • Close TotalCommander and Open Windows Explorer to UnMount XPRT.img with R-mouse menu
Reboot with Updated full XP FiraDisk RAMBOOT Image works perfect without the need to update any drivers.
It is working now with the same FiraDisk RAMBOOT Image on 3 computers with quite different architecture:
Intel and AMD64 MultiProcessor Desktop and Pentium Dual-Core Laptop.

#60 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 12 October 2009 - 10:35 AM

Well, again, near :hypocrite:, but not really. :hypocrite:

Why using Total Commander (which is a Shareware/Commercial App)? :smart:

Since we use IMDISK, I guess we can use strarc as well:
http://www.ltr-data.se/opencode.html
http://www.ltr-data....iles/strarc.txt
http://www.ltr-data....iles/strarc.zip

...and probably someone could write a batch or an Auto-it script to completely automate the procedure.... :hypocrite: :thumbsup:

:smart:

jaclaz

#61 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 12 October 2009 - 02:12 PM

...and probably someone could write a batch or an Auto-it script to completely automate the procedure.... :lol: :lol:

Thanks jaclaz for the link to strarc
It can be very useful in further automating the RAMBOOT Image Update process .....

:lol:

#62 joakim

joakim

    Silver Member

  • Team Reboot
  • 758 posts
  • Location:Bergen
  •  
    Norway

Posted 17 October 2009 - 09:51 AM

About the usb vs non-usb bootable systems;

Is it correct that standard usb-bootable xp can also boot in non-usb environment, but not the other way around?


Joakim

#63 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 31 October 2009 - 03:27 PM

At the moment I am busy in writing GUI programs with AutoIt3 that can be used to Create and Update full XP FiraDisk RAMBOOT Image files.

In Updating the Image file with strarc (thanks jaclaz for mentioning this handy program) :cheers:
I have the problem that some files cannot be copied e.g. the 6 User Registry files of name NTUSER.DAT and UsrClass.dat.

In AutoIt3 I have not found an easy way for DriveLock that would allow me to copy also those files.

Has anyone AutoIt3 code that allows to do DriveLock and Copy the NTUSER.DAT and UsrClass.dat files ?

#64 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 433 posts
  •  
    Thailand

Posted 31 October 2009 - 03:39 PM

I have the problem that some files cannot be copied e.g. the 6 User Registry files of name NTUSER.DAT and UsrClass.dat.

You might have to look in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist to find their key name.
And use "reg save" command instead of copying hive files.

Is volume shadow copy service available in XP ?

#65 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 31 October 2009 - 03:44 PM

You might have to look in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist to find their key name.
And use "reg save" command instead of copying hive files.

Is volume shadow copy service available in XP ?

I can use ERUNT.exe to Copy the Registry Files, but I was looking for a way that would not block normal FileCopy.

I have no idea if and how I can use volume shadow copy service in XP.

#66 joakim

joakim

    Silver Member

  • Team Reboot
  • 758 posts
  • Location:Bergen
  •  
    Norway

Posted 31 October 2009 - 04:14 PM

Hmm. System priviliges does not work either. I remember pwdump7 had such functionality (could copy any file), but your antivir would not like that file very much. I believe shadow copies can do it, but is a little bit of an overkill for copying a handful of files.

Joakim

#67 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 433 posts
  •  
    Thailand

Posted 31 October 2009 - 04:23 PM

I think "dd" can save the whole drive to image file.
It would be better if we can boot directly from image and make small change.

#68 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 31 October 2009 - 05:13 PM

It would be better if we can boot directly from image and make small change.

After booting with full XP RAMBOOT Image and Updating Drivers with DriverForge,
I can run IMG_XP_Update.exe which mounts the XPRAM_1.img file with ImDisk,
and then Updates this file in 5 seconds with drivers using strarc.exe and the 4 HKLM Registry files in config using ERUNT.exe
It works very fast and convenient and after doing this on a few machines with different architecture you have Universal XP.

But now when you Install in XP running in RAMDISK some extra programs,
then I can do Total Update in about 1 min using strarc.exe comparing the drives,
but then the 6 files of NTUSER.DAT and UsrClass.dat are not updated,
and some files like C:\WINDOWS\SoftwareDistribution\DataStore\DataStore.edb and edb.log and tmp.edb are blocked for filecopy ....

Anyway it is working already quite well, e.g. installed programs are added to the Start Menu, and may be it is not such a problem.

Additionally I have made IMG_XP_Create.exe to Create full XP RAMBOOT Image file and IMG_XP_Restore.exe to Restore such file on a HDD Drive.

#69 maanu

maanu

    Gold Member

  • Advanced user
  • 1,125 posts
  •  
    Pakistan

Posted 31 October 2009 - 05:51 PM

Additionally I have made IMG_XP_Create.exe to Create full XP RAMBOOT Image file and IMG_XP_Restore.exe to Restore such file on a HDD Drive.


Great News . :cheers:

any chance in future for a tutorial and sharing your creation ?

#70 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 31 October 2009 - 06:01 PM

Great News . :cheers:

any chance in future for a tutorial and sharing your creation ?

Sure, I will share it soon, but I would like to make some improvements and do some more testing.

#71 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 31 October 2009 - 06:08 PM

@wimb

http://www.ltr-data....iles/strarc.txt

-r Backup loaded registry database of the running system.

Creates temporary snapshot files of loaded registry database files and
stores them in the backup archive. This is recommended when creating a
complete backup of the system drive on a running system. When the backup
archive is restored to a new drive, the backed up snapshots will be
extracted to the locations where Windows expects the registry database
files. See section 3.6 for more information.


3.6 How to backup a complete running Windows system.

Complete running Windows systems may be backed up in the ways described in the
3.4 section. Special care must however be taken when it comes to files that may
be open while the backup is running. This is always the case of the registry
database files in the %SystemRoot%\System32\config directory and the profile
directories of logged on users. This means that strarc cannot backup the
registry database files the way normal files are backed up while the system is
running.

With release 0.1.3 of strarc it is now possible to backup snapshots of the
registry database files using the -r switch to strarc.

The snapshot files are extracted from the registry keys of the running system
before the actual backup routine of strarc begins and will therefore be a
momentary copy of the contents of the registry when strarc starts. The snapshot
files are temporary files created with the same name as the loaded registry
files with the special extension '.$sards', "Stream Archiver Registry Database
Snapshot". When the backup routine later in the strarc backup run finds the
snapshot files they are stored in the backup archive with the name of the actual
loaded registry file, not the name of the temporary snapshot file. This way a
later restore of the backup archive will recreate the snapshots with the name
and path of registry database files Windows expects to find.

The temporary snapshot files with the special extension '.$sards' are deleted
automatically by the backup routine after they have been stored in the backup
archive. However, if the backup operation is cancelled before the snapshot files
are backed up or if a directory with some of the snapshots are not included in
the backup run, the snapshot files will be left on the disk. You can safely
delete them after a strarc backup operation is complete.


WHICH options are you using? :cheers:

jaclaz

#72 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 31 October 2009 - 06:19 PM

WHICH options are you using? :cheers:

I remember I did some experiments with strarc option -r to backup the registry, but was not happy with it.
I don't remember why (I think ERUNT was doing it much faster), so I will redo tests with this option,
as it might be useful for the Total Update including the User Registry.

At the moment I am using for driver Update as piece of AutoIt3 code:

RunWait&#40;@ComSpec & &#34; /c makebt\strarc.exe -cd&#58;C&#58;\WINDOWS\system32\drivers | makebt\strarc.exe -xl -s&#58;c -o&#58;n -d&#58;&#34; & $tmpdrive & &#34;\WINDOWS\system32\drivers&#34;, @ScriptDir, @SW_HIDE&#41;

RunWait&#40;@ComSpec & &#34; /c makebt\strarc.exe -e&#58;.PNF -cd&#58;C&#58;\WINDOWS\inf | makebt\strarc.exe -xl -s&#58;c -o&#58;n -d&#58;&#34; & $tmpdrive & &#34;\WINDOWS\inf&#34;, @ScriptDir, @SW_HIDE&#41;



RunWait&#40;@ComSpec & &#34; /c makebt\strarc.exe -e&#58;\ -i&#58;.exe,.dll -cd&#58;C&#58;\WINDOWS | makebt\strarc.exe -xl -s&#58;c -o&#58;n -d&#58;&#34; & $tmpdrive & &#34;\WINDOWS&#34;, @ScriptDir, @SW_HIDE&#41;



RunWait&#40;@ComSpec & &#34; /c makebt\strarc.exe -cd&#58;C&#58;\WINDOWS\system32\CatRoot | makebt\strarc.exe -xl -s&#58;c -o&#58;n -d&#58;&#34; & $tmpdrive & &#34;\WINDOWS\system32\CatRoot&#34;, @ScriptDir, @SW_HIDE&#41;

RunWait&#40;@ComSpec & &#34; /c makebt\strarc.exe -cd&#58;C&#58;\WINDOWS\system32\CatRoot2 | makebt\strarc.exe -xl -s&#58;c -o&#58;n -d&#58;&#34; & $tmpdrive & &#34;\WINDOWS\system32\CatRoot2&#34;, @ScriptDir, @SW_HIDE&#41;


and for Total update:
RunWait&#40;@ComSpec & &#34; /c makebt\strarc.exe -cd&#58;C&#58;\ | makebt\strarc.exe -xl -s&#58;c -o&#58;n -d&#58;&#34; & $tmpdrive & &#34;\&#34;, @ScriptDir, @SW_HIDE&#41;


and for Registry Update using the previously by ERUNT saved registry in folder SYSREG
FileCopy&#40;@WindowsDir & &#34;\ERDNT\SYSREG\SAM&#34;, $tmpdrive & &#34;\WINDOWS\system32\config\&#34;, 9&#41;

FileCopy&#40;@WindowsDir & &#34;\ERDNT\SYSREG\SECURITY&#34;, $tmpdrive & &#34;\WINDOWS\system32\config\&#34;, 9&#41;

FileCopy&#40;@WindowsDir & &#34;\ERDNT\SYSREG\software&#34;, $tmpdrive & &#34;\WINDOWS\system32\config\&#34;, 9&#41;

FileCopy&#40;@WindowsDir & &#34;\ERDNT\SYSREG\system&#34;, $tmpdrive & &#34;\WINDOWS\system32\config\&#34;, 9&#41;


#73 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 31 October 2009 - 07:49 PM

Semi-random ideas:
Hobocopy (uses VSS, but is .NET based :))
http://www.howtogeek...ked-in-windows/
http://sourceforge.n...wangdera/files/

Ask Olof if he can "connect" strarc to VSS. :cheers:

I'll see if I can find anything about using VSS on XP, after all Driveimage supposedly uses it.....

:cheers:

jaclaz

#74 wimb

wimb

    Gold Member

  • Developer
  • 1,872 posts
  •  
    Netherlands

Posted 02 November 2009 - 06:02 AM

I just found an easy way to copy the 6 files of NTUSER.DAT and UsrClass.dat from RAMDISK to Image File.
Let ERDNT.exe do the work by simply replacing temporarily in ERDNT.INF the destination drive from C:\ to $tmpdrive (the virtual drive of mounted Image)

HexReplace&#40;@WindowsDir & &#34;\ERDNT\SYSREG\ERDNT.INF&#34;, &#34;C&#58;\&#34;, $tmpdrive & &#34;\&#34;, 0, 16, 0&#41;



RunWait&#40;@ComSpec & &#34; /c &#34; & &#39;&#34;&#39; & @WindowsDir & &#34;\ERDNT\SYSREG\ERDNT.EXE&#34; & &#39;&#34;&#39; & &#34; silent sysreg curuser otherusers /mode&#58;nt&#34;, @ScriptDir, @SW_HIDE&#41;



HexReplace&#40;@WindowsDir & &#34;\ERDNT\SYSREG\ERDNT.INF&#34;, $tmpdrive & &#34;\&#34;, &#34;C&#58;\&#34;, 0, 16, 0&#41;

This works fast and is a simple solution.
Now all registry files will be updated in the full XP RAMBOOT Image file.

#75 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 02 November 2009 - 08:05 AM

:cheers:

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users