I used android-tools package from Archlinux repo for adb and fastboot utilities.

How to install any recovery, phone should be connected to PC with USB debugging enabled:

# adb reboot fastboot
# fastboot flash recovery <name of .img file>
# fastboot reboot-recovery

You can upload files to phone in recovery state by this command:

# adb push <name of file> /sdcard/

I do not know how to change bootloader settings in Xiaomi without CWM recovery, that is why I installed it.

Successful migration was achieved after these steps:

  1. Install CWM recovery
  2. In recovery switch bootloader to /system, not /system2
    This step here because on my phone MIUI was on /system2, but recovery installs Cyanogenmod to /system. That was reason for booting MIUI after CyanogenMod installation and overwriting freshly installed recovery with stock one. I did not found anyone with the same issue in the net, most likely you don’t need this.
  3. Wipe caches and /system, wiping /system2 is not necessery
  4. Install TWRP recovery
  5. Upload Cyanogenmod .zip archive for cancro
  6. Install and reboot