I have been using drbl-clonezilla server to clone windows with great results. I am now getting ready to start doing some Ubuntu workstations. I have a desktop system with very basic partition layout. It is sda1= /, sda2=swap, and sda3=/home. I have saved the install to the server and restored it to an identical system. I notice that the sda1 (/) and sda3 (/home) are restored, but not swap. There appears to be a swap partition on the disk but it does not appear to be active according to system monitor(0 of 0 swap in use). When I try blkid in terminal, the swap partition (/dev/sda2) is not listed. The UUID for sda1 and sda3 both are listed.
I suspect that this has something to do with the swap partition being specified by UUID in the /etc/fstab. I know that I can reformat the swap partition and edit /etc/fstab to change the UUID. I also suspect that removing the UUID in the fstab of the master system and reverting to /dev/sda2 would be easier in the long run and probably work.
My question is this: Is there something I am overlooking in the cloning and restoring of the image that is causing this problem?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When Clonezilla clones, it only save the UUID and label of swap partition. Then when restoring, it will try to create it by the command /sbin/mkswap-uuid with corresponding parameter to restore the UUID or label.
Did you see any error messages when Clonezilla formating the swap partition ?
What are the results if you run ?
cat /home/partimag/$YOUR_IMAGE_NAME/swappt*.info (replace $YOUR_IMAGE_NAME with your image name)
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the info! I will try that and let you know.
I have found by observing the clone process that the swap partition appears to copy, but on all (recent at least) clones, I have to boot with pmagic and use gparted to format the swap. I now have the master image set without UUID on the swap in fstab. Thus, once the swap partition on the clone is formatted it is recognized on boot.
The only other issued I am seeing for the moment is the incrementing ethernet interfaces, but I know that that is a udev thing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! I went in today and ran another test on our Clonezilla Server. I verified the partition UUID of the swap partition on the system to be cloned (Ubuntu Hardy). I then saved the image to the server (Hardy also with latest Clonezilla updated as of yesterday) and verified the UUID with the command provided above. They match.
I then cloned the image from the server to a machine that is identical to the source machine. When it is rebooted, I still find that the cloned machine does not have a swap partition and running blkid only shows the UUID for the other two partitions. When I see this and boot Parted Magic and look at the partitions with GParted, I find that the partition that should be swap is "unknown partition". As I stated earlier, I can format it, copy the new UUID into /etc/fstab and reboot and all is well.
I don't know how long this has been happening, because I have not been monitoring it and we haven't been doing many Ubuntu machines in the past. It is not a major deal to fix, but it would be interesting to know if anyone else is running into this problem as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Rick,
When you run "/opt/drbl/sbin/dcs" to start Clonezilla to clone the image to the machine, please enter expert mode, set your client to command line prompt by choosing "-p true" in the advanced parameters. Then boot your client, and when the partition is restored, in around the end of the clonezilla action, i.e. before "grub-install" is run, you will see something like:
*****************************************************
Creating swap partition /dev/hda2...
Found the swap partition /dev/hda2 info in the image dir, create it by:
mkswap-uuid -U 190e60ba-0331-430c-9df0-fbf9997a4d5a /dev/hda2
Setting up swapspace version 1, size = 511963 kB
no label, UUID=190e60ba-0331-430c-9df0-fbf9997a4d5a
*****************************************************
Please check if any error about this action ?
Thanks in advance.
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Rick,
Using swap file is a workaround. For us, we'd like to fix this if this problem does exist. Here I can not reproduce the problem, so I need your help to see why mkswap-uuid failed there.
Thanks in advance.
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK I did another test today. The Hardy master image was checked out to make sure that swap uuid for fstab and resume were correct. I saved to the server (running Hardy Server) updated as of last week with latest DRBL stable (clonezilla version is 2.3.3-24.
I can tell immediately that the swap was not copied correctly because the usplash crashes on bootup due to the incorect uuid in resume.
I saved the image to a samba share using the last intrepid livecd and found the same problem when restoring.
I then saved the image to a samba share using the latest jaunty livecd (2090603) and restored with the same and found it was successful!
Just to see what happened, I restored an image created with the intrepid livecd using the jaunty livecd and found it failed.
I am suspecting that it is the version of the clonezilla package as I see that mkswap-uuid is that same for all three. Is that a correct assumption?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"mkswap-uuid is that same for all three" -> Yes. It's the same.
So you did not see any error messages when Clonezilla used mkswap-uuid to create the swap partition ?
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK I did another test today. The Hardy master image was checked out to make sure that swap uuid for fstab and resume were correct. I saved to the server (running Hardy Server) updated as of last week with latest DRBL stable (clonezilla version is 2.3.3-24.
I can tell immediately that the swap was not copied correctly because the usplash crashes on bootup due to the incorect uuid in resume.
I saved the image to a samba share using the last intrepid livecd and found the same problem when restoring.
I then saved the image to a samba share using the latest jaunty livecd (2090603) and restored with the same and found it was successful!
Just to see what happened, I restored an image created with the intrepid livecd using the jaunty livecd and found it failed.
I am suspecting that it is the version of the clonezilla package as I see that mkswap-uuid is that same for all three. Is that a correct assumption?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, as I stated above, I never received any error while cloning or restoring, but the swap partition was not valid except using jaunty live.
This means we can clone one by one, but we would be like to be able to use the server and clone 6 or 8 at once. Any advice you can give is appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Steven,
Sorry for reopening this discussion from 2009. Has it been resolved? I am facing the same problem. I am cloning a computer with SLES11.3 Linux OS. After cloning, /dev/sda2 is missing its label "swappart" is missing. The computer boots, but complains about low swap memory.
I'm using Clonezilla version 3.10.11-3 which came with repository of Ubuntu 16.04. Ubuntu 16.04 is running on a USB flash drive, and I have a script that captures the image of sda and sdb on one computer, and clones it into another.
I'm using '/usr/sbin/ocs-sr -q2 -c -j2 -gm -z1p -i 4096 -p true savedisk "MASTER" sda sdb' to save image, and '/usr/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -irhr -j2 -p true restoredisk "MASTER" sda sdb' to restore the image.
I can see both uuid and label captured correctly in file swappt-sda2.info.
Clonezilla log file during installation says "Finding swap partitions in MBR table /home/partimag/MASTER/sda-pt.sf", but there are no labels in that file.
I appreciate any help or idea that would help me solve this.
Thanks,
Philipp
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, we made some imrpovements about that. The label and UUID for swap partition are saved in the file something like:
swappt-sda5.info
Its conent is like:
UUID="608815fc-c140-43ea-99a4-f4f49f18583d"
LABEL="myswap"
Clonezilla will use these info to recreate the swap partition.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some more years later I still got the same issue: When trying to clone a Debian 13 machine with Clonezilla, the swap partition is shown as unknown partition type and its UUID does not match the entry in /etc/fstab and in the resume option in /etc/default/grub. I need to clone a master image to ~20 machines and it would be a PITA to chroot each of them to reformat the swap partition and correct the UUID. Any thoughts on how to fix the issue and streamline the process?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We never have this issue here.
Could you please share the log file /var/log/clonezilla.log after you encounter this issue?
It will provide more info so that we can try to fix this issue for you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been using drbl-clonezilla server to clone windows with great results. I am now getting ready to start doing some Ubuntu workstations. I have a desktop system with very basic partition layout. It is sda1= /, sda2=swap, and sda3=/home. I have saved the install to the server and restored it to an identical system. I notice that the sda1 (/) and sda3 (/home) are restored, but not swap. There appears to be a swap partition on the disk but it does not appear to be active according to system monitor(0 of 0 swap in use). When I try blkid in terminal, the swap partition (/dev/sda2) is not listed. The UUID for sda1 and sda3 both are listed.
I suspect that this has something to do with the swap partition being specified by UUID in the /etc/fstab. I know that I can reformat the swap partition and edit /etc/fstab to change the UUID. I also suspect that removing the UUID in the fstab of the master system and reverting to /dev/sda2 would be easier in the long run and probably work.
My question is this: Is there something I am overlooking in the cloning and restoring of the image that is causing this problem?
Thanks!
When Clonezilla clones, it only save the UUID and label of swap partition. Then when restoring, it will try to create it by the command /sbin/mkswap-uuid with corresponding parameter to restore the UUID or label.
Did you see any error messages when Clonezilla formating the swap partition ?
What are the results if you run ?
cat /home/partimag/$YOUR_IMAGE_NAME/swappt*.info (replace $YOUR_IMAGE_NAME with your image name)
Steven.
Thanks for the info! I will try that and let you know.
I have found by observing the clone process that the swap partition appears to copy, but on all (recent at least) clones, I have to boot with pmagic and use gparted to format the swap. I now have the master image set without UUID on the swap in fstab. Thus, once the swap partition on the clone is formatted it is recognized on boot.
The only other issued I am seeing for the moment is the incrementing ethernet interfaces, but I know that that is a udev thing.
OK, please keep us posted.
Steven.
Hi! I went in today and ran another test on our Clonezilla Server. I verified the partition UUID of the swap partition on the system to be cloned (Ubuntu Hardy). I then saved the image to the server (Hardy also with latest Clonezilla updated as of yesterday) and verified the UUID with the command provided above. They match.
I then cloned the image from the server to a machine that is identical to the source machine. When it is rebooted, I still find that the cloned machine does not have a swap partition and running blkid only shows the UUID for the other two partitions. When I see this and boot Parted Magic and look at the partitions with GParted, I find that the partition that should be swap is "unknown partition". As I stated earlier, I can format it, copy the new UUID into /etc/fstab and reboot and all is well.
I don't know how long this has been happening, because I have not been monitoring it and we haven't been doing many Ubuntu machines in the past. It is not a major deal to fix, but it would be interesting to know if anyone else is running into this problem as well.
Rick,
When you run "/opt/drbl/sbin/dcs" to start Clonezilla to clone the image to the machine, please enter expert mode, set your client to command line prompt by choosing "-p true" in the advanced parameters. Then boot your client, and when the partition is restored, in around the end of the clonezilla action, i.e. before "grub-install" is run, you will see something like:
*****************************************************
Creating swap partition /dev/hda2...
Found the swap partition /dev/hda2 info in the image dir, create it by:
mkswap-uuid -U 190e60ba-0331-430c-9df0-fbf9997a4d5a /dev/hda2
Setting up swapspace version 1, size = 511963 kB
no label, UUID=190e60ba-0331-430c-9df0-fbf9997a4d5a
*****************************************************
Please check if any error about this action ?
Thanks in advance.
Steven.
The thought occurred to me that I should do away with swap partitions on all my builds and use swap files instead. That would be one solution.
Rick,
Using swap file is a workaround. For us, we'd like to fix this if this problem does exist. Here I can not reproduce the problem, so I need your help to see why mkswap-uuid failed there.
Thanks in advance.
Steven.
I will be running more tests. Let me know what data you need.
I also noticed that the swap UUID is also located in /etc/intiramfs-tools/conf.d/resume. I will try to make sure it is correct there also.
OK I did another test today. The Hardy master image was checked out to make sure that swap uuid for fstab and resume were correct. I saved to the server (running Hardy Server) updated as of last week with latest DRBL stable (clonezilla version is 2.3.3-24.
I can tell immediately that the swap was not copied correctly because the usplash crashes on bootup due to the incorect uuid in resume.
I saved the image to a samba share using the last intrepid livecd and found the same problem when restoring.
I then saved the image to a samba share using the latest jaunty livecd (2090603) and restored with the same and found it was successful!
Just to see what happened, I restored an image created with the intrepid livecd using the jaunty livecd and found it failed.
I am suspecting that it is the version of the clonezilla package as I see that mkswap-uuid is that same for all three. Is that a correct assumption?
"mkswap-uuid is that same for all three" -> Yes. It's the same.
So you did not see any error messages when Clonezilla used mkswap-uuid to create the swap partition ?
Steven.
OK I did another test today. The Hardy master image was checked out to make sure that swap uuid for fstab and resume were correct. I saved to the server (running Hardy Server) updated as of last week with latest DRBL stable (clonezilla version is 2.3.3-24.
I can tell immediately that the swap was not copied correctly because the usplash crashes on bootup due to the incorect uuid in resume.
I saved the image to a samba share using the last intrepid livecd and found the same problem when restoring.
I then saved the image to a samba share using the latest jaunty livecd (2090603) and restored with the same and found it was successful!
Just to see what happened, I restored an image created with the intrepid livecd using the jaunty livecd and found it failed.
I am suspecting that it is the version of the clonezilla package as I see that mkswap-uuid is that same for all three. Is that a correct assumption?
No, as I stated above, I never received any error while cloning or restoring, but the swap partition was not valid except using jaunty live.
This means we can clone one by one, but we would be like to be able to use the server and clone 6 or 8 at once. Any advice you can give is appreciated.
So do you think the problem is the version of Clonezilla is newer in Jaunty Live compared to stable server?
Rick,
Maybe. Unless I can compare all the related programs that I can make sure that.
Steven.
I will be happy to do further testing. if it will help pinpoint the problem.
Steven,
Sorry for reopening this discussion from 2009. Has it been resolved? I am facing the same problem. I am cloning a computer with SLES11.3 Linux OS. After cloning, /dev/sda2 is missing its label "swappart" is missing. The computer boots, but complains about low swap memory.
I'm using Clonezilla version 3.10.11-3 which came with repository of Ubuntu 16.04. Ubuntu 16.04 is running on a USB flash drive, and I have a script that captures the image of sda and sdb on one computer, and clones it into another.
I'm using '/usr/sbin/ocs-sr -q2 -c -j2 -gm -z1p -i 4096 -p true savedisk "MASTER" sda sdb' to save image, and '/usr/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -irhr -j2 -p true restoredisk "MASTER" sda sdb' to restore the image.
I can see both uuid and label captured correctly in file swappt-sda2.info.
Clonezilla log file during installation says "Finding swap partitions in MBR table /home/partimag/MASTER/sda-pt.sf", but there are no labels in that file.
I appreciate any help or idea that would help me solve this.
Thanks,
Philipp
Yes, we made some imrpovements about that. The label and UUID for swap partition are saved in the file something like:
swappt-sda5.info
Its conent is like:
UUID="608815fc-c140-43ea-99a4-f4f49f18583d"
LABEL="myswap"
Clonezilla will use these info to recreate the swap partition.
Steven
Some more years later I still got the same issue: When trying to clone a Debian 13 machine with Clonezilla, the swap partition is shown as unknown partition type and its UUID does not match the entry in /etc/fstab and in the resume option in /etc/default/grub. I need to clone a master image to ~20 machines and it would be a PITA to chroot each of them to reformat the swap partition and correct the UUID. Any thoughts on how to fix the issue and streamline the process?
We never have this issue here.
Could you please share the log file /var/log/clonezilla.log after you encounter this issue?
It will provide more info so that we can try to fix this issue for you.
Hi Steven, sorry for the very long delay! Here are the requested logs.
Could you please use the latest Clonezilla live to run this? i.e., 3.3.0-33 or 20251017-questing?
Check if this issue is reproducible or not.