Cloning Linux Systems With CloneZilla Server Edition (CloneZilla SE) - Page 4

On this page

  1. 5 Troubleshooting
  2. 6 Links

Fill in the max. time (in seconds) that the server will wait until all clients are powered on (i.e., if you want to restore the image on ten clients, you have 300 seconds to power on the other nine computers after you have powered on the first one - if you are too slow, CloneZilla will start to restore the image only on the systems that have been powered on in time):

Afterwards, press ENTER twice:

Now power on the clients. Make sure they are configured to boot from the network (via PXE):

In the boot menu, select Clonezilla: multicast restore:

The cloning process will then begin:

Afterwards, the server will be notified that the process has finished...

... and the client system will reboot:

Before the client system boots, enter its BIOS again and configure it to boot from the hard drive!

If all goes well, the computer should boot into the cloned operating system.

 

5 Troubleshooting

It is possible that you see this message during the restore:

Failed to install grub

and that the system will not boot afterwards:

Grub
error 2

(I've had this with Ubuntu systems.)

The solution is to boot into a rescue system (e.g. Knoppix or the Ubuntu Live-CD) and install GRUB from the rescue system.

Once Knoppix or the Ubuntu Live system has started, open a terminal and become root:

Knoppix:

su

Ubuntu:

sudo su

Run

fdisk -l

to learn more about your partitioning:

[email protected]:~# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3749    30113811   83  Linux
/dev/sda2            3750        3916     1341427+   5  Extended
/dev/sda5            3750        3916     1341396   82  Linux swap / Solaris
[email protected]:~#

In this example, I have one big partition (/dev/sda1) that also contains the /boot directory (the Boot column is marked with a star).

I will now mount that partition to the /mnt directory:

mount /dev/sda1 /mnt
mount -o bind /dev /mnt/dev
mount -o bind -t proc /proc /mnt/proc

(If you have a separate /boot partition, e.g. /dev/sda2, you'd mount it to /mnt/boot after you have mounted /dev/sda1 to /mnt.)

Now we install GRUB as follows:

chroot /mnt grub-install --no-floppy "(hd0)"

This will give you the following error:

[email protected]:~# chroot /mnt grub-install --no-floppy "(hd0)"
You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!

/dev/sda1 does not have any corresponding BIOS drive.
[email protected]:~#

To overcome the error, run

chroot /mnt grub-install --no-floppy "(hd0)" --root-directory=/ --recheck

[email protected]:~# chroot /mnt grub-install --no-floppy "(hd0)" --root-directory=/ --recheck
You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!

Probing devices to guess BIOS drives. This may take a long time.
Installing GRUB to (hd0) as (hd0)...
Installation finished. No error reported.
This is the contents of the device map //boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
[email protected]:~#

That's it - now reboot...

reboot

... and don't forget to remove the Knoppix or Ubuntu CD from the CD drive. If everything goes well, the GRUB error should be gone, and the system should boot without any problems.

 

Share this page:

Suggested articles

4 Comment(s)

Add comment

Comments

By: netphreak

Thank you so much for making this tutorial! Greatly appreciated!

Though, the main reason for using Clonezilla is that it can restore many computers at once. If the bootloader becomes corrupt during restore - my interset is gone. I won't manually install new bootloader on all the computers - it will be a timesaver using PING (Partimage Is Not Ghost) and restore from DVD's instead.

I would really like to know why this happens? There must be a reason. How to prevent it? From what I can see, PING uses a very similar way of cloning PC's - but the bootloader doesn't get corrupted!

-net

By: Anonymous

I guess I don't understand.  Why would I use this, instead of kickstart or preseed?

By: Anonymous

Brilliant article! You have clarified quite a bit i was somewhat uncertain about regarding Clonezilla cheers mate :)

By: Chris

I would love to set this up using my Ubuntu 11.04 Server as a main backup point for my three Windows boxes, and have it all be totally automatic. I have scripts to wake the PC's up and shut them back down, and setting them to PXE boot is trivial. I follow on how to set up the PXE server on my Linux box, setting up DRBL, etc, but every tutorial I read on how to actually BACK UP the client has things like "Press Enter", select this, click that. I see that there is a command line option for CloneZilla and after you go through the process of selecting everything, I see it gives you command line output of what to put in next time.

I suppose my question is, as I am a bit of a newbie here, how would one go about setting up a totally, utterly, completely unattended bare metal backup of three machines with multiple hard drives every single night? I know how to set up cron jobs and I have seen many articles on backup rotation and it shouldn't be too hard to modify a script to change the filenames of the backups, but how (is it possible) to configure something on the client end to do all of the above?

Thank you all ever so much for writing such great articles.

Chris