Hi Michael,
Thank you very much for sharing this. It's nice to know Clonezilla rocks
for you.
As for the restoring image to smaller partition, well, that's really a
different story because the imaging engine we have developed, Partclone,
is a block-based program. It's not file-based. Therefore there is such a
limitation. This is described here:
http://drbl.org/faq/fine-print.php?path=./2_System/25_restore_larger_disk_to_smaller_one.faq#25_restore_larger_disk_to_smaller_one.faq

Steven.

On 07/31/2015 08:31 PM, Michael Munger wrote:
> Not sure where to post this, but I wanted to share the love for
> Clonezilla as well as post a mini-howto where Googler's can find it.
>
> After replacing a motherboard, my Debian 8 box would not boot. This is
> my primary workstation for development, sysadmin stuff, etc... so this
> was a big deal. The motherboard had to be replaced because it was new
> (from Amazon), but right out of the box, one of the memory slots was
> bad. Amazon didn't have anymore stock, so I had to wait... they give you
> 30 days, and long story short, I had to buy a replacement locally at the
> last minute to ensure I was able to return the bad board to Amazon.
>
> I powered down via a normal shutdown, swapped the new Asus Sabertooth
> X99 for the old one, put everything back together, and powered on.
>
> It wouldn't boot. Of course, I wasted a lot of time unsure about whether
> or not this was a motherboard problem or a system problem. Since the
> system had been working fine to that point, I wasted several hours
> screwing around with secure boot and other options before finally
> deciding it was probably the OS.
>
> Repairing the EFI / boot partition failed. Grub was dead. Nothing
> worked. Enter Clonezilla.
>
> I decided to clone /dev/sda2, my root partition, as a backup, and
> re-install. I figured: "I should be able to re-install, then restore
> that partition to the root, and get everything back."
>
> I cloned /dev/sda2 without issue to two places: a spare internal drive
> and an external drive (just in case), then reinstalled Debian 8.1.
>
> Once it was up and booting, I tried to restore /dev/sda2 from the
> backup, but the new installation of the OS was 10GB too small, and
> Clonezilla didn't want to do the restore (Frustrating - Steven, why is
> that? Old versions of Ghost would let you size / re-size the restore.
> Why doesn't CZ? ).
>
> I powered down, and booted up with a live ISO on USB (Debian 8.1 Live),
> fired up gparted, and looked at the partition table. I decided I could
> steal 10GB from the swap partition. So, I delete the swap partition and
> the root partition, then added them back in with the correct size. (When
> CZ complained that the root file system partition was too small, it gave
> me the exact size it "used to be", which was very helpful here). Then, I
> created a swap partition with the remaining space.
>
> Now, restoring /dev/sda2 worked without issue. But we still weren't
> home-free. The restore worked, and the system booted, but it immediately
> went into emergency mode because "Dependency failed for local file
> system" - among other things.
>
> I figured it couldn't find the swap partition since I killed the one
> created at install time.
>
> So, via rescue mode, I checked /etc/fstab and compaired the UUIDs there
> with blkid, and sure enough (as I suspected) the swap partition UUID was
> different since I had stolen space from the originally installed one.
> When I deleted it and created a new one, it got a new UUID (as it should
> have). So, I just changed the UUID value for the swap partition, saved,
> and rebooted.
>
> The system came up without issue, and 5 minutes later, I was writing
> this email to thank Steven for Clonezilla and put this out there for
> anyone else Googling around on how to fix a broken system.

-- 
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/47CF935C
Fingerprint: 0240 1FEB 695D 7112 62F0  8796 11C1 12DA 47CF 935C


------------------------------------------------------------------------------
_______________________________________________
Clonezilla-live mailing list
Clonezilla-live@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clonezilla-live

Reply via email to