TechSpot

Sequential checkdisk of the non-boot partitions

By Sebastian42
Oct 25, 2010
Post New Reply
  1. I have a small 'boot' partition on a large hard drive and several large 'data' partitions. I would like to set the checkdisk of each 'data' partition in turn, to automatically start on the next partition when the checkdisk of the 'previous' partition has finished. I have not been able to use Scheduled Tasks for this as it returns the error of 'Can not start' - I suspect because I did not just ask for 'checkdisk', but for 'checkdisk D'. How to fix this ?
     
  2. Macboatmaster

    Macboatmaster TS Member Posts: 75

    BEST ADVICE - DO NOT DO IT.
    There is absolutely no reason to schedule a chkdsk.
    Unless you have disabled autochk chkdsk will run automaticallyon boot if it needs to.
    The cmd chkdsk on its own of course is only a scan. It will not fix anything and should not be used generally as it can produce false and spurious results.
    chkdsk cannot run if the volume is in use, unless a dismount of an NTFS volume is forced., that is why chkdsk instructed on a cmd or b y graphical interface on My Computer, right click, Properties, tools, error checking etc, will ask if you wish to reschedule for next restart.
    RUNNING chkdsk especially on chkdsk /r on a five pass check is hard work on the HDD and repeated use will ensure ealy failure.

    HOWEVER it is your computer and if you wish to do it Here is HOW.
    I repeat - DO NOT things such as this are known as MUNG - mess until no good.

    See this.
    Why not schedule chkdsk to run while you sleep ?
    Note : To schedule a Windows XP chkdsk task with task scheduler you need a Windows administrator account with a non-blank password.

    ■In Explorer, navigate to c:\program files
    ■If you see a message that this is a folder with hidden files, just click the link to show the files
    ■Right-click an empty area in the right part of the Explorer window and select new -> text document
    ■Windows creates a file named New Text Document.txt
    ■Rename the file to "Restart and perform chkdsk.bat" (without the quotes)
    ■Windows warns about changing the filename extension : click yes
    ■Right-click your newly created file and select "edit"
    ■Windows opens the new blank file in your default text editor : type the following lines and make sure not to press the enter key after the last line

    You could also give this a try...

    Create a file...C:\Y.TXT that contains: Y
    Create a file...C:\CHKBOOT.BAT that contains...
    chkdsk C: /F <c:\y.txt or chkdsk C: /F /R <c:\y.txt
    exit
    To add additional drives (partitions), just add the corresponding lines. You could probably also do this with one file as follows...
    echo y | chkdsk Drive: /F
    exit

    ■Save the file and close your text editor
    ■Close all other programs except the Eplorer window where the newly created file is listed
    ■Double-click the new file and see what happens (don't touch anything from this point on until your computer is ready with chkdsk
    Now that you know that your batch file is working it's time to automatically schedule it.

    ■Click start -> All Programs -> Accessories -> System Tools -> Scheduled Tasks
    ■In the Scheduled Tasks window, double-click "Add Scheduled Task"
    ■Click next
    ■Click browse
    ■Navigate to the Restart and perform chkdsk.bat file that you created in the previous step and click "open"
    ■Choose the frequency for this task (monthly would be a good minimum)
    ■Enter the day and time to perform the task
    ■Enter the (administrator) username and non-blank password (must be non-blank or the task won't run). Be careful to enter the password correctly because Windows doesn't verify it here.
    ■Click next and then click finish
    Your full-automatic Windows XP chkdsk task is now ready !
     
  3. Sebastian42

    Sebastian42 TS Member Topic Starter Posts: 26

    <<a five pass check>> - does that refer to the 5 (maximum) phases that a running checkdisk 'mentions' ?

    <<chkdsk will run automatically on boot if it needs to.>>
    It is a VERY lengthy process, so I don't want it happening unless at a time of my choosing.

    It has been my experience that a checkdisk CAN fix all kinds of strange problems, even make a disk bootable again. I have found that I can install some programs on fresh installs of WinXP, but NOT on the system that I have been using and modifying for years. I thought that a checkdisk MIGHT remedy that.

    My setup is quite complex, so I won't confuse the issue (unless you find it necessary) by explaining why I have several partitions on my hard drive that I want checkdisked, though I am NOT concerned about checkdisking the boot partition.

    Thank you for the detailed 'suggestions'. I'll report back when I have tried them.
     
  4. Macboatmaster

    Macboatmaster TS Member Posts: 75

    On this link is all the information you would ever need for chkdsk.
    If ever you want info on Microsoft check the knowledge base.

    http://technet.microsoft.com/en-us/library/bb457122.aspx

    Here are details of the five passes.

    Phase 1: Checking files
    During its first pass, Chkdsk examines each file record segment in the volume's master file table (MFT) and examines it for internal consistency. At the end of this phase, Chkdsk has identified the space that is in use and the space that is available, both within the MFT and on the volume as a whole.
    Phase 2: Checking indexes (directories)
    During this pass, Chkdsk examines each directory that is on the volume, checking for internal consistency and verifying that every file and directory that is represented by a file record segment in the MFT is referenced by at least one directory. Chkdsk confirms that every file or subdirectory that is referenced in a directory actually exists as a valid file record segment in the MFT and also checks for circular directory references. Finally, Chkdsk confirms that the time stamps and file size information for the files are up-to-date in the directory listings for those files.

    Phase 3: Checking security descriptors
    During this phase, Chkdsk examines each security descriptor that is associated with files or directories on the volume. Security descriptors contain information about ownership of a file or directory, about NTFS permissions for the file or directory, and about auditing for the file or directory.

    Phases 4 and 5: Checking sectors (optional)
    If the /R switch is in effect, Chkdsk runs two more passes to look for bad sectors. During stage 4, Chkdsk verifies all clusters in use; during stage 5, Chkdsk verifies unused clusters. Note that this process can be quite lengthy. taking many hours.

    I am sure your setup is complex.
    You have however I think missed the point. Chkdsk will not run automatically unless the system deems it necessary, for instance - a forced power off. Shuting down when updates are being installed.
    etc.
    The point I was making was - WHY would anyone want to schedule a chkdsk. I just run it when needed.and thankfully that is very infrequently.

    If you really decide to GO with it.
    http://www.windows-help-central.com/windows-xp-chkdsk.html
     
  5. Sebastian42

    Sebastian42 TS Member Topic Starter Posts: 26

    <<WHY would anyone want to schedule a chkdsk.>>
    Given 1. that I can not install a certain program in my O/S as it is, but that I CAN in a fresh WinXP/SP3 install, and 2. That I have found a checkdisk can fix suprisingly much and 3. that I keep the last 7 versions of my continually-being-enhanced O/S in 7 partitions on a large drive (so that I can back track as much as 7 steps to overcome new problems), I want to checkdisk ALL 7 of them to see if that certain program can be installed after the checkdisk. . I figured that scheduling checkdisk to start on the next partition after the first is finished, might be a simpler way than individually setting the checkdisk 7 times.
    F.Y.I. I do not boot any of the 7 partitions, but clone the latest to a harddrive, which I then boot and enhance and clone back to the next partition.
     
  6. Macboatmaster

    Macboatmaster TS Member Posts: 75

    My recommendation is to explore more fully as to why the program will not install.
    Anti-virus, pop-up blocker, Firewall, Administrative rights, etc.
    Other then that, I can help no further.
     
  7. Sebastian42

    Sebastian42 TS Member Topic Starter Posts: 26

    Your suggestion contains fertile grounds for speculation, but no definite instructions for solving my problem. I have asked the vendors of the program for advice as to why it might not install in my CONTINUING O/S - and have given them the text of the error messages. In the absence of clues as to the cause of failure, I thought I would try what has previously turned out to be an amazingly versatile remedy for unexplained problems - a checkdisk. Another THANK YOU, until I get a chance to try your scheduling method.
     
  8. Macboatmaster

    Macboatmaster TS Member Posts: 75

    I hope you solve it.
    The simple answer to the program installation - rather than to what I thought was a question regarding how to schedule chkdsk is to simply run chkdsk..
    If you are right the program will install.
    If you are wrong it will NOT install.
    I have no further commment to make.

    Best wishes for a sucessful conclusion
     
  9. Sebastian42

    Sebastian42 TS Member Topic Starter Posts: 26

    I am flumoxed that the post to which that below is a reply, does not appear above here, so I will add it from the email I received from MacBoatMaster : "Only a genius could provide a positive solution without knowing
    1. What the program is
    2. What error message is received when trying to download if it is a download or install.
    3. Is it a CD/DVD - is it damaged in some way, just a surface scratch can cause it.
    Best wishes for a successful conclusion."

    I am happy to provide the details you describe as missing; but my experience with forums make me feel at risk of being chided about changing the thread. THIS thread was about getting a way to schedule the sequential checkdisk of multiple partitions on one large drive.

    Having stated my disclaimer, I can say that Dragon Naturally Speaking version 10 WILL install without argument in a fresh WinXP/SP3 system, but NOT in the one I have been enhancing for years. In both instances the same installation CD is used in the same optical drive of the same PC (with a different HDD). The error messages : "1152: Error extracting C:\Documents and Settings\Myname\Local Settings\Temp\{7-C++ 8.0 Runtime for Dragon NaturallySpeaking.prq to the temporary location." Despite that, the Install Shield starts and the next error message is from Windows Installer : "Error opening installation log file. Verify that the specified log file location exists and is writable." I can make NO progress after that.

    I have since found that there is a problem with \Temp\ in the path specified above, and have found that dealing with that allows Dragon to install.
     
  10. Sebastian42

    Sebastian42 TS Member Topic Starter Posts: 26

    Macboatmaster
    I've had a chance to dabble with your recipe. Now It's clear to me why you are perplexed about my request for scheduling. There is a misunderstanding. What I mean by scheduling is for the PC to checkdisk one partition after another. I do NOT need the BEGINNING OF THAT scheduled. Secondly - I do NOT want the boot partition checkdisked [I KNOW that would require a (unwanted) restart]. I am happy to start the process and let it go till all the partitions have been checkdisk - preferably all 5 phases. What I want to avoid, is to have to 'manually' ask for a checkdisk of the next partition.

    I have written what I thought you instructed me to put into the batchfile, but when I double clicked on it, it simply opened in the editor.

    I would like to pursue this - if YOU have the perseverence for it.
     
  11. Sebastian42

    Sebastian42 TS Member Topic Starter Posts: 26

    It turned out that a batch file with the following content did EXACTLY what I wanted :
    chkdsk D: /F /R
    chkdsk E: /F /R
    chkdsk F: /F /R
    chkdsk G: /F /R
    chkdsk H: /F /R
    chkdsk I: /F /R
    chkdsk J: /F /R

    Thank you for leading me to this solution.

    I would mark this thread as SOLVED, if I knew where/how.
     

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...