Automatic installation of drivers/agent in Windows XP



Hey,

Lately I've been looking at installing automatically the virtio and qxl
drivers as well as the spice vdagent as part of unattended windows
installations. This would make the out of the box experience much better

So far I've had success with winxp (haven't looked at win7 yet), here is a
summary of how I've done it so that we can start discussing how to
integrate this best in gnome-boxes/libosinfo.

What I've come up with is
- use of the viostor driver during Windows installation (this is done
  through a txtsetup.oem file)
- execution of an arbitrary .exe when the installed WinXP first starts
  (this is done through the addition of a [GuiRunOnce] category in the
   winnt.sif file)

The latter can be used to run an installer for the various drivers/agents
we will need in the OS.

The way I see things working for gnome-boxes is that:
- it copies the viostor driver and a txtsetup.oem file to the unattended
  floppy
- (optional) adding DriverSigningPolicy=Ignore may be needed if we use
  drivers whose signature Windows doesn't like
- either it copies a post-install driver installer to the floppy, or it uses an iso
  image with the post-install driver installer
- it adds what is needod to the winnt.sif file to run this installer

The reason I'm considering using  an iso image to store the installer is
that 1.44MB is very small, especially since recent virtio-win drivers ship
a dll which is already about this size.


The next step is figuring out what does what. I think it will be up to
boxes to get the viostor drivers and the driver installer iso. Since just
copying the viostor drivers to the floppy disk (assuming txtsetup.oem is
shipped with them), I don't think libosinfo needs to be involved there.
For running the installer after the install is done, adding a
_set_post_inst_command or _set_first_run_command would probably make sense
in libosinfo. It would be up to gnome-boxes to know the command is
"E:\myinstaller.exe".

Finally, one last thing to solve once all of this is in place is how to
distribute these drivers/installers so that gnome-boxes can easily get
them.

Any thoughts?

You'll find attached to this email the winnt.sif and txtsetup.oem files I
used for my tests. I used the virtio-win drivers from
http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/
The txtsetup.oem needs a bit of cleanup, the vioserial bits should be
removed.

Christophe

;SetupMgrTag
[Data]
    AutoPartition=1
    MsDosInitiated="0"
    UnattendedInstall="Yes"

[Unattended]
    UnattendMode=FullUnattended
    OemSkipEula=Yes
    OemPreinstall=No
    ;OemFilesPath = A:\$OEM$
    TargetPath=\WINDOWS
    Repartition=Yes
    WaitForReboot="No"
    UnattendSwitch="Yes"
    DriverSigningPolicy=Ignore

[GuiUnattended]
    AdminPassword=*
    EncryptedAdminPassword=NO
    AutoLogon=Yes
    AutoLogonCount=1
    OEMSkipRegional=1
    TimeZone=35
    OemSkipWelcome=1

[GuiRunOnce]
A:\spicedrv.exe

[UserData]
    ProductKey=
    FullName="teuf"
    OrgName=""
    ComputerName=BOXES_HOSTNAME

[LicenseFilePrintData]
    AutoMode=PerServer
    AutoUsers=5

[Identification]
    JoinWorkgroup=WORKGROUP

[Networking]
    InstallDefaultComponents=Yes

[SetupParams]
    UserExecute = "sc config TlntSvr start= auto"

[WindowsFirewall]
    Profiles = WindowsFirewall.TurnOffFirewall

[WindowsFirewall.TurnOffFirewall]
    Mode = 0
[Disks]
disk1 = "VirtIO Drivers Disk 1",\vioser.sys

[Defaults]
SCSI = viostor

[SCSI]
vioser = "VirtIO Serial Controller"
viostor = "VirtIO Disk Controller"

[Files.SCSI.viostor]
driver = disk1,viostor.sys,VIOSTOR
inf = disk1,viostor.inf
catalog = disk1,viostor.cat

[Files.SCSI.vioser]
driver = disk1,vioser.sys,VIOSERIAL
inf = disk1,vioser.inf
catalog = disk1,vioser.cat

[HardwareIds.scsi.viostor]
id = "PCI\VEN_1AF4&DEV_1001&SUBSYS_00000000","viostor"
id = "PCI\VEN_1AF4&DEV_1001&SUBSYS_00020000","viostor"
id = "PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4","viostor"

[HardwareIds.scsi.vioser]
id = "PCI\VEN_1AF4&DEV_1003&SUBSYS_00031AF4","vioser"

Attachment: pgps0tSese55B.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]