Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

How to make sure driver install doesn't require restart

aditya_guptaaditya_gupta Member Posts: 3

Hi,
I have a driver for Serial Attached SCSI HBA, which sometimes asks for system restart upon installation on a default windows driver. The system asks for restart sometimes but not always, but when it does, I see a event logged in windows event viewer
" The start type of the service was changed from demand start to boot start".
I have mentioned start type in my INF as "SERVICE_BOOT_START". Is there a possibility that default windows driver (lsi_sas3i.sys) has start type mentioned as "SEVICE_DEMAND_START" and that is why windows is asking me to reboot the system?

Comments

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,583

    The start type of the service was changed from demand start to boot start

    Because.... the driver you're supporting contains the boot volume?? That's a guess/question.

    Is there a possibility that default windows driver (lsi_sas3i.sys) has start type mentioned as "SEVICE_DEMAND_START" and that is why windows is asking me to reboot the system?

    No. The start type of any OTHER driver in the systems doesn't affect the start type of YOUR driver.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,204

    Are you using the same service name as the default driver?

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • anton_bassovanton_bassov Member Posts: 5,092

    Peter,

    No. The start type of any OTHER driver in the systems doesn't affect the start type of YOUR driver.

    What about the situation when a driver X somehow depends on the driver Y? For example, consider the scenario when the driver Y is a driver library (like, for example, NDIS.SYS), and your driver X imports from it. In this case your driver cannot get loaded before the driver Y, right. How is the system going to handle the case if a driver X is, say, a boot driver, and some particular driver Y that it depends on is a demand-start one?

    Anton Bassov

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,583

    How is the system going to handle the case if a driver X is, say, a boot driver, and some particular driver Y that it depends on is a demand-start one?

    IIRC, the required dependency gets loaded automatically when the first referencing driver gets loaded. It is, after all, just a DLL.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • anton_bassovanton_bassov Member Posts: 5,092

    IIRC, the required dependency gets loaded automatically when the first referencing driver gets loaded. It is, after all, just a DLL.

    The problem is that certain functionalities that a demand-start driver library may depend upon may be still unavailable at the early stages of the boot process. To make it even worse, in some cases it may be impossible to know it at the time when a driver gets loaded, so that it may get discovered only at the runtime. For example, IIRC, only parts of the Registry are available to boot drivers, so that a demand-start driver
    library may not, probably, get all the info that it expects to find in the Registry if you try to initialise it at some earlier stage of the boot process.

    Certainly, we can logically conclude that the scenario of a boot-time driver being dependent on some demand-start driver library is
    a classical example of a faulty design. Therefore, my question can be rephrased simply as "will the system catch this inconsistency right at the installation time?" After all, the only thing that it has to do is to check driver dependencies and their load order during the installation process.

    Anton Bassov

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE