For my notebook I bought a new disk. I installed it into a external USB drive. I also have an additional (large) disk in a second USB external drive. My plan was to copy the main WinXP partition from the notebook to an image on the large USB disk (for savekeeping). Then I wanted to copy this image to the new USB disk. Afterwards I would change the new disk into the notebook.
While copying, clonezilla 1.0.9-18 stopped and reported an unclean partition (bad sectors). I did the recommended "chkdsk /f /r" and double reboot, but this did not change anything. (Only took a lot of time.)
With some older message in this forum I decided that I would have to add a "--rescue" to the ntfsclone command /opt/drbl/sbin/ocs-funtions. (Which is only writeable after "sudo su", to find out that trick took some time.) In this I was successful and I could create the image.
Now I am stuck with restoring the image to the new USB disk. Is this possible at all? When I chose the mode "restore partition" after selection of the source image I am offered my old /dev/hda1 as only possible target. Did I forget a step? Should I do some special formatting? NB: The USB disk as such was found by the system in previous steps, e.g. as a possible storage place for images.
When I bypass the image and try to directly copy the partition clonezilla just hangs.
So my questions are:
Is my general idea of how to install a new disk OK?
Is it OK to use clonezilla for this or should I try some other software?
How do I best deal with a partition with bad sectors? Is there a way to repair it?
How do I create a copy from an image onto a new location on an USB drive?
Thanks in advance.
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
About your questions,
Q: Is my general idea of how to install a new disk OK?
A: Yes.
Q: Is it OK to use clonezilla for this or should I try some other software?
A: If the integrity of NTFS partition is ok and no bad sectors, yes, you can. If bad sectors or integrity problem, maybe clonezilla will work, maybe not.
Q: How do I best deal with a partition with bad sectors? Is there a way to repair
it?
A: There are some programs, like: ddrescue, gddrescue, you can try them to dump the disk/partition.
Thanks for the help. I am a bit further now but not quite there. I will just post some intermediate results hoping that they might help others:
A) I got your answer about the cnvt-ocs-dev script some minutes too late, so I did not try it. It would have been nice to get a hint about this in the GUI. I certainly did not expect the need to
B) I could restore the image hda1 to the USB /dev/sdb drive by hand using
"cat $IMG_DIR/hda1.htfs-img.* | gzip -d -c | ntfsclone -restore-image -O /dev/sdb1"
This might have been successful, anyway I could not get it to boot.
C) I then inserted the new drive into the notebook and restored the hda1 image to the new hda disk. This worked without problems. There were only five problems remaining.
1) The partition is still marked as having bad sectors. So the information about bad sectors has been copied to the new disk. This is something I am quite surprised about and I have again no idea how to handle this. It might also be that I did something wrong with the MBR later on and this is just a side effect. (I feel very much like one of the monkeys at the typewriter expecting a work of art to form while pressing keys randomly.)
2) The partition size was still as on the old drive. I could run "ntfsresize --bad-sectors /dev/hda1" to correct this.
3) The mbr was not copied correctly or not at all. (I guess.) I then copied the mbr from the image (called hda.mrb in the image directory) onto the new /dev/hda using "cat $IMG_DIR/hda.mrb /dev/hda"
4) Only after that I found out that I had forgotten to mark the partition as bootable. Correction this with gparted, I could boot into the old system and write this post from there. This might be consequence of choosing to keep the prearranged partition table on the new disk and not let clonezilla write its own?
5) By some reason the recovery console in Windows XP from the same drive will not start but stops with a bluescreen (0x7b). It recommends to run chkdsk /f. This is not successful.
6) The notebook is an IBM Thinkpad X30. It has this feature to boot into a recovery-partition when pressing F11. This does not work at the moment.
I will keep you updated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I just cloned a HD that has bad sectors with Clonezilla. Fortunately, the NTFS file systems still seemed to be okay (no errors reported using chkdsk).
After clone failure with the same error that you also had (clonezilla stopped and reported bad sectors) I had a quick look at the ocs-function script.
It turns out that when you select "skip NTFS integrity checks" (dont remember the exact name of the option in clonezilla, but it was something like that), clonezilla uses the "--rescue --force" options for ntfsclone. So, even no need to edit the clonezilla scripts :-)
I using the latest clonezilla beta, dont know if this feature is in the current stable...
Steven, it would be very cool if you could add a small hint in the dialog that says that this option forces ntfsclone to go into rescue mode and ignore bad sectors.
Im receiving my new hd on tuesday. Im very curious to see if the image I created is going to work on the new HD...
good luck,
daniel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I can report success for the restore of the image created with ntfsclone --rescue
However, it only worked on the second attempt: I created a fresh image from the dying hd, but this one didnt boot (I guess the HD was too damaged at that time). Luckily, I still had the image around that I created at the time of my last post in this thread (about a week ago), and this one worked like a charm :-)
The success of ntfsclone --rescue seems to be highly depended on amount of damage of the disk to clone.
hth,
daniel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am stuck and hope you can help me out.
For my notebook I bought a new disk. I installed it into a external USB drive. I also have an additional (large) disk in a second USB external drive. My plan was to copy the main WinXP partition from the notebook to an image on the large USB disk (for savekeeping). Then I wanted to copy this image to the new USB disk. Afterwards I would change the new disk into the notebook.
While copying, clonezilla 1.0.9-18 stopped and reported an unclean partition (bad sectors). I did the recommended "chkdsk /f /r" and double reboot, but this did not change anything. (Only took a lot of time.)
With some older message in this forum I decided that I would have to add a "--rescue" to the ntfsclone command /opt/drbl/sbin/ocs-funtions. (Which is only writeable after "sudo su", to find out that trick took some time.) In this I was successful and I could create the image.
Now I am stuck with restoring the image to the new USB disk. Is this possible at all? When I chose the mode "restore partition" after selection of the source image I am offered my old /dev/hda1 as only possible target. Did I forget a step? Should I do some special formatting? NB: The USB disk as such was found by the system in previous steps, e.g. as a possible storage place for images.
When I bypass the image and try to directly copy the partition clonezilla just hangs.
So my questions are:
Is my general idea of how to install a new disk OK?
Is it OK to use clonezilla for this or should I try some other software?
How do I best deal with a partition with bad sectors? Is there a way to repair it?
How do I create a copy from an image onto a new location on an USB drive?
Thanks in advance.
Michael
About your questions,
Q: Is my general idea of how to install a new disk OK?
A: Yes.
Q: Is it OK to use clonezilla for this or should I try some other software?
A: If the integrity of NTFS partition is ok and no bad sectors, yes, you can. If bad sectors or integrity problem, maybe clonezilla will work, maybe not.
Q: How do I best deal with a partition with bad sectors? Is there a way to repair
it?
A: There are some programs, like: ddrescue, gddrescue, you can try them to dump the disk/partition.
Q: How do I create a copy from an image onto a new location on an USB drive?
A: If the target disk is not the same device name as source disk, you can try to use this command to convert that for you:
http://drbl.sourceforge.net/one4all/techrpt.php?c=cnvt-ocs-dev&t=To%20change%20the%20device%20name%20in%20saved%20clonezilla%20image
However, maybe it will fail in boot sector or /etc/fstab (for linux), so you have to deal with that by yourself.
Thanks for the help. I am a bit further now but not quite there. I will just post some intermediate results hoping that they might help others:
A) I got your answer about the cnvt-ocs-dev script some minutes too late, so I did not try it. It would have been nice to get a hint about this in the GUI. I certainly did not expect the need to
B) I could restore the image hda1 to the USB /dev/sdb drive by hand using
"cat $IMG_DIR/hda1.htfs-img.* | gzip -d -c | ntfsclone -restore-image -O /dev/sdb1"
This might have been successful, anyway I could not get it to boot.
C) I then inserted the new drive into the notebook and restored the hda1 image to the new hda disk. This worked without problems. There were only five problems remaining.
1) The partition is still marked as having bad sectors. So the information about bad sectors has been copied to the new disk. This is something I am quite surprised about and I have again no idea how to handle this. It might also be that I did something wrong with the MBR later on and this is just a side effect. (I feel very much like one of the monkeys at the typewriter expecting a work of art to form while pressing keys randomly.)
2) The partition size was still as on the old drive. I could run "ntfsresize --bad-sectors /dev/hda1" to correct this.
3) The mbr was not copied correctly or not at all. (I guess.) I then copied the mbr from the image (called hda.mrb in the image directory) onto the new /dev/hda using "cat $IMG_DIR/hda.mrb /dev/hda"
4) Only after that I found out that I had forgotten to mark the partition as bootable. Correction this with gparted, I could boot into the old system and write this post from there. This might be consequence of choosing to keep the prearranged partition table on the new disk and not let clonezilla write its own?
5) By some reason the recovery console in Windows XP from the same drive will not start but stops with a bluescreen (0x7b). It recommends to run chkdsk /f. This is not successful.
6) The notebook is an IBM Thinkpad X30. It has this feature to boot into a recovery-partition when pressing F11. This does not work at the moment.
I will keep you updated.
Hi, I just cloned a HD that has bad sectors with Clonezilla. Fortunately, the NTFS file systems still seemed to be okay (no errors reported using chkdsk).
After clone failure with the same error that you also had (clonezilla stopped and reported bad sectors) I had a quick look at the ocs-function script.
It turns out that when you select "skip NTFS integrity checks" (dont remember the exact name of the option in clonezilla, but it was something like that), clonezilla uses the "--rescue --force" options for ntfsclone. So, even no need to edit the clonezilla scripts :-)
I using the latest clonezilla beta, dont know if this feature is in the current stable...
Steven, it would be very cool if you could add a small hint in the dialog that says that this option forces ntfsclone to go into rescue mode and ignore bad sectors.
Im receiving my new hd on tuesday. Im very curious to see if the image I created is going to work on the new HD...
good luck,
daniel.
Daniel,
Thanks for the suggestion. Please keep us posted so that we know if this option works there or not.
Steven.
Hi, I can report success for the restore of the image created with ntfsclone --rescue
However, it only worked on the second attempt: I created a fresh image from the dying hd, but this one didnt boot (I guess the HD was too damaged at that time). Luckily, I still had the image around that I created at the time of my last post in this thread (about a week ago), and this one worked like a charm :-)
The success of ntfsclone --rescue seems to be highly depended on amount of damage of the disk to clone.
hth,
daniel.
Daniel,
Thanks for sharing that with us. Yes, that's true, if the broken sectors are too much, the chance to clone it is fewer.
Steven.