Skip to content

Instantly share code, notes, and snippets.

@kleo
Created February 3, 2021 10:19
Show Gist options
  • Select an option

  • Save kleo/98d6cd04b79f3ef1745b33f4c08afcb6 to your computer and use it in GitHub Desktop.

Select an option

Save kleo/98d6cd04b79f3ef1745b33f4c08afcb6 to your computer and use it in GitHub Desktop.
Clonezilla clone sda to sdb
#!/bin/bash
# Make sure that sda is the source by placing the source SATA cable on the first SATA port number
# You will need 1.) clonezilla live
# 2.) a working space for saving our custom clonezilla iso, a flashdrive or any other storage medium
# Needed when cloning later
# 3.) source drive (sda)
# 4.) target drive (sdb)
#
# follow https://clonezilla.org/advanced/customized-clonezilla-live.php
/usr/sbin/ocs-onthefly -batch -g auto -e1 auto -e2 -r -j2 -sfsck -p poweroff -f sda -d sdb
# finally create our custom clonezilla iso
# ocs-iso -g en_US.UTF-8 -k NONE -s -m ./dupe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment