I'm trying to create an image copy of my bootable partition of Lubuntu 14.04 (/dev/sda1) to another partition on the same physical disk ( /dev/sda3), using Clonezilla (20140518), and selecting device-image option; but it's failing with an error message warning there are no umounted disks. Does anybody know if I can do this using the same disk or do I need to have a second disk?
-
You need to do a partition image not a device image. I honestly can't say if it will boot or not, but I'm dying to know. – please delete me Jun 27 '14 at 04:02
-
@unorthodoxgrammar It will not work on legacy setups, because there is only one bootloader which jumps to a specified address, which is usally the beginning of a partition where it expects to find further information to continue booting. Booting multiple operating systems with GRUB on leagcy systems is a really clever hack, but still a hack. Legacy systems bootoptions are still limited. See also: "The boot loader itself is split into multiple stages, allowing for itself to fit within the MBR boot scheme." – LiveWireBT Jun 27 '14 at 05:57
1 Answers
I'd say this depends on the bootloader type.
MBR and volume bootloaders
It's a no for BIOS/MBR, because you would have to re-install the bootloader and configure the clone to boot from the partitions volume bootloader instead of the MBR (target for grub-install
would be the partition e.g. sda2
instead of sda
). Attempting to do this GRUB2 will complain with the following message:
Attempting to install GRUB to a partition disk or to a partition. This is a BAD idea.
Embedding is not possible. GRUB can only be installed in this setup by using blocklists.
However, blocklists are UNRELIABLE and their use is discouraged.
http://wiki.gentoo.org/wiki/GRUB2#Attempting_to_install_GRUB_to_a_disk_or_a_partition
So chaining bootloaders on one drive is possible but unsafe since GRUB2. Leaving only the option of one installation managing the bootloader and it's configuration (like os-prober
generated entries).
UEFI bootloader stubs, just copy files
For UEFI/GPT it's easier. You wouldn't even need to create a raw disk image. You could just copy/rsync contents from one partition to the other when using live media. Then copy contents of your ESP (e.g. \EFI\ubuntu
to \EFI\ubuntu2
) and modify the configuration file for GRUBs EFI stub. Mine lookes like this:
$ cat /boot/efi/EFI/ubuntu/grub.cfg
search.fs_uuid e6822878-8045-43a6-ae17-6a45686afe4f root hd0,gpt2
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
You would just need to change the UUID of the filesystem e6822878-8045-43a6-ae17-6a45686afe4f
and partition hd0,gpt2
(e.g. hd0,gpt3
). Also don't forget to register the new EFI bootloader in UEFI NVRAM with efibootmanager
. I also recommend installing a default UEFI bootloader like gummiboot.
My experience
UEFI is really a leap forward. No more raw images (which take longer) or fiddling with dd
. Just copy files and register stubs in NVRAM. But as always, if you buy crappy hardware, it might get complicated, like your UEFI implementation has trouble booting anything else than Windows.

- 28,763
-
Thanks for your reply!! I understood the limitations and your proposed solution...As I'm not a Linux expert ( yet)....I was looking for the simplest way to backup my customized system image, similar to what we can do using Symantec Ghost on windows XP. If you have any other tip or suggestion, please advise. Thank you! – user298225 Jun 28 '14 at 13:23