• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net

How to Run Chkdsk in Ubuntu

GoMummy-GM

New Member
Chkdsk is the Windows command for checking hard drives for errors and repairing them, if possible. If your company uses the Ubuntu Linux operating system rather than Windows, the chkdsk command will not work. The equivalent command for the Linux operating system is "fsck." You can only run this command on disks and filesystems that are not mounted (available for use). If you want to check a root filesystem (the filesystem that contains the base operating system commands), you should boot to a live Ubuntu CD.




1.
Right-click on the desktop and choose the "Open in Terminal" option from the menu that appears. A terminal window opens.
2.
Type the following command to unmount the drive you want to check:

sudo umount /dev/sdb

Replace "/dev/sdb" with the device name for the drive you want to check.


3.
Type the following command to check the drive:

sudo fsck /dev/sdb

The command may take some time to complete, depending on the size of your drive. When the process is finished, a number will be displayed. A "0" indicates that no errors were found; a "1" means that errors were found and corrected; "2" means that the system should be rebooted; and a "4" indicates that file system errors were found but could not be corrected. Any other number indicates that the utility did not run correctly.
4.
Run the "fsck" command a second time if any number other than zero appears. This ensures that all errors were corrected.
5.
Reboot the system or type the command "sudo mount /dev/sdb" to remount the drive.
 
Top