Back to the main page

Reinstall OCI instance from Cobbler using Koan


Koan stands for "kickstart-over-a-network" and is a client-side helper program for use with Cobbler. Koan allows network provisioning of new a VM and re-installation of an existing system.

OCI instance

In this example, create OCI instance (OL7.5). Install koan, v2.8.3.

Console connection

Create console connection (serial console) for OCI instance, can be done via web. Attach public ssh key. Start serial console, OCI console will provide this command (use "-i key" in both ssh commands)

# ssh -i id_rsa \
  -o ProxyCommand='ssh -i id_rsa-o2c -W %h:%p -p 443' \

Oracle Linux Server 7.5
Kernel 4.14.35-1818.2.1.el7uek.x86_64 on an x86_64
oci-instance login:

Cobbler server

To learn more about Cobbler server (from OCI instance), by using koan command.

List distros

# koan --list=distros

- looking for Cobbler at

List profiles

# koan --list=profiles

- looking for Cobbler at

Get profile details

# koan  --display --profile=ATT_OL6.9-x86_64

- looking for Cobbler at
- reading URL:
install_tree: http://10.x.x.x/cobbler/links/OL-R6-U9-x86_64
                name  : ATT_OL6.9-x86_64
              distro  : OL-R6-U9-x86_64
           kickstart  : http://10.x.x.x/cblr/svc/op/ks/profile/ATT_OL6.9-x86_64
             ks_meta  : tree=http://@@http_server@@/cblr/links/OL-R6-U9-x86_64
        install_tree  : http://10.x.x.x/cobbler/links/OL-R6-U9-x86_64
              kernel  : /var/www/cobbler/ks_mirror/OL-R6-U9-x86_64/images/pxeboot/vmlinuz
              initrd  : /var/www/cobbler/ks_mirror/OL-R6-U9-x86_64/images/pxeboot/initrd.img
      kernel_options  : ks=http://10.x.x.x/cblr/svc/op/ks/profile/ATT_OL6.9-x86_64 ...
               repos  :
            virt_ram  : 512
    virt_disk_driver  : raw
           virt_type  : xenpv
           virt_path  :
      virt_auto_boot  : 1



Use koan to specify what Cobbler's profile to be used for re-installation. Let's re-install OCI instance to be OL7.2

# koan --replace-self --profile=ATT_OL7.2-x86_64

- looking for Cobbler at
- reading URL:
install_tree: http://10.x.x.x/cobbler/links/OL-R7-U2-x86_64
downloading initrd initrd.img to /boot/initrd.img_koan
- reading URL: http://10.x.x.x/cobbler/images/OL-R7-U2-x86_64/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz_koan
- reading URL: http://10.x.x.x/cobbler/images/OL-R7-U2-x86_64/vmlinuz
- ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz_koan', '--initrd', '/boot/initrd.img_koan', '--args', 
   '"ksdevice=link lang= console=ttyS0,9600 asknetwork text ks=http://10.x.x.x/cblr/svc/op/ks/profile/ATT_OL7.2-x86_64 
   ks= "', '--copy-default', '--make-default', '--title=kick1538180544']
- ['/sbin/grubby', '--update-kernel', '/boot/vmlinuz_koan', '--remove-args=root']
- reboot to apply changes
Reboot OCI instance to start re-install. Watch the serial console.

Boot menu

Upon reboot, see the boot menu (on serial console), the first option is what koan provided in the previous output, that starts network re-install.

  Oracle Linux Server 7.5, with Linux 3.10.0-862.11.6.el7.x86_64
  Oracle Linux Server 7.5, with Unbreakable Enterprise Kernel 4.14.35-1818>
  Oracle Linux Server (3.10.0-862.el7.x86_64 with Linux) 7.5
  Oracle Linux Server (0-rescue-4601ef702ea54260b6cff15921d76d14 with Linu>
Follow the install process, in this example attended installation was selected.


Once installation is completed, see the login menu.

Login into your re-installed OCI instance.

Oracle Linux Server 7.2
Kernel 3.8.13-98.7.1.el7uek.x86_64 on an x86_64
ca-oci-zdudic login: root

[root@ca-oci-zdudic ~]# ip addr s
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens3:  mtu 9000 qdisc mq state UP qlen 1000
    link/ether 02:00:17:00:cb:bf brd ff:ff:ff:ff:ff:ff
    inet brd scope global ens3
    inet6 fe80::17ff:fe00:cbbf/64 scope link
       valid_lft forever preferred_lft forever

[root@ca-oci-zdudic ~]# cat /etc/oracle-release
Oracle Linux Server release 7.2

Back to the main page