Registry writing during shutdown after CHKDSK

Hi All,
I have a volume filter driver. We need to write some data to the
boot/system volume during the chkdsk process running on the same boot/system
volume. The CHKDSK checks the boot/system volume for error correction only
during boot process. The CHKDSK process locks the boot/system volume while
checking and once it is done,it initiates the reboot without releasing the
lock.
As the boot/system volume is locked I cannot write to the volume so I
need log some data to the registry. As the only place where we get the
control before reboot is shutdown notification we try to write to registry
from the notification function. The data written during shutdown is not
flushed and thus lost after reboot.

Can anybody tell me answers to the following questions?

  1. Does CHKDSK unlocks the boot volume once it is done with checking and
    before the system shutsdown due to reboot initiated by CHKDSK? (Is there a
    time where I can write to the boot/system volume while CHKDSK is running
    during boot process?)

  2. If there is no error returned while writing to registry from the shutdown
    notification then why the data added is lost after the reboot?
    (Can we make the data added to registry during shutdown notification
    persistent?)

  3. If CHKDSK locks boot/system volume during boot checking can we unlock it
    and write to it before reboot?

Thanks,
Giri.

CHKDSK with /F or /R flags (making changes) - dismounts the target volume
in the end of its work.

This is usual CHKDSK. As about the AUTOCHK runned at boot as native app -
sorry, don’t remember the details, I think it reboots the machine on
completion.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“giri jangam” wrote in message news:xxxxx@ntdev…
> Hi All,
> I have a volume filter driver. We need to write some data to the
> boot/system volume during the chkdsk process running on the same boot/system
> volume. The CHKDSK checks the boot/system volume for error correction only
> during boot process. The CHKDSK process locks the boot/system volume while
> checking and once it is done,it initiates the reboot without releasing the
> lock.
> As the boot/system volume is locked I cannot write to the volume so I
> need log some data to the registry. As the only place where we get the
> control before reboot is shutdown notification we try to write to registry
> from the notification function. The data written during shutdown is not
> flushed and thus lost after reboot.
>
> Can anybody tell me answers to the following questions?
> 1. Does CHKDSK unlocks the boot volume once it is done with checking and
> before the system shutsdown due to reboot initiated by CHKDSK? (Is there a
> time where I can write to the boot/system volume while CHKDSK is running
> during boot process?)
>
> 2. If there is no error returned while writing to registry from the shutdown
> notification then why the data added is lost after the reboot?
> (Can we make the data added to registry during shutdown notification
> persistent?)
>
> 3. If CHKDSK locks boot/system volume during boot checking can we unlock it
> and write to it before reboot?
>
> Thanks,
> Giri.
>

Hi Maxim,
that is exactly the problem. Autochk reboots that machine without
unlocking volume. Due to that we are not able to write data to boot volume
and even the registry data is not getting flushed from shutdown notification
routine because of which i can’t log the error that data is lost and disable
our functionality.

Can you please suggest me any ways using which i can access the boot volume
before the reboot occurs ?
Or at least how I can make the data added to registry persistent?

Thanks,
Giri.

On 9/6/07, Maxim S. Shatskih wrote:
>
> CHKDSK with /F or /R flags (making changes) - dismounts the target
> volume
> in the end of its work.
>
> This is usual CHKDSK. As about the AUTOCHK runned at boot as native
> app -
> sorry, don’t remember the details, I think it reboots the machine on
> completion.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “giri jangam” wrote in message news:xxxxx@ntdev…
> > Hi All,
> > I have a volume filter driver. We need to write some data to the
> > boot/system volume during the chkdsk process running on the same
> boot/system
> > volume. The CHKDSK checks the boot/system volume for error correction
> only
> > during boot process. The CHKDSK process locks the boot/system volume
> while
> > checking and once it is done,it initiates the reboot without releasing
> the
> > lock.
> > As the boot/system volume is locked I cannot write to the volume so I
> > need log some data to the registry. As the only place where we get the
> > control before reboot is shutdown notification we try to write to
> registry
> > from the notification function. The data written during shutdown is not
> > flushed and thus lost after reboot.
> >
> > Can anybody tell me answers to the following questions?
> > 1. Does CHKDSK unlocks the boot volume once it is done with checking and
> > before the system shutsdown due to reboot initiated by CHKDSK? (Is there
> a
> > time where I can write to the boot/system volume while CHKDSK is running
> > during boot process?)
> >
> > 2. If there is no error returned while writing to registry from the
> shutdown
> > notification then why the data added is lost after the reboot?
> > (Can we make the data added to registry during shutdown notification
> > persistent?)
> >
> > 3. If CHKDSK locks boot/system volume during boot checking can we unlock
> it
> > and write to it before reboot?
> >
> > Thanks,
> > Giri.
> >
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>