The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,685 other followers

Windows: force a CHKDSK of a non system disk at boot time

Posted by jpluimers on 2019/03/22

Just out of curiosity, I wanted to try run a CHKDSK at boot time of a non-system disk.

The trick appears to be to ensure something locks the drive. An easy way to do that is have a command prompt open inside a directory on that drive.

The below example show just that: a regular command prompt locking the E: drive and an administrative command prompt scheduling the check at boot time:

In text

Regular command prompt:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\jeroenp>e:

E:\>cd $RECYCLE.BIN

E:\$RECYCLE.BIN>

Administrative command prompt:

C:\WINDOWS\system32>chkdsk /R /F E:
The type of the file system is NTFS.

Chkdsk cannot run because the volume is in use by another
process.  Chkdsk may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N) n

Chkdsk cannot run because the volume is in use by another
process.  Would you like to schedule this volume to be
checked the next time the system restarts? (Y/N) y

This volume will be checked the next time the system restarts.

C:\WINDOWS\system32>

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: