|Kernel boot parameters are text strings which are interpreted by the system to change specific behaviors and enable or disable certain features.
Different boot loaders use different config files for the boot parameters:
- For Clonezilla live booting from CD on a MBR machine, isolinux is the boot loader. Therefore the config file is /isolinux/isolinux.cfg.
- For Clonezilla live booting from USB flash drive on a MBR machine, syslinux is the boot loader. Therefore the config file is /syslinux/syslinux.cfg.
- For Clonezilla live booting from PXE on a MBR machine, pxelinux is the boot loader. The config file is on the PXE server, and is configured by the system administrator. it could be something like /tftpboot/nbi_img/pxelinux.cfg/default, or different file.
- For Clonezilla live booting from a uEFI machine, grub2 is used. Therefore the config file is /EFI/boot/grub.cfg.
We now describe the kernel boot parameters related to Clonezilla live. If you want to modify the boot parameters, make sure you edit the right config file.
Clonezilla live is based on Debian live with clonezilla installed. Therefore there are 2 kinds of boot parameters:
- Boot parameters from Debian live-boot and live-config. You can refer to the manual of live-boot and manual of live-config..
- Boot parameters specially for Clonezilla. All of them are named as "ocs_*", e.g. ocs_live_run, ocs_live_extra_param, ocs_live_batch.
- ocs_live_run is the main program to run in Clonezilla live to save or restore. or other command. Available program: ocs-live-general, ocs-live-restore or any command you write. Use the Absolute path in Clonezilla live.
//NOTE// You might have to use "sudo" command inside your own script, or you can assign it like: ocs_live_run="sudo bash /my-clonezilla"
- ocs_live_extra_param will be used only when ocs_live_run=ocs-live-restore (not for ocs-live-general or any other), then it will be passed to ocs-sr. Therefore these parameters are actually those of ocs-sr.
e.g. ocs_live_extra_param="--batch -c restoredisk sarge-r5 hda"
- To preset the keyboard layout, use "keyboard-layouts" from live-config.
e.g. keyboard-layouts=NONE (won't change the default layout, which is US keyboard)
keyboard-layouts=fr (French keyboard)
//NOTE// The ocs_live_keymap used in Clonezilla live 1.x is deprecated. The following description is only for reference.
ocs_live_keymap is for keymap used in Clonezilla live. Man install-keymap for more details.
e.g. ocs_live_keymap="NONE" (won't change the default layout)
ocs_live_keymap="/usr/share/keymaps/i386/azerty/fr-latin9.kmap.gz" (French keyboard)
- batch mode or not (yes/no), if no, will run interactively.
- To preset the language, use "locales" from live-config.
//NOTE// The "ocs_lang" used in Clonezilla live 1.x is deprecated.
- ocs_debug (or ocs-debug) is for you to enter command line prompt before any clonezilla-related action is run. This is easier for you to debug.
- ocs_daemonon, ocs_daemonoff, ocs_numlk, ocs_capslk.
Ex. for the first 2 parameters, ocs_daemonon="ssh", then ssh service will be turned on when booting. For the last 2 parameters, use "on" or "off", e.g. ocs_numlk=on to turn on numberlock when booting.
- ocs_prerun, ocs_prerun1, ocs_prerun2... is for you to run a command before Clonezilla is started. E.g. ocs_prerun="/live/image/myscript.sh". If you have more commands to run, you can assign them in the order: ocs_prerun=..., ocs_prerun1=..., ocs_prerun2=.... If more than 10 parameters, remember to use ocs_prerun01, ocs_prerun02..., ocs_prerun11 to make it in order.
- ocs_postrun, ocs_postrun1, ocs_postrun2... is for you to run a command after Clonezilla job is done, E.g. ocs_postrun="/live/image/myscript.sh". If you have more commands to run, you can assign them in the order: ocs_postrun=..., ocs_postrun1=..., ocs_postrun2=.... If more than 10 parameters, remember to use ocs_postrun01, ocs_postrun02..., ocs_postrun11 to make it in order.
- echo_ocs_prerun and echo_ocs_postrun are used to echo the commands of prerun and postrun. By default the command assigned in ocs_prerun or ocs_postrun will be echoed. By using "no" the command won't be echoed. This is useful when you want to hide some commands.
e.g. echo_ocs_prerun="no" (Will not show the commands assigned in boot parameter "ocs_prerun").
- ocs_live_run_tty. This option allows you to specify the tty where $ocs_live_run is run. By default $ocs_live_run is run on /dev/tty1 only. If you want to use ttyS0, for example, add live-getty and console=ttyS0,38400n81 in the boot parameter.
- If "live-getty console=ttyS0,38400n81" are assigned in the boot parameters, ocs_live_run_tty will honor ttyS0, even other value is assigned to ocs_live_run_tty in boot parameter.
- It's recommended to assign locales and keyboard-layouts in the boot parameters too.
- ip, this option allows you to specify the network parameters for network card. In Clonezilla live a patched live-initramfs is used, which is different from the original live-initramfs so that you can assign DNS server, too. Its format is: ip=ethernet port,IP address, netmask, gateway, DNS. E.g. If you want to assing eth0 with IP address 10.0.100.1, netmask 255.255.255.0, gateway 10.0.100.254, DNS server 22.214.171.124, you can assign the following in the boot parameter:
If more than one network card, you can use "," to separate them, e.g.:
- Besides, "live-netdev" (yes, not ocs_live_netdev) can be used when using PXE booting, you can force to assign the network device to get filesystem.squashfs. This is useful when there are two or more NICs are linked. E.g. live-netdev="eth1" allows you to force the live-initramfs to use eth1 to fetch the root file system filesystem.squashfs.
You can find some examples about using these boot parameters in the Clonezilla Live Doc.