Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/gen-torrent-from-ptcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Author: Date Huang
'''
'''
This script can generate `torrent` from partclone torrent helper
You need to install `python3-libtorrent` in ubnutu or debian like
You need to install `python3-libtorrent` in Ubuntu or Debian like
`apt install python-libtorrent`
It will install `libtorrent-rasterbar` for depend

Expand Down
2 changes: 1 addition & 1 deletion clonezilla.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,7 @@ make install DESTDIR=$RPM_BUILD_ROOT/

* Mon Dec 07 2015 Steven Shiau <steven _at_ clonezilla org> 3.19.3-drbl1
- Allow ocs-install-grub to run when it's a GPT disk with a special "bios_boot" partition exists in the machine using legacy BIOS.
- Use parted to fill the last partitition to the end of disk because there might be some resudial in the calculation of ocs-expand-gpt-pt. Thanks to Conan for this suggestion. Ref: https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/c5e92d87/?limit=25#080c
- Use parted to fill the last partition to the end of disk because there might be some residual in the calculation of ocs-expand-gpt-pt. Thanks to Conan for this suggestion. Ref: https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/c5e92d87/?limit=25#080c

* Mon Nov 23 2015 Steven Shiau <steven _at_ clonezilla org> 3.19.2-drbl1
- Add option "-scs" to be the same option for "-sc" in drbl-ocs and ocs-sr. This will be easier to tell the differences between saving and restoring image.
Expand Down
14 changes: 7 additions & 7 deletions conf/drbl-ocs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ VOL_LIMIT_DEFAULT="0"
# http://en.wikipedia.org/wiki/Megabyte
VOL_LIMIT_IN_INTERACTIVE="0"

# Specify the suffix length for spliting the image file of a partition or LV. By default it's 2, i.e. aa, ab, ac...
# Specify the suffix length for splitting the image file of a partition or LV. By default it's 2, i.e. aa, ab, ac...
# Integer must >= 2.
split_suf_len="2"

Expand Down Expand Up @@ -91,7 +91,7 @@ dd_buffer_size="1048576" # 1 MB
#
# ignore the MBR by using -M, we will ignore the error caused by devfs style
# in /proc/partitions
# now use -z0 and --volume=0 in DEFAULT_PARTIMAGE_SAVE_OPT, we will use partimage stdout and pipe it to use gzip/bzip2/lzop to compress it, not the compression function in partimge. --volume=0 is a must for stdout.
# now use -z0 and --volume=0 in DEFAULT_PARTIMAGE_SAVE_OPT, we will use partimage stdout and pipe it to use gzip/bzip2/lzop to compress it, not the compression function in partimage. --volume=0 is a must for stdout.
DEFAULT_PARTIMAGE_SAVE_OPT="-M -f3 -o -d -b -c -z0 --volume=0"
DEFAULT_PARTIMAGE_RESTORE_OPT="-M -f3 -b"

Expand All @@ -103,7 +103,7 @@ if [ -n "$(LC_ALL=C gzip --help 2>&1 | grep -Ew -- "--rsyncable")" ]; then
rsyncable_opt_gzip="--rsyncable"
fi
extra_gzip_opt="--fast $rsyncable_opt_gzip"
# -1 (fatest), -2, ... -9 (best compression)
# -1 (fastest), -2, ... -9 (best compression)
extra_bzip2_opt="-3"
extra_lzop_opt="-3"
extra_lzma_opt="-3"
Expand Down Expand Up @@ -179,7 +179,7 @@ PARTCLONE_RESTORE_OPT_INIT="-z 10485760"

# The debug_level for partimage
# it's better we turn off the debug mode by default, this will reduce the server's loading.
# It seems in partiamge 0.6.5-beta2, when using --debug=0 to save NTFS partition
# It seems in partimage 0.6.5-beta2, when using --debug=0 to save NTFS partition
# partimage will crash. However, 0.6.5-beta1 works without this problem.
# To avoid this, we set debug_level=1 as default value.
debug_level="1"
Expand All @@ -193,11 +193,11 @@ POSTACTION_DEF="reboot"
# If you are impatient, you can set it as "-f -n" so it will force halt or reboot, don't call shutdown sequence, and do not sync. i.e. poweroff/reboot immediately. Note! This might fail your wake-on-LAN since it's not a normal soft-shutdown.
# In some case (clonezilla live), we might overwrite this option to let it do normal poweroff/reboot.
HALT_REBOOT_OPT=""
# To avoid all the clients notify at almost same time, we use random sleep before send info. This is the maximun time limit (in secs).
# To avoid all the clients notify at almost same time, we use random sleep before send info. This is the maximum time limit (in secs).
NOTIFY_OCS_SERVER_TIME_LIMIT="20"

# OCS_PRERUN_DIR & OCS_POSTRUN_DIR
# Run the script in the direcoty $OCS_POSTRUN_DIR before clone starts and finishes. The command will be run before that assigned in -p or --postaction."
# Run the script in the directory $OCS_POSTRUN_DIR before clone starts and finishes. The command will be run before that assigned in -p or --postaction."
OCS_PRERUN_DIR="$DRBL_SCRIPT_PATH/prerun/ocs/"
OCS_POSTRUN_DIR="$DRBL_SCRIPT_PATH/postrun/ocs/"

Expand Down Expand Up @@ -369,7 +369,7 @@ supp_boot_param_ocs_live_dev="$supp_boot_param_ocs_live_iso noeject"
# live-initramfs uses /live/image.
# For Debian Live 3.x, rootfs is in /lib/live/mount/medium/live/filesystem.squashfs
live_media_path_chklist="/run/live/medium /lib/live/mount/medium /lib/live/image /live/image /live_media /cdrom /run/live/persistence"
# Possible kernel/initrd paths in live CD/USB-disk are /casper (created by casper), /live (created by live-initramfs) or /isolinux (created by live pacakge with casper), or "/" (when using toram="filesystem.squashfs", filesystem.squashfs will be copied to / in the ram disk).
# Possible kernel/initrd paths in live CD/USB-disk are /casper (created by casper), /live (created by live-initramfs) or /isolinux (created by live package with casper), or "/" (when using toram="filesystem.squashfs", filesystem.squashfs will be copied to / in the ram disk).
live_sys_files_dir_list="live / isolinux casper"
# For live-package, it's "/usr/share/make-live/hooks", for live-helper...
live_pkg_hook_dir="/usr/share/make-live/hooks"
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4970,7 +4970,7 @@ clonezilla (3.19.3-drbl1) unstable; urgency=low
* Allow ocs-install-grub to run when it's a GPT disk with a
special "bios_boot" partition exists in the machine using
legacy BIOS.
* Use parted to fill the last partitition to the end of disk because
* Use parted to fill the last partition to the end of disk because
there might be some resudial in the calculation of ocs-expand-gpt-pt.
Thanks to Conan for this suggestion.
Ref: https://sourceforge.net/p/clonezilla/discussion/
Expand Down
2 changes: 1 addition & 1 deletion doc/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4975,7 +4975,7 @@ clonezilla (3.19.3-drbl1) unstable; urgency=low
* Allow ocs-install-grub to run when it's a GPT disk with a
special "bios_boot" partition exists in the machine using
legacy BIOS.
* Use parted to fill the last partitition to the end of disk because
* Use parted to fill the last partition to the end of disk because
there might be some resudial in the calculation of ocs-expand-gpt-pt.
Thanks to Conan for this suggestion.
Ref: https://sourceforge.net/p/clonezilla/discussion/
Expand Down
2 changes: 1 addition & 1 deletion postrun/ocs/00-readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The scripts in this direcoty will be run by run-parts comamnd AFTER ocs-sr starts.
# The scripts in this directory will be run by run-parts command AFTER ocs-sr starts.
# //NOTE//:
# (1) You need to enable the option "-o1" otherwise it won't work.
# (2) The scripts here is nothing to do with the option "-p" or "--postaction" of ocs-sr, and they will be run before that assigned in -p or --postaction."
2 changes: 1 addition & 1 deletion prerun/ocs/00-readme.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The scripts in this direcoty will be run by run-parts comamnd BEFORE ocs-sr starts.
# The scripts in this directory will be run by run-parts command BEFORE ocs-sr starts.
# //NOTE//:
# You need to enable the option "-o1" otherwise it won't work.
2 changes: 1 addition & 1 deletion samples/create-1P-pt-sf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# WARNING!!! WARNING!!! WARNING!!!
# WARNING!!! WARNING!!! WARNING!!!
# YOU HAVE BEEN WARNED!
# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the followiing rules!
# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the following rules!
# THIS PROGRAM WILL DELETE ALL THE DATA IN YOUR DISK!!!

# Settings
Expand Down
2 changes: 1 addition & 1 deletion samples/create-2P-pt-sf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# WARNING!!! WARNING!!! WARNING!!!
# WARNING!!! WARNING!!! WARNING!!!
# YOU HAVE BEEN WARNED!
# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the followiing rules!
# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the following rules!
# THIS PROGRAM WILL DELETE ALL THE DATA IN YOUR DISK!!!

# Settings
Expand Down
2 changes: 1 addition & 1 deletion samples/custom-ocs-1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ocs-prep-repo -t samba_server

# 3. Restore the image
if mountpoint $ocsroot &>/dev/null; then
# Here we use "-p true" (not "-p choose", "-p reboot", or "-p poweroff") to avoid the reboot/poweroff command being run in jfbterm/bterm. Let the ocs-live-final-action and ocs-live-run-menu to take care of the reboot/poweroff actions. Otherwise the Debian live "Press Enter to continue" message after poweroff/shutdown command is issued might be coverd by jfbterm/bterm and user will not have any idea what's happening after ocs-sr is run.
# Here we use "-p true" (not "-p choose", "-p reboot", or "-p poweroff") to avoid the reboot/poweroff command being run in jfbterm/bterm. Let the ocs-live-final-action and ocs-live-run-menu to take care of the reboot/poweroff actions. Otherwise the Debian live "Press Enter to continue" message after poweroff/shutdown command is issued might be covered by jfbterm/bterm and user will not have any idea what's happening after ocs-sr is run.
ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p true restoredisk "ask_user" "ask_user"
else
[ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
Expand Down
2 changes: 1 addition & 1 deletion samples/custom-ocs-3
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ check_from_usb="yes"
# Functions
USAGE() {
echo "$ocs - To save or restore an image from USB device using Clonezilla live"
echo "This prrogram is to save the image from hard drive to 2nd partition of USB flash drive, which contains 2 partitions:"
echo "This program is to save the image from hard drive to 2nd partition of USB flash drive, which contains 2 partitions:"
echo "(1) 1st partition: Clonezilla live, customized with ocs_live_run to run this program."
echo "(2) 2nd partition: image repository, which contains only image."
echo "Usage:"
Expand Down
2 changes: 1 addition & 1 deletion samples/gen-netcfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License: GPL
# Description: This file is used to be assign network configuration based on a data file. It is intended to put as a start up service or put it in the rc.local file.
# The data file contains the list:
# MAC address, IP address, netmask, gateway, DNS, ethetnet port, hostname name.
# MAC address, IP address, netmask, gateway, DNS, Ethernet port, hostname name.
# e.g.
# 00:AA:BB:CC:DD:E1 192.168.1.1 255.255.255.0 168.95.100.254 168.95.1.1 eth0 mars1.domain
# 00:AA:BB:CC:DD:E2 192.168.1.10 255.255.255.0 168.95.100.254 168.95.1.1 eth0 mars2.domain
Expand Down
2 changes: 1 addition & 1 deletion samples/gen-rec-iso
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ while [ $# -gt 0 ]; do
;;
-nogui|--nogui)
shift;
# -nogui is for backward compatable, better to use --nogui
# -nogui is for backward compatibility, better to use --nogui
tui="false"
;;
-x|--extra-boot-param)
Expand Down
4 changes: 2 additions & 2 deletions samples/gen-rec-usb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ USAGE() {
echo "-b, --batch Run image checking in batch mode"
echo "-nogui, --nogui Do not show GUI (TUI) of Partclone or Partimage, use text only"
echo "-p, --preset-dest-dev DEV Preset the destination device when restoring. If not assigned, $preset_dest_dev will be used."
echo "-s, --semi-batch Run image checking in semi-batch mode, i.e. just comfirm once"
echo "-s, --semi-batch Run image checking in semi-batch mode, i.e. just confirm once"
echo "SRC_HARD_DRIVE is the hard drive to be taken as an image, e.g. sda, sdb..."
echo "DEST_USB_FLASH_DRIVE is the USB flash drive partition name, e.g. sdf1, sdg1..."
echo "If no SRC_HARD_DRIVE/DEST_USB_FLASH_DRIVE is specified, a dialog menu will be shown."
Expand Down Expand Up @@ -71,7 +71,7 @@ while [ $# -gt 0 ]; do
;;
-nogui|--nogui)
shift;
# -nogui is for backward compatable, better to use --nogui
# -nogui is for backward compatibility, better to use --nogui
tui="false"
;;
-*) echo "${0}: ${1}: invalid option" >&2
Expand Down
8 changes: 4 additions & 4 deletions samples/mdisks-checksum
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ USAGE() {
echo "-i, --initial-no NO Set the initial number for the label, and it is appended to the prefix assigned by option -p or --label-prefix. By default the initial number is set as $initial_no_def. e.g. my-image_01, my-image_02..."
echo "-nogui, --nogui Do not show GUI (TUI) of Partclone or Partimage, use text only. In this program, only works for saving mode, not restoring mode because for multiple disks deployment, TUI is always off."
echo "-n, --no-resize Do not resize in the destination disk. Keep the size as that from source image. This implies the options '-k1 -r -icds' will not be used for clonezilla's program ocs-sr."
echo "-r, --no-parallel Do not run the checksum inspection in parallel. By default the inspection for all partitions in a disk will be run in parallel. Maybe it's not a good idea to run in parallel if too many partitions so it might casue too many I/Os then less effiency."
echo "-r, --no-parallel Do not run the checksum inspection in parallel. By default the inspection for all partitions in a disk will be run in parallel. Maybe it's not a good idea to run in parallel if too many partitions so it might cause too many I/Os then less efficiency."
echo "-p, --label-prefix PREFIX Set the label prefix for the destination partitions when restoring. This is only for modes 'restore' and 'check-then-label', and it will be used to create a sequential label names for all the partitions on destination disks, like my-image_01p1, my-image_01p2 for disk /dev/sda1, and /dev/sda2, respectively."
echo "MODE is for saving, restoring, checking, labeling. Available: save, restore, check, check-then-label (or ctl)."
echo "IMAGE_NAME is the image dir name, not absolute path"
echo "DEVICE is the device name, e.g. sda, sda... When MODE is 'save', only one disk is allowed. While when MODE is 'restore', more than one disks are accetable."
echo "If IMAGE_NAME and DEVICE are not assigned. An dialog menu will be shown to allow inputing or choosing."
echo "DEVICE is the device name, e.g. sda, sda... When MODE is 'save', only one disk is allowed. While when MODE is 'restore', more than one disks are acceptable."
echo "If IMAGE_NAME and DEVICE are not assigned. A dialog menu will be shown to allow inputting or choosing."
echo "Ex:"
echo "To save disk /dev/sda as the image \"my-image\" with checksum for all files generated, run"
echo " $ocs save my-image sda"
Expand Down Expand Up @@ -77,7 +77,7 @@ do_restore_or_check_mode_ask_image_dev_if_required() {
img_name="$target_dir"
fi
[ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
echo "$msg_the_image_to_be_cheked: $img_name"
echo "$msg_the_image_to_be_verified: $img_name"
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL

if [ "$disk" = "ask_user" ]; then
Expand Down
4 changes: 2 additions & 2 deletions sbin/clonezilla
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ USAGE() {
# Note! OCS_OPT should not use -s/-S/-a/-b/-z/0-6
# because: /sbin/init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ]
echo " -k, --skip-ocs-prep-repo Skip preparing the clonezilla image home directory (assume it's ready), this is specially for device <-> image clone."
echo " -p, --postaction [choose|poweroff|reboot|command|CMD] When save/restoration finishs, choose action in the client, poweroff, reboot (default), in command prompt or run CMD"
echo " -p, --postaction [choose|poweroff|reboot|command|CMD] When save/restoration finishes, choose action in the client, poweroff, reboot (default), in command prompt or run CMD"
echo " -s, --skip-lite-menu Do not show live-server and lite-client in the dialog menu."
echo "Ex. $0 -l en"
} # end of USAGE
Expand Down Expand Up @@ -140,7 +140,7 @@ check_DIA_set_ESC $DIA
#### main ####
##############

# //NOTE// For ocs-sr, the short option for postaction is: -p, while for ocs-onthelfy, it's -pa. Therefore we use "--postaction"
# //NOTE// For ocs-sr, the short option for postaction is: -p, while for ocs-onthefly, it's -pa. Therefore we use "--postaction"
[ -n "$postaction" ] && postaction_opt="--postaction $postaction"
[ "$do_prep_ocsroot" = "no" ] && dev_img_opt="-s"

Expand Down
8 changes: 4 additions & 4 deletions sbin/create-debian-live
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Author: Steven Shiau <steven _at_ clonezilla org>
# License: GPL
# Description: This script will create a Debian live CD iso which is used as a template for clonezilla image with restoration function.
# Description: This script will create a Debian live CD ISO which is used as a template for clonezilla image with restoration function.

#
set -e
Expand Down Expand Up @@ -51,7 +51,7 @@ USAGE() {
echo "OPTION:"
echo "-a, --packages PKG Specify to add PKG, e.g. firmware-bnx2"
echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Specify the DRBL branch to be used in Live CD. Default is stable."
echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified."
echo "-c, --categories CAT Specify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified."
echo "-d, --debian-dist [stable|testing|unstable|lenny|squeeze|wheezy|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned."
echo "-e, --ramfs-size SIZE Use SIZE (bytes) as the size of RAM for working dir. Default is $ramfs_size_def."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586, 686, amd64, arm64 or armhf. If it's not assigned, $cpu_flavor_default will be used."
Expand Down Expand Up @@ -124,7 +124,7 @@ build_it() {
# Don't be confused. It won't be appended. Therefore we have to put all required ones.
$pref lb config --bootappend-live "boot=live union=overlay config username=user"
# Enable cache-indices, by doing this, "apt-get upgrade" won't be run in lb chroot_sources after hook since we might assign older package version when building.
# This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is aviailable, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want.
# This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is available, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want.
$pref lb config --cache-indices true
$pref lb config --cache-packages false
$pref lb config --apt-indices false
Expand All @@ -136,7 +136,7 @@ build_it() {
686*|586*|486*)
# Default bootloaders in live-build is syslinux,grub-efi (for i386/amd64)
# No need to run "$pref lb config --bootloaders syslinux,grub-efi"
# //NOTE// This option "--binary-images" is for template iso only, not for Clonezilla live iso.
# //NOTE// This option "--binary-images" is for template ISO only, not for Clonezilla live ISO.
$pref lb config --binary-images iso-hybrid
# Add those x86 only packages
pkgs="$pkgs $PKG_FROM_DBN_WHICH_OCS_LIVE_NEED_X86_ONLY"
Expand Down
Loading