Clonezilla: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Clonezilla is a disk imaging | Clonezilla is a disk imaging Linux distribution that can be live booted from a USB, CD, or network. | ||
== USB | == USB == | ||
For other ways to set up a | For other ways to set up a Clonezilla USB drive, see http://clonezilla.org/liveusb.php. | ||
To set up a USB key with Clonezilla manually | To set up a USB key with Clonezilla manually, partition a USB drive with one FAT32 partition. If using {{code|fdisk}} to partition, set the partition type to 'b' and make it bootable with 'a'. | ||
{{highlight|lang=terminal|code= | {{highlight|lang=terminal|code= | ||
| Line 25: | Line 23: | ||
}} | }} | ||
Download the | Download the Clonezilla zip archive, then extract it to the USB drive. | ||
{{highlight|lang=terminal|code= | {{highlight|lang=terminal|code= | ||
| Line 32: | Line 30: | ||
# cd /mnt/usb | # cd /mnt/usb | ||
# tar -xzf ~/clonzilla*zip | # tar -xzf ~/clonzilla*zip | ||
}} | |||
Install the MBR on the USB drive using the included script. | |||
{{highlight|lang=terminal|code= | |||
# cd /mnt/usb/utils/linux | # cd /mnt/usb/utils/linux | ||
# bash makeboot.sh /dev/sdg1 | # bash makeboot.sh /dev/sdg1 | ||
Revision as of 22:14, 29 November 2018
Clonezilla is a disk imaging Linux distribution that can be live booted from a USB, CD, or network.
USB
For other ways to set up a Clonezilla USB drive, see http://clonezilla.org/liveusb.php.
To set up a USB key with Clonezilla manually, partition a USB drive with one FAT32 partition. If using fdisk to partition, set the partition type to 'b' and make it bootable with 'a'.
# fdisk /dev/sdg
Command (m for help): p
Disk /dev/sdg: 28.9 GiB, 31004295168 bytes, 60555264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x10cfca7b
Device Boot Start End Sectors Size Id Type
/dev/sdg1 * 2048 60555263 60553216 28.9G b W95 FAT32
## Format the drive
# mkfs.vfat -F 32 /dev/sdg1
Download the Clonezilla zip archive, then extract it to the USB drive.
# wget http://gigenet.dl.osdn.jp/clonezilla/68244/clonezilla-live-20170829-zesty-i386.zip
# mount /dev/sdg1 /mnt/usb
# cd /mnt/usb
# tar -xzf ~/clonzilla*zip
Install the MBR on the USB drive using the included script.
# cd /mnt/usb/utils/linux
# bash makeboot.sh /dev/sdg1
Network Boot / NFS
Clonezilla can be booted via PXE over NFS. First, download the Clonezilla zip package and extract it to a directory that is exported via NFS. Then, add the following menu entry to the pxelinux.cfg menu:
LABEL ClonezillaAlt
MENU LABEL ClonezillaAlt
kernel boot/clonezilla
append initrd=boot/clonezilla.img nfsroot=X.X.X.X:/data/pxe/clonezilla-alt union=aufs netboot=nfs ocs_live_keymap boot=live vga=788 noswap ocs_live_batch=no ocs_live_extra_param ocs_lang ocs_live_run=ocs-live-general live-config hostname=ClonezillaAlt domain=local.lan suite=generic26
IPAPPEND 2
Replace X.X.X.X with the NFS server hostname/IP address and ensure that the NFS path leads to the zip contents.
Automated Imaging
You can automatically image a drive or restore an image by using the ocs_live_run option that is passed to the kernel on boot. This will work with PXE or USB.
To do this on a USB stick, create a boot entry in syslinux/syslinux.cfg that contains the restore (or imaging) command specified by the ocs_live_run parameter. On an EFI system, you will want to edit /EFI/boot/grub.cfg instead.
To restore an image located in /partimag, create a boot entry similar to the one below:
...
# simple menu title
MENU TITLE clonezilla.org, clonezilla.nchc.org.tw
# Automatic Restore for display-v1.1
label Clonezilla restore display
# MENU DEFAULT
# MENU HIDE
MENU LABEL Clonezilla Restore Display v1.1
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live union=overlay username=user hostname=zesty config components noswap edd=on nomodeset noeject locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -icds -j2 -p reboot restoredisk ../../lib/live/mount/medium/partimag/display-v1.1 sda" ocs_live_extra_param="" ocs_live_batch="no" vga=788 ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
TEXT HELP
Automatically images from USB for the TTuff 1U computer
ENDTEXT
label Clonezilla live
...
If you want the entry to boot by default, uncomment the MENU DEFAULT line and then comment out the one that is.