Yes, Clonezilla can fail or abort when it encounters bad sectors on a source disk, because it reads the disk at a low level and does not automatically skip unreadable areas. This article explains why the failure happens, how to work around it with Clonezilla’s own options or with other tools, and how to recover data from a failing drive before you clone it.
How Clonezilla Reads a Disk
Clonezilla is a disk-imaging and cloning tool that works by reading every block of the source disk sequentially, compressing the data, and writing it to an image file or directly to a target disk. It operates at the block level, meaning it does not care about the file system structure; it simply copies raw bytes. When the operating system reports a bad sector, Clonezilla’s read request fails, and the program usually stops with an error message such as “Read errorâ€� or “Input/output error.â€� The default behavior is to abort the entire operation rather than skip the unreadable area, because skipping could produce a corrupted image that might not boot or might lose data silently.
Why Bad Sectors Cause a Failure
Bad sectors are physical areas of a hard disk that can no longer reliably store data. They can be caused by manufacturing defects, physical damage, power surges, or normal wear over time. When a sector is bad, the drive’s firmware may mark it as reallocated, meaning it maps the sector to a spare area and continues working. However, if the sector has not yet been reallocated, or if the drive cannot read it even after retries, the operating system returns an error to the application. Clonezilla, like most imaging tools, does not automatically ignore these errors because doing so would risk producing an image that is missing data. The user must explicitly tell the tool to skip or ignore bad sectors, and even then the resulting image may be incomplete.
Clonezilla Options for Bad Sectors
Clonezilla does not have a built-in “skip bad sectors� checkbox in the beginner mode, but it does offer advanced options that can help. When you start Clonezilla, choose “Expert mode� instead of the default beginner mode. Then, when you reach the advanced parameter screen, you can add the -rescue option. This option tells Clonezilla to continue reading even if a read error occurs, and it will fill the unreadable parts with zeros or skip them, depending on the version. The exact behavior can vary, so it is important to test the resulting image. Another option is -fsck-src-part, which runs a file system check before cloning; this can sometimes mark bad sectors as bad so that the file system driver avoids them, but it does not fix physical damage.
Alternative Tools That Handle Bad Sectors
If Clonezilla continues to fail, other tools are specifically designed to handle failing drives. ddrescue (GNU ddrescue) is a command-line tool that reads a disk block by block and logs which parts are unreadable. It can retry read errors multiple times and can be run in multiple passes to recover as much data as possible. It is often the first recommendation for data recovery from a failing drive. dd with the conv=sync,noerror option will also skip errors and fill with zeros, but it is less sophisticated than ddrescue. On Windows, tools like HDDGURU or Macrium Reflect (free version) have options to ignore bad sectors, but they may not be as robust as ddrescue. The key is to create a raw image of the failing drive first, then clone from that image using Clonezilla or another tool. This two-step process is safer because it minimizes the time the failing drive is in use.
How to Clone a Drive with Bad Sectors (Step-by-Step)
- Connect the failing drive to a computer, preferably via a direct SATA connection, not USB, to reduce the chance of disconnection.
- Boot from a live Linux USB stick (like SystemRescue) that includes ddrescue.
- Identify the device name of the failing drive (e.g.,
/dev/sdb) usinglsblkorfdisk -l. - Create a raw image file on a healthy drive with enough space:
ddrescue /dev/sdb /mnt/backup/sdb.img /mnt/backup/sdb.log. The log file tracks progress and lets you resume if interrupted. - Run ddrescue again with
-r 3to retry bad sectors up to three times:ddrescue -r 3 /dev/sdb /mnt/backup/sdb.img /mnt/backup/sdb.log. - Once the image is created, you can mount it or use Clonezilla to restore it to a new healthy disk. In Clonezilla, choose “restore� and select the image file.
- After restoring, run a file system check (e.g.,
fsckon Linux orchkdskon Windows) to identify any files that were damaged.
Common Mistakes and Misconceptions
A common mistake is to think that Clonezilla can “fix� bad sectors. It cannot; it only copies data. Another misconception is that a bad sector always means the drive is dead. Often, a drive with a few bad sectors can still be used for non-critical data after the bad areas are marked, but it is not safe for important data. People also assume that cloning a failing drive to a new one will produce a perfect copy, but any data in the unreadable sectors is lost. It is also a mistake to use the beginner mode in Clonezilla when dealing with a failing drive; you need expert mode to add the rescue option. Finally, some users try to clone a drive that is actively failing by using the computer normally, which can cause more damage; it is better to use a live environment and a tool like ddrescue.
When to Use Clonezilla vs. ddrescue
Use Clonezilla when the source drive is healthy and you want a quick, compressed image of a system. It is excellent for deploying many identical machines or for backup. Use ddrescue when the drive is failing or has bad sectors, because it is designed to recover as much data as possible. You can combine them: first use ddrescue to create a raw image, then use Clonezilla to work with that image (though Clonezilla may not directly read a raw image; you would need to restore it to a disk first). For a one-time recovery, ddrescue is the better choice. If you must use Clonezilla, use the -rescue option and be prepared for a possibly incomplete image.
Safety and Data Recovery Tips
If your drive has bad sectors, stop using it immediately. Every read attempt can stress the drive further and cause more damage. Work on a copy of the data, not the original. Always have a backup of any data you cannot afford to lose. When using ddrescue, do not mount the failing drive; work on the image. After recovery, replace the drive; it is not reliable for long-term storage. Also, be aware that bad sectors can sometimes be a sign of a failing controller or power supply, not just the platter. If the drive makes clicking or grinding noises, it is likely physically damaged, and you should consider professional data recovery, which can be expensive but may be the only option.
Frequently Asked Questions
Can Clonezilla skip bad sectors? Yes, but only if you use the expert mode and add the -rescue option. In beginner mode, it will abort on the first read error.
Will the cloned disk boot if there were bad sectors? Possibly, but not guaranteed. If the bad sectors were in system files, the clone may be unbootable or may crash. It is best to run a file system check and repair after cloning.
What does ddrescue do differently from Clonezilla? ddrescue is a data recovery tool that logs read errors and can retry them, while Clonezilla is a disk imaging tool that expects a healthy disk. ddrescue is more robust for failing drives.
Can I use Clonezilla to clone a drive with bad sectors to a smaller drive? Clonezilla can clone to a smaller drive if the used space fits, but bad sectors may cause the process to fail. It is safer to first image the drive with ddrescue and then restore to the smaller drive.
Is it safe to keep using a hard drive with bad sectors? It is not recommended. Bad sectors can spread, and the drive may fail completely. Back up your data and replace the drive as soon as possible.
Does a bad sector always mean data is lost? Not always. Sometimes the data can be recovered with tools like ddrescue, but if the sector is physically damaged, the data is gone. The drive’s firmware may have already moved the data to a spare sector, in which case you might not notice any issue.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Philips DST7060/20 7000 Series Iron: Specs & Fit
- Coal Fueled Jet Aircraft: Could It Work?675 L
- Remote Desktop on Raspberry Pi: How to Enable It
- Word Select Last Line in Paragraph?
- Google Assistant IFTTT Recipes: 7 Useful Automations
- OLED TVs in Dark Rooms: Why They Look Better and When They Don’t