Clonezilla: Difference between revisions
| Line 2: | Line 2: | ||
== USB Setup == | == USB Setup == | ||
To set up a USB key with Clonezilla: | 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 stick so it looks something like this. Set the type to 'b' and make it bootable with 'a'. | Partition a USB stick so it looks something like this. Set the type to 'b' and make it bootable with 'a'. | ||
Revision as of 18:00, 1 September 2017
Clonezilla is a disk imaging distro.
USB Setup
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 stick so it looks something like this. Set the 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 using the built in script
# cd /mnt/usb/utils/linux
# bash makeboot.sh /dev/sdg1
Automated Imaging
To automatically reimage a computer on boot (either via PXE or USB), create a boot entry that contains the restore (or imaging) command in the ocs_live_run parameter.
For example, on a USB drive, I wanted to reimage the computer using the image located in /partimag/latest-nvidia:
label Clonezilla auto ttuff
# MENU HIDE
MENU LABEL Clonezilla Auto TTuff
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live union=overlay username=user hostname=yakkety 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/latest-nvidia 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