ocs-onthefly(8)

πŸ“¦ version 5.19.7, in arch rolling, ubuntu stonking

πŸ’– ocs-onthefly β€” the Clonezilla manual page, bestie edition πŸ’–

okay so real talk, this is ocs-onthefly from the Clubzilla… sorry, Clonezilla manual, section 8 (that's the admin/system-commands section, iykyk). She clones disks on the fly. She's iconic. Let's go πŸ¦‹


✨ SYNOPSIS ✨

ocs-onthefly [OPTION]

that's it. that's the whole vibe. one optional-options situation and she's off πŸŽ€


🌸 DESCRIPTION 🌸

ocs-onthefly does "disk to disk" or "partition to partition" cloning on-the-fly, and she does it either locally or over the network. no cap. that's her whole job and she's obsessed with it πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

like. there are a LOT. she's thorough. we respect that. every single one, no skipping, periodt:

  • -b, -batch, --batch, --batch-mode β€” runs the program in batch mode, which is dangerous! 😭 meaning: no prompt, no waiting for you to confirm anything, she just GOES. main character energy, zero safety net.
  • -cmf, --chk-chksum-for-files-in-dev β€” does the files checksum inspection for the cloned files over in the destination devices. she checks her work ✨
  • -d, --destination, --target DEV β€” names the target device as DEV (so like /dev/sdb or sdb, both fine bestie).
  • -e1, --change-geometry NTFS-BOOT-PARTITION β€” forces a change of the CHS (cylinders, heads, sectors) value of the NTFS boot partition after cloning. NTFS-BOOT-PARTITION can be auto or a device name.
  • -e2, --load-geometry-from-edd β€” forces using the CHS from EDD (Enhanced Disk Device) when creating the partition table with sfdisk.
  • -r, --resize-partition β€” resizes the file system size so it fits the partition size on the destination disk. she makes it FIT πŸ’–
  • -f, --source DEV β€” names the source device as DEV (e.g., /dev/sda or sda).
  • -g, --grub-install GRUB_PARTITION β€” installs grub in the MBR. GRUB_PARTITION can be auto or a device name.
  • --net-filter PROGRAM β€” uses PROGRAM (gzip, lzop, bzip2, xz, lz4, zstd, cat) before sending partition data to netcat/nuttcp. only in network clone mode, okay? default is zstd.
  • -nogui, --nogui β€” no GUI (TUI) for you, text only. minimalist queen πŸ™ˆ
  • -rescue, --rescue β€” turns on rescue mode, aka she tries to skip the bad sectors. brave of her honestly.
  • -rvd, --rvd β€” removes the NTFS volume dirty flag in the source NTFS file system before cloning it. clean vibes only.
  • -irhr, --irhr β€” skips removing the Linux udev hardware records on the restored GNU/Linux.
  • -ius, --ius β€” skips updating the syslinux-related files on the restored GNU/Linux.
  • -iui, --iui β€” skips updating the initramfs file(s) on the restored GNU/Linux.
  • -icds, --ignore-chk-dsk-size-pt β€” skips checking the destination disk size before creating the partition table. living on the edge tbh πŸ’€
  • -iefi, --ignore-update-efi-nvram β€” skips updating boot entries in EFI NVRAM after cloning.
  • -k, --no-sfdisk β€” do NOT create the partition table in the boot sector on the target machine. nope. not doing it.
  • -k0 β€” creates the partition table based on the partition table from the source. this one's the default ✨
  • -k1 β€” creates the partition table on the target disk proportionally.
  • -k2 β€” drops you into a command line prompt so you can create the partition table manually before cloning. DIY queen πŸŽ€
  • -j2, --clone-hidden-data β€” uses dd to clone the image of the data sitting between the MBR (1st sector) and the 1st partition. the secret little in-between zone 🫢
  • -m, --no-boot-loader-clone β€” do NOT clone the boot loader.
  • -o, --load-geometry β€” forces using the saved CHS (cylinders, heads, sectors) when using sfdisk.
  • -q1, --force-to-use-dd β€” forces a sector-by-sector copy. it's slow, but it works for all filesystems. worth it sometimes, fr fr.
  • -po, --port PORT β€” specifies the netcat port. only in network clone mode, bestie.
  • -p, -pa, --postaction ACTION β€” what she does when cloning finishes: [choose|poweroff|reboot|true|CMD].
  • -a, --server β€” declares that the machine she's running on IS the network clone server. she said "I'm the server now" πŸ’…
  • -s, --source-IP IP β€” specifies the source IP address. this one's used on the target client machine.
  • -t, --no-restore-mbr β€” do NOT restore the MBR.
  • -t1, --restore-raw-mbr β€” restores the prebuilt bootloader from syslinux. (For Windows only, okay?)
  • -t2, --no-restore-ebr β€” do NOT restore the EBR.
  • -v, --verbose β€” prints verbose information. she tells you EVERYTHING 🌈
  • -np, --net-pipe PROGRAM β€” uses PROGRAM as the network pipe program. available: netcat, nuttcp.
  • -x, --interactive β€” interactive mode.
  • -bm, --beginner-mode β€” runs in beginner mode. it's a shortcut for "-um beginner" 🐣
  • -em, --expert-mode β€” runs in expert mode. it's a shortcut for "-um expert" πŸ‘‘
  • -um, --user-mode [beginner|expert] β€” specifies the user mode.
  • -edio, --enable-direct-io β€” enables the direct IO mode of Partclone for NVMe SSD. spicy fast path πŸ”₯

🧚 EXAMPLES 🧚

1. to clone local sda to local sdb:

ocs-onthefly -f sda -d sdb

2. to clone sda from machine A (IP 192.168.100.1) to sda on machine B via the network:

on machine A:

ocs-onthefly -a -f sda

on machine B:

ocs-onthefly -s 192.168.100.1 -d sda

see? cute little duo. one server, one target, and they're communicating 🫢✨


πŸ“ FILES πŸ“

  • /etc/drbl/drbl-ocs.conf β€” the configuration file for Clonezilla. her little settings notebook πŸ““

πŸ”₯ SEE ALSO πŸ”₯


πŸ’œ AUTHORS πŸ’œ

Steven Shiau <steven _at_ clonezilla org> β€” the icon who made this all happen. we love him, no debate πŸ’…


and that's the whole page bestie!! this was the Clonezilla manual's ocs-onthefly(8), dated 2026-05-03 β€” yes, the source/version line is literally just "Clonezilla Β· 2026-05-03 Β· ocs-onthefly(8)" and I'm folding it in right here at the bottom because that's the vibe check we were given ✨ go clone something (carefully, the -b thing is dangerous!!) and stay iconic πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from