Can I restore a partition image to a different sized partition?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
User avatar
Lijin
Level 1
Level 1
Posts: 2
Joined: Wed Aug 10, 2016 6:27 am

Can I restore a partition image to a different sized partition?

Post by Lijin » Wed Aug 10, 2016 6:46 am

I had Linux Mint installed on a partition with size 10 GB. Since I was out of space, I tried to resize partition using GParted from Live boot. I had 10 GB unallocated space. But I failed to resize since the linux partition was out of extended partition and unallocated space was inside extended partition. So I used Clonezilla to create a partition image of the linux partition only. It's all history now. I managed to delete the Linux partition of 10GB and merged 10 GB unallocated space to an already existing partition. And then I created a new partition of 20 GB by shrinking the already existing partition.

Sorry for the long paragraph, my question is that, can I restore the linux partition image (partition size was 10 GB) created using Clonezilla to the newly created 20 GB partition? I have not backed up the whole hard disk, but backed up the single linux partition which had Linux Mint.

User avatar
Reorx
Level 11
Level 11
Posts: 3931
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: Can I restore a partition image to a different sized partition?

Post by Reorx » Wed Aug 10, 2016 7:10 am

Yes you can restore the image to a larger partition... but it probably won't boot as you have probably broken GRUB and changed at least some fstab references. After the restoration to the larger partition, you will have to repair GRUB and fstab but if you are able to do that, it should boot as before. I don't know the details of the repairs but I am sure another forum member will come along to describe the process if you are interested in pursuing this option.
Full time Linux Mint user since 2011 - Currently running LM19 Cinnamon.

Image Image

User avatar
Lijin
Level 1
Level 1
Posts: 2
Joined: Wed Aug 10, 2016 6:27 am

Re: Can I restore a partition image to a different sized partition?

Post by Lijin » Wed Aug 10, 2016 7:37 am

Reorx wrote:Yes you can restore the image to a larger partition... but it probably won't boot as you have probably broken GRUB and changed at least some fstab references. After the restoration to the larger partition, you will have to repair GRUB and fstab but if you are able to do that, it should boot as before. I don't know the details of the repairs but I am sure another forum member will come along to describe the process if you are interested in pursuing this option.
Thanks for the reply. It sounds promising. I'll wait here for experts to guide me how to repair grup after restoration

User avatar
austin.texas
Level 20
Level 20
Posts: 12054
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Can I restore a partition image to a different sized partition?

Post by austin.texas » Wed Aug 10, 2016 8:27 am

I have (many times) cloned a Mint / partition to a different hard drive. I used to repair Grub the usual manual way, which is a bit complicated. Now I do it the easy way.
See: http://www.dedoimedo.com/computers/grub ... ocId905459
The first suggestion on that page is the easy way (as it says...) - "Easy way: Super Grub Disk". http://www.supergrubdisk.org
The new Rescatux CD (version 0.40) does not include SuperGrub2. You have to download the SuperGrub2 CD .iso separately. Burn the .iso to a CD. Boot the computer with the SuperGrub2 CD.
Chose "Boot Manually" from the first menu, then "Operating Systems".
The program will search your drives for your installed operating systems and create a menu for you that will allow you to boot any one of them. It will be a slow process to search your drives and create that menu, so be patient and let it complete.
Then after you use that menu to boot into your new Mint, run the following commands in a terminal:

Code: Select all

sudo update-grub

Code: Select all

sudo grub-install /dev/sdX 
- where X is the drive you want to install Grub to. (The drive Mint is on. sda? sdb?)

You will still have to edit /etc/fstab for the new partition UUID. Enter

Code: Select all

sudo blkid
to list the new UUID number.
In addition to editing /etc/fstab, also run the command

Code: Select all

sudo update-initramfs -u
Tutorial and Troubleshooting with SuperGRUB2:
http://www.supergrubdisk.org/wiki/SuperGRUB2Disk
http://www.supergrubdisk.org/wiki/Boot_Problems

IMHO, this is preferable to the "chroot" method of repairing Grub, because it is easier to understand and less intrusive, with fewer possiblities for errors.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

Post Reply

Return to “Installation & Boot”