首页 > 代码库 > cobbler koan自动重装系统

cobbler koan自动重装系统

介绍
koan是kickstart-over-a-network的缩写,它是cobbler的客户端帮助程序,koan允许你通过网络提供虚拟机,也允许你重装已经存在的客户端。当运行时,koan会从远端的cobbler server获取安装信息,然后根据获取的安装信息进行安装。
1、在客户端安装koan
[root@localhost ~]# yum install -y koan
2、执行安装命令
[root@localhost ~]# koan --server=192.168.56.133 --list=profiles
- looking for Cobbler at http://192.168.56.133:80/cobbler_api
centos-7-x86_64
3、
在指定要重装的系统上执行要重装的哪个系统
[root@localhost ~]# koan --replace-self --server=192.168.56.133 --profile=centos-7-x86_64
- looking for Cobbler at http://192.168.56.130:80/cobbler_api
- reading URL: http://192.168.56.130/cblr/svc/op/ks/profile/CentOS-7-x86_64
install_tree: http://192.168.56.130/cblr/links/CentOS-7-x86_64
downloading initrd initrd.img to /boot/initrd.img_koan
url=http://192.168.56.130/cobbler/images/CentOS-7-x86_64/initrd.img
- reading URL: http://192.168.56.130/cobbler/images/CentOS-7-x86_64/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz_koan
url=http://192.168.56.130/cobbler/images/CentOS-7-x86_64/vmlinuz
- reading URL: http://192.168.56.130/cobbler/images/CentOS-7-x86_64/vmlinuz
- [‘/sbin/grubby‘, ‘--add-kernel‘, ‘/boot/vmlinuz_koan‘, ‘--initrd‘, ‘/boot/initrd.img_koan‘, ‘--args‘, ‘"ksdevice=link lang= text net.ifnames=0 ks=http://192.168.56.130/cblr/svc/op/ks/profile/CentOS-7-x86_64 biosdevname=0 kssendmac "‘, ‘--copy-default‘, ‘--make-default‘, ‘--title=kick1489851371‘]
- [‘/sbin/grubby‘, ‘--update-kernel‘, ‘/boot/vmlinuz_koan‘, ‘--remove-args=root‘]
- reboot to apply changes
4、然后重启就会自动安装新系统了

修改安装引导界面提示符(小技巧)
[root@localhost ~]# vim /etc/cobbler/pxe/pxedefault.template

cobbler koan自动重装系统