0

I have an Acer Aspire R laptop with 260GB SSD, UEFI, Ubuntu and Windows 10 dual boot. How can I backup / clone / image the whole drive to be reinstalled on a new drive if current drive fails?

  1. Clonezillla: Will it backup all partitions (EFI, recovery, Ubuntu, swap, Windows) to external drive, so I can restore it to a new drive, no problem? Which file system should the external drive have?
  2. GParted: Or should I partition the external drive like the existing drive and copy the partitions with gparted?
3
  • StackOverflow is dedicated to helping solve programming code problems. Your Q seems more appropriate for superuser.com , but read their help section regarding on-topic questions . AND please read Help On-topic and Help How-to-ask before posting more Qs here. Good luck.
    – shellter
    Commented Nov 5, 2019 at 19:28
  • @shellter: Ah, I forgot about superuser. How can I migrate it? Commented Nov 5, 2019 at 21:14
  • Answer below seems OK. Be sure to upvote and/or accept it if solves your problem. I wouldn't bother trying to migrate if you this solves your problem. But if not, then you can flag it for moderator to move, but that can take a while. I would just delete and repost on SuperUser. DONT cross post! OK? ;-) Good luck.
    – shellter
    Commented Nov 5, 2019 at 22:27

1 Answer 1

1

You can use Clonezilla to make a bootable copy of the whole existing SSD with all of its partitions including Windows.

The boot menu comes from Grub2 and it gets created from templates in /etc/grub.d and settings from /etc/default/grub.

So, if your Clonezilla ISO file lives at /srv/iso/clonezilla-live-disco-amd64.iso and /srv directory lives in hard drive 0 in partition 13, then create a new executable file in /etc/grub.d, such as 40_clonezilla and put the following in it:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Clonezilla live" {
set root=(hd0,13)
set isofile="/iso/clonezilla-live-disco-amd64.iso"
loopback loop $isofile 
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" keyboard-layouts= ocs_live_batch=\"no\" locales= vga=788 ip=frommedia nosplash toram=live,syslinux,EFI findiso=$isofile
initrd (loop)/live/initrd.img
}

Then, run update-grub to regenerate your grub menu.

When you reboot, you will have a new boot option that boots from Clonezilla, and, from there, you can make a bootable copy of the existing hard-drive onto an external drive and overwrite whatever is already on that external drive.

All of this stuff, editing Grub templates and overwriting drives is quite dangerous and the penalty for getting something wrong is high.

2
  • Just to verify: The first part of your answer describes how to boot into Clonezilla? Can't I make a bootable USB flashdrive (or CD) for Clonezilla, boot into that, connect an external HD and save the image to that? Commented Nov 5, 2019 at 19:02
  • That's another way to solve this problem. If Clonezilla lives on the disc that is getting copied, then it can be thought of it as a self-contained system without a dependency.
    – geru
    Commented Nov 6, 2019 at 16:21

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