In my case, these are Windows 10 systems, so there are only FAT or NTFS partitions. Computers are set to UEFI and the disks are GPT.
See the attachments below: Two different versions of Clonezilla, older and newer, see the partitions in a slightly different way.
I booted off a CD in each case so the version is also listed at the bottom.
Did you try to use "restoreparts" instead of "restoredisk"?
Actually we switched the type about RAID device for the TUI to be partition, not disk any more.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have tried restoreparts in the past but it didn't work for bootable drives...meaning they wouldn't be bootable after the restore operation. If there is an extra step to fix bootable drives restored with restoreparts it would be useful to know...but it seems a simple "one-step" procedure was taken away with no alternative option.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wouldn't say the "only" issue...you need to take into account that most operating systems create more than one partition...for example, my current Windows laptop's SSD drive has 3 partitions, EFI, data & recovery. I think that's a typical scheme for Windows.
My test desktop computer has one multi-boot volume with Windows, Ubuntu and Rocky, so that's a total of 7 partitions (and I would have more if I didn't use LVM in Rocky). So in that case I would need to create 7 separate images.
With the "old" method it would be just one image for the entire disk.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I hope you don't mind me jumping in here. I too have been struggling with this same issue for some time. I took a look at the code today and I seem to have found a 'fix'. I hesitate to use the word fix as I don't think Steven considers it broken.
The problem is with a RegEx in the function is_partition() in the file ocs-functions. I can supply more information if anyone wants it.
Last edit: Michael McGrath 2022-11-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay. I might have been a bit premature here. The solution I mentioned does allow md126 to show in the list of devices but when I attempted to restore an image to it, I got an error. /dev/md126 is busy. Some partition is mounted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Steven. From my own experience of looking at this, it actually worked up until 2.8.0-6 and was broken in 2.8.0-8. There was a lot of changes made in this release. ocs-prep-cache was used for the first time I believe and a lot of changes in ocs-functions.
In relation to the error I mentioned above regarding /dev/md126 is busy. Some partition is mounted. I'm hoping this is down to a RegEx in one of the functions that check if disks are busy. I'm not great with Regular Expressions though....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have managed to get this working if you are still interested. The solution is far from ideal as it involves using squashfs-tools to unsquash the filesystem, edit a file and then squash it again. But it does work.
I have issued a pull request on Github stevenshiau /clonezilla. It would obviously be better if it was fixed properly at source.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
# 2020/12/18 Allow /dev/md126 can be a partition, too.
but I suppose my confusion is around the use of the word 'too', because it seems to allow /dev/md126 to be seen as a partition 'only' which breaks functionality for me and others.
Regards
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Steven,
I just tested Clonezilla live >= 3.0.3-22 with intel RAID1 which is built in BIOS. I guess it is one FAKE RAID (firmware). Basically 3.0.3-22 could do the disk to image backup. It recognizes md126. But when restore the image to RAID1 disk in same computer, it couldn't show md126 in target disks, only show the member disks of raid(sda/sdb). The interesting thing is that it still can recognizes md126 in the early steps, until going to restore image to disk step. Then I use 2.7.3.19 to do restore, it does restore the image to disk.
Xinjun
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also tested with testing - 3.1.0-10 but still have the same issue. I've done a lot of testing from within the live environment and I believe I might know what's going on.
In the function is_partition() there is an if / elif block that tests for the value of variable $ocs_sr_type. From my testing this variable is unset when the function is called and defaults to the else at the end. This else block only checks for the device name against the regex so /dev/md126 is always flagged as a partition even if it doesn't have a filesystem on the drive root. I tried placing a if is_block_device_with_fs $dev_; call here before checking the regex and it seems to work. I haven't been able to test this yet to see if it would still flag /dev/md126 as a partition if it did actually have a filesystem on it though.
It seems to me that the script ocs-prep-cache is called ever before I choose savedisk or restoredisk, and that's why $ocs_sr_type is not yet set. I have attached a patch file so you can see what I'm talking about.
The awk line with IGNORECASE fixes an issue where /dev/md126 always shows as busy/mounted when trying to restore an image to it.
In my case, these are Windows 10 systems, so there are only FAT or NTFS partitions. Computers are set to UEFI and the disks are GPT.
See the attachments below: Two different versions of Clonezilla, older and newer, see the partitions in a slightly different way.
I booted off a CD in each case so the version is also listed at the bottom.
With that MD device, let's start from the beginning.
Use the latest testing Clonezilla live, i.e., 3.0.0-10 amd64 release:
https://clonezilla.org/downloads.php
Please do it again, and show me the green command like this:
https://clonezilla.org/clonezilla-live/doc/03_Disk_to_disk_clone/images/ocs-08-3-command-to-run.png
and take photos about the error messages on the screen, post it.
Steven
I downloaded the version you indicated.
Not sure what the command is supposed to do, but I definitely did not want to overwrite any data. I ran it up to the point where I said "n"
Sorry, I believe I have confused. Actually I should not use the disk to disk cloning photo as an example. I should use this one:
https://clonezilla.org/clonezilla-live/doc/02_Restore_disk_image/images/ocs-10-5-img-restore-command-prompt.png
It's about image restoring in your case I believe. I just need you to show the green command, not meant you to do disk to disk cloning.
Steven
Hello,
sorry to open this thread again - issue also accurs (again) in v3.0.2-21 as well as 20221103-kinetic as of writing 2022-11-29
Rolling back to live 2.7.3-19 i can confirm it be working again, see screenshots attached of current version 302-21
Thanks for sharing that 2.7.3.19 works...I had gone all the way back to 20200703 because it was the last version I found to be working.
I'd hope support for this would carry over to new versions...like always.
Did you try to use "restoreparts" instead of "restoredisk"?
Actually we switched the type about RAID device for the TUI to be partition, not disk any more.
Steven
I have tried restoreparts in the past but it didn't work for bootable drives...meaning they wouldn't be bootable after the restore operation. If there is an extra step to fix bootable drives restored with restoreparts it would be useful to know...but it seems a simple "one-step" procedure was taken away with no alternative option.
can confirm that, must be using restoredsk to be fully working and bootable, restoreparts would be "ok" for partial recovery only
OK, got it. So the issue is only the booting mechanism?
Steven
I wouldn't say the "only" issue...you need to take into account that most operating systems create more than one partition...for example, my current Windows laptop's SSD drive has 3 partitions, EFI, data & recovery. I think that's a typical scheme for Windows.
My test desktop computer has one multi-boot volume with Windows, Ubuntu and Rocky, so that's a total of 7 partitions (and I would have more if I didn't use LVM in Rocky). So in that case I would need to create 7 separate images.
With the "old" method it would be just one image for the entire disk.
i agree with Enrix, restoredisk is the only visable solution needed
I hope you don't mind me jumping in here. I too have been struggling with this same issue for some time. I took a look at the code today and I seem to have found a 'fix'. I hesitate to use the word fix as I don't think Steven considers it broken.
The problem is with a RegEx in the function is_partition() in the file ocs-functions. I can supply more information if anyone wants it.
Last edit: Michael McGrath 2022-11-30
Okay. I might have been a bit premature here. The solution I mentioned does allow md126 to show in the list of devices but when I attempted to restore an image to it, I got an error.
/dev/md126 is busy. Some partition is mounted.
@Michael,
No problem. Patches are welcome.
Actually maybe we should revert to what it was in 2.7.3-19. I will check more recently.
Steven
Hi Steven. From my own experience of looking at this, it actually worked up until 2.8.0-6 and was broken in 2.8.0-8. There was a lot of changes made in this release. ocs-prep-cache was used for the first time I believe and a lot of changes in ocs-functions.
In relation to the error I mentioned above regarding
/dev/md126 is busy. Some partition is mounted.
I'm hoping this is down to a RegEx in one of the functions that check if disks are busy. I'm not great with Regular Expressions though....@Enrix
@Christopher Sun
I have managed to get this working if you are still interested. The solution is far from ideal as it involves using squashfs-tools to unsquash the filesystem, edit a file and then squash it again. But it does work.
I have issued a pull request on Github stevenshiau /clonezilla. It would obviously be better if it was fixed properly at source.
@Michael,
Somehow I missed this PR notification.
As for this request:
https://github.com/stevenshiau/clonezilla/pull/81/commits/eaf01e8a84a5046687f62b4b9748971c5422f801
As for the this:
As in the comment:
Hence I hesitated to change it as
Steven
Hi Steven,
Thanks for the response. I had seen the comment
but I suppose my confusion is around the use of the word 'too', because it seems to allow /dev/md126 to be seen as a partition 'only' which breaks functionality for me and others.
Regards
Michael
Got it.
There are some changes in testing Clonezilla live >= 3.0.3-22. Could you give it a try?
https://clonezilla.org/downloads.php
Steven
Hi Steven,
I just tested Clonezilla live >= 3.0.3-22 with intel RAID1 which is built in BIOS. I guess it is one FAKE RAID (firmware). Basically 3.0.3-22 could do the disk to image backup. It recognizes md126. But when restore the image to RAID1 disk in same computer, it couldn't show md126 in target disks, only show the member disks of raid(sda/sdb). The interesting thing is that it still can recognizes md126 in the early steps, until going to restore image to disk step. Then I use 2.7.3.19 to do restore, it does restore the image to disk.
Xinjun
So this issue maybe only exists on the TUI? If you assign that in the command line parameters, it should work, right?
Steven
Hi Steven,
I also tested with testing - 3.1.0-10 but still have the same issue. I've done a lot of testing from within the live environment and I believe I might know what's going on.
In the function
is_partition()
there is an if / elif block that tests for the value of variable$ocs_sr_type
. From my testing this variable is unset when the function is called and defaults to the else at the end. This else block only checks for the device name against the regex so /dev/md126 is always flagged as a partition even if it doesn't have a filesystem on the drive root. I tried placing aif is_block_device_with_fs $dev_;
call here before checking the regex and it seems to work. I haven't been able to test this yet to see if it would still flag /dev/md126 as a partition if it did actually have a filesystem on it though.It seems to me that the script ocs-prep-cache is called ever before I choose savedisk or restoredisk, and that's why $ocs_sr_type is not yet set. I have attached a patch file so you can see what I'm talking about.
The awk line with IGNORECASE fixes an issue where /dev/md126 always shows as busy/mounted when trying to restore an image to it.
OK, thank you very much. We will check it.
Steven