Checkdisk.sh
Click Here > https://urlca.com/2tvu7d
How to Use Checkdisk.sh to Scan and Fix Hard Drive Errors on Linux
Checkdisk.sh is a simple bash script that allows you to run the Check Disk utility (chkdsk) on Windows partitions from Linux. Chkdsk is a tool that scans the file system and file system metadata of a volume for logical and physical errors, and fixes them if possible. Chkdsk can also scan for bad sectors and mark them as unusable.
If you dual-boot Windows and Linux, or if you need to access a Windows partition from Linux, you may encounter situations where the Windows file system is corrupted or damaged. This can happen due to improper shutdowns, power failures, malware infections, or hardware failures. In such cases, you can use checkdisk.sh to run chkdsk on the Windows partition and repair it without booting into Windows.
How to Install Checkdisk.sh
Checkdisk.sh is a free and open-source script that you can download from GitHub. To install it, you need to have bash, ntfs-3g, and ntfsprogs installed on your Linux system. You can install them using your package manager, for example:
sudo apt install bash ntfs-3g ntfsprogs
Then, you can download and extract the checkdisk.sh script from GitHub:
wget https://github.com/linrunner/checkdisk.sh/archive/master.zip
unzip master.zip
cd checkdisk.sh-master
chmod +x checkdisk.sh
How to Use Checkdisk.sh
To use checkdisk.sh, you need to run it as root or with sudo privileges. You also need to specify the device name of the Windows partition that you want to scan and fix. For example, if your Windows partition is /dev/sda1, you can run:
sudo ./checkdisk.sh /dev/sda1
This will run chkdsk in read-only mode, which means it will only display the status of the volume and any errors that it finds, but it will not fix them. You will see something like this:
The type of the file system is NTFS.
Volume label is Windows.
WARNING! /dev/sda1 is mounted.
Checking file system on /dev/sda1
CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Index verification completed.
CHKDSK is verifying security descriptors (stage 3 of 3)...
Security descriptor verification completed.
CHKDSK discovered free space marked as allocated in the
master file table (MFT) bitmap.
Windows has made corrections to the file system.
No further action is required.
20971519 KB total disk space.
8388608 KB in 24 files.
16 KB in 25 indexes.
0 KB in bad sectors.
122880 KB in use by the system.
65536 KB occupied by the log file.
12526015 KB available on disk.
4096 bytes in each allocation unit.
5242879 total allocation units on disk.
3131503 allocation units available on disk.
If you want to fix the errors that chkdsk finds, you need to use the -f option, which stands for \"fix\". For example:
sudo ./checkdisk.sh -f /dev/sda1
This will run chkdsk in fix mode, which means it will attempt to repair any errors that it finds on the volume. You will see something like this:
The type of the file system is NTFS.
Volume label is Windows.
WARNING! /dev/sda1 is mounted.
Checking file system on /dev/sda1
CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Index verification completed.
CHKDSK is verifying security descriptors (stage 3 of 3 aa16f39245