Hi all, I'm new to Linux and this tool,
I have a basic Ubuntu 20.04 install that i like to image and restore in other drives.
The master drive has the following partitions.
sda1 512MB vfat
sda2 476.4GB ext4
When I do a disk to image on CLonezilla and Rescuezilla the tools show an error when creating the image for the vfat partition.
"Failed to backup partition"
"fatclone.c Filesystem is not in valid state. May be is not cleanly mounted"
The second partition shows no error. As a result the image created has issues. If i restore a drive from it, the drive does not boot. It seems Clonezilla and Rescuezilla cannot handle the boot partition. which seems like what i'm doing is a common scenario for backup up and duplicating drives.
What is the proper way to create a valid disk image and restoring it?
As a workaround I created an image of the boot partition using clonezilla and DD, and after i encounter the boot error i have to re-image the boot partition with this DD partition.
So now saving a disk imahe invloves.
1 (on disk 1) create a boot partition image using DD
2 (on disk 1) create a disk image and skip the error on sda1
3 (on disk 2) restore the image and skip the error on sda1
4 (on disk 2)overwrite the boot partition with partition image from step 1
CLonezilla detecting vfat reverting to DD for that partition and using fatclone for the ext4 partition. Restoring being the reverse of that process and making it seamless to the user.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did some more testing. Created a brand new Ubuntu 20.04 OS install from the UBUNTU iso. and this time Clonezilla created the image without errors.
Could the original Ubuntu drive sda1 be corrupted? it boots and runs fine. Any ideas?
Update: I used the successful image to re-write sda1 of the original disk, now the creation of the image from the original disk works as expected. Maybe there was an issue with that original sda1 partition. Only thing i can think of is that the disk might have been created from a Macrium Reflect image initially. and that might corrupt the boot partition enough for clonezilla to complain but not enough for Ubuntu to boot and OS to work as expected.
Last edit: Will D. 2023-02-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I restored the working sda1 boot partition into the original drive and now I get the GRUB menu at bootup. how can I fix this? I looked at the /etc/fstab file and the IDs of both partitions match the partition IDs.
Which version of Clonezilla live did you use? Have you tried the latest stable one? i.e., Clonezilla live 3.0.3-22? https://clonezilla.org/downloads.php
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Used this clonezilla-live-20221103-kinetic-amd64.iso, I managed to make progress by using https://help.ubuntu.com/community/Boot-Repair
this got me to a grub menu where i could select ubuntu and load the OS. I then modified the GRUB file not to load this menu and load OS directly.
I managed to create an image from there that shows no errors and boots properly after restoring. I still don't know what went wrong initially.
boot-repair-4ppa203 [20230222_2128]
============================== Boot Info Summary ===============================
=> No boot loader is installed in the MBR of /dev/sda.
=> Syslinux MBR (5.00 and higher) is installed in the MBR of /dev/sdb.
sda1: ______________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/BOOT/fbx64.efi /efi/BOOT/mmx64.efi
/efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi
/efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg
The default repair of the Boot-Repair utility would reinstall the grub-efi of
sda2,
using the following options: sda1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file
Final advice in case of suggested repair: ________
Please do not forget to make your UEFI firmware boot on the Ubuntu 20.04.4 LTS entry (sda1/efi/*/grub.efi (*** will be updated in the final message) file) !
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all, I'm new to Linux and this tool,
I have a basic Ubuntu 20.04 install that i like to image and restore in other drives.
The master drive has the following partitions.
sda1 512MB vfat
sda2 476.4GB ext4
When I do a disk to image on CLonezilla and Rescuezilla the tools show an error when creating the image for the vfat partition.
"Failed to backup partition"
"fatclone.c Filesystem is not in valid state. May be is not cleanly mounted"
The second partition shows no error. As a result the image created has issues. If i restore a drive from it, the drive does not boot. It seems Clonezilla and Rescuezilla cannot handle the boot partition. which seems like what i'm doing is a common scenario for backup up and duplicating drives.
What is the proper way to create a valid disk image and restoring it?
As a workaround I created an image of the boot partition using clonezilla and DD, and after i encounter the boot error i have to re-image the boot partition with this DD partition.
So now saving a disk imahe invloves.
1 (on disk 1) create a boot partition image using DD
2 (on disk 1) create a disk image and skip the error on sda1
3 (on disk 2) restore the image and skip the error on sda1
4 (on disk 2)overwrite the boot partition with partition image from step 1
Any help will be appreciated, Thanks in advance.
I was expecting the process to work as
https://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/01_Save_disk_image
CLonezilla detecting vfat reverting to DD for that partition and using fatclone for the ext4 partition. Restoring being the reverse of that process and making it seamless to the user.
Did some more testing. Created a brand new Ubuntu 20.04 OS install from the UBUNTU iso. and this time Clonezilla created the image without errors.
Could the original Ubuntu drive sda1 be corrupted? it boots and runs fine. Any ideas?
Update: I used the successful image to re-write sda1 of the original disk, now the creation of the image from the original disk works as expected. Maybe there was an issue with that original sda1 partition. Only thing i can think of is that the disk might have been created from a Macrium Reflect image initially. and that might corrupt the boot partition enough for clonezilla to complain but not enough for Ubuntu to boot and OS to work as expected.
Last edit: Will D. 2023-02-17
I restored the working sda1 boot partition into the original drive and now I get the GRUB menu at bootup. how can I fix this? I looked at the /etc/fstab file and the IDs of both partitions match the partition IDs.
Thanks
Update: tried this https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
to reinstall GRUB. I used /dev/sda1 since that I think is the boot partition , this is what fdsik -l returns:
/dev/sda1 512M EFI System
/dev/sda2 476.4G Linux Filesystem
I got an error from grub install that this GPT partition contains no BIOS boot partition and that only blocklists could be used but discouraged...
MAybe my boot partition in sda2 after all?
UPdate: tried the steps on sda2 and the same error occurred.
Last edit: Will D. 2023-02-19
Which version of Clonezilla live did you use? Have you tried the latest stable one? i.e., Clonezilla live 3.0.3-22?
https://clonezilla.org/downloads.php
Steven
Used this clonezilla-live-20221103-kinetic-amd64.iso, I managed to make progress by using https://help.ubuntu.com/community/Boot-Repair
this got me to a grub menu where i could select ubuntu and load the OS. I then modified the GRUB file not to load this menu and load OS directly.
I managed to create an image from there that shows no errors and boots properly after restoring. I still don't know what went wrong initially.
boot-repair-4ppa203 [20230222_2128]
============================== Boot Info Summary ===============================
=> No boot loader is installed in the MBR of /dev/sda.
=> Syslinux MBR (5.00 and higher) is installed in the MBR of /dev/sdb.
sda1: ______________
sda2: ______________
...
Suggested repair: ______________
The default repair of the Boot-Repair utility would reinstall the grub-efi of
sda2,
using the following options: sda1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file
Final advice in case of suggested repair: ________
Please do not forget to make your UEFI firmware boot on the Ubuntu 20.04.4 LTS entry (sda1/efi/*/grub.efi (*** will be updated in the final message) file) !