2

I see this similar question was asked before, however it was either not answered or it pertained 100% to Windows workarounds.

This is specifically Linux and I am trying to restore a Clonezilla image to a 4TB hard drive.

I have used this image many times before on other disks, however due to MBR restrictions on this larger drive, it needs to be GPT so I cannot restore the disk image.

The exact error that Clonezilla states is "Error: Destination disk size is 4.00TB, which is larger than the MBR partition table entry maximum 2TiB. You have to use GUID partition table format (GPT)"

I understand "what" the problem is but I do not know the steps to resolve. I'm going to try cloning the master machine using Macrium reflect and restoring, hopefully it can migrate the partition structure automatically.

NOTE: This drive is blank, therefore I have no concern over data loss. Experimentation is fine as I have nothing to lose on the drive.

EDIT/UPDATE:

So it seems Clonezilla actually allows the process to continue, however it will write everything as-is to MBR and the disk will be seen as 2TB.

With this in place, the question then changes to converting the MBR to GPT on the OS/boot volume (yes I am booting into the system that I am working with, data loss is not a problem since I can just restore from image if something breaks, which is has many times so far in my trials)

I have opened the disk with gdisk and ran the conversion to GPT. This was succesful, however this kills the GRUB boot partition and indeed the system does not boot after conversion.

I am following this: https://wiki.archlinux.org/index.php/GUID_Partition_Table#Convert_from_MBR_to_GPT

What I need help with now: So right now I seem to have restored my Clonezilla image to the new disk in MBR format and have done and in-place conversion to GPT using gdisk.

I am now looking for guidance on creating the GRUB partition and re-installing GRUB so that the system can boot after conversion.

Once I have this all laid out I can format it to a full step by step answer with all the components together to help others in the future.

Thanks!!

4

Lots of experimentation and trial and error. However here is a tested working solution when restoring my Ubuntu 14.04 MBR image to a 4TB disk:

This should also work if you're just trying to convert a bootable Ubuntu OS disk to GPT (just skip step 1), however in that case ensure you have a backup!!!!

  1. Restore the image like normal with clonezilla. Ignore the error about GPT needed.
  2. Boot into the restored system, the disk is currently MBR so it's 2TB max
  3. Run gdisk <disk> example: gdisk /dev/sda
  4. gdisk will give you a warning that it's MBR and will automatically conver to GPT. Type w and press enter. Confirm the write operation
  5. Go back into gdisk (like in step 3 above)
  6. Type p to print your partition table, the first partition should start on sector 2048 (this is default setup, if yours is different the rest of the steps won't be exact for you)
  7. Type n for a new partition.
  8. When prompted for first sector, choose the lowest number you can (which is probably 34) last sector is 2047 in my case. (right before the start of primary partition) -- Essentially start: 34, end: 2047.
  9. When prompted for the type, choose ef02
  10. p to verify the new partition layout
  11. w to write changes
  12. At the shell: sudo partprobe ignore the warning about the new partition created
  13. At the shell: sudo grub-install <disk> example: sudo grub-install /dev/sda
  14. Reboot, you should be good to go.
  15. Use gparted or any other partition utility to expand over the now available free space. I personally booted to Ubuntu Live CD and used gparted for easy partition growth. Now that the partition is resized, use LVM to extend the LV/FS across the partition like normal.
  • Very good instructions which worked for me. You can also follow this having booted from the old disk, just make sure that you specify the correct (new) disk e.g. /dev/sdb. And in this case before grub-install you must mkdir /mnt/newroot && mount /dev/sdb1 /mnt/newroot then grub-install --root-directory=/mnt/newroot /dev/sdb. After removing the old disk and booting from the new one, I installed growpart (debian/ubuntu: apt-get install cloud-initramfs-growroot), then I could use growpart /dev/sda5 and (as I use LVM) pvresize /dev/sda5 and then lvextend... - all on live system. – gogoud Sep 15 '18 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.