Cobbler 在 CentOS/RHEL/Fedora 系的发行版上工作良好,在 CentOS/RHEL/Fedora 上安装 Cobbler以后可以直接导入 CentOS/RHEL/Fedora ISO 文件,很顺利,不过导入 Ubuntu/Debian ISO 就不是那么幸运了,直接导入 ubuntu-11.10-server-amd64.iso 的话会报错:# cobbler import –path=/mnt/ –name=ubuntu-11.10-server-amd64...sent 710595315 bytes received 36388 bytes 52639385.41 bytes/sectotal size is 710349452 speedup is 1.00...!!! TASK FAILED !!!忽略上面的错误,会发现在 ks_mirror 下面已经导入了 ubuntu-11.10-server-amd64 整个 ubuntu 目录:# ls /var/www/cobbler/ks_mirror/config ubuntu-11.10-server-amd64如果对上面已经导入的 ubuntu 目录还不放心的话,可以删除这个目录后手动导入(直接 cp 就行):# rm -rf /var/www/cobbler/ks_mirror/ubuntu-11.10-server-amd64# mount -o loop -t iso9660 ubuntu-11.10-server-amd64.iso /mnt# cp -r /mnt/ /var/www/cobbler/ks_mirror/ubuntu-11.10-server-amd64完成导入(拷贝)后,做个链接:# cd /var/www/cobbler/links/# ln -s /var/www/cobbler/ks_mirror/ubuntu-11.10-server-amd64 ubuntu-11.10-server-amd64然后加入 distro 和 profile:# cobbler distro add \--name=ubuntu-11.10-server-amd64 \--kernel=/var/www/cobbler/ks_mirror/ubuntu-11.10-server-amd64/install/netboot/ubuntu-installer/amd64/linux \--initrd=/var/www/cobbler/ks_mirror/ubuntu-11.10-server-amd64/install/netboot/ubuntu-installer/amd64/initrd.gz \--arch=x86_64 \--breed=ubuntu \--ksmeta="directory=/cblr/links/ubuntu-11.10-server-amd64"# cobbler profile add \--name=ubuntu-11.10-server-amd64 \--distro=ubuntu-11.10-server-amd64 \--kickstart=/var/lib/cobbler/kickstarts/ubuntu-11.10-server-amd64.seed最后我们需要 ubuntu 能完成自动安装,加入以下 kickstart 脚本 ubuntu-11.10-server-amd64.seed 到 /var/lib/cobbler/kickstarts/ :# vi /var/lib/cobbler/kickstarts/ubuntu-11.10-server-amd64.seedd-i debian-installer/locale string en_US.UTF-8d-i debian-installer/splash boolean falsed-i console-setup/ask_detect boolean falsed-i console-setup/layoutcode string usd-i console-setup/variantcode stringd-i netcfg/get_nameservers stringd-i netcfg/get_ipaddress stringd-i netcfg/get_netmask string 255.255.255.0d-i netcfg/get_gateway stringd-i netcfg/confirm_static boolean trued-i clock-setup/utc boolean trued-i partman-auto/method string regulard-i partman-lvm/device_remove_lvm boolean trued-i partman-lvm/confirm boolean trued-i partman/confirm_write_new_label boolean trued-i partman/choose_partition select Finish partitioning and write changes to diskd-i partman/confirm boolean trued-i partman/confirm_nooverwrite boolean trued-i partman/default_filesystem string ext3d-i clock-setup/utc boolean trued-i clock-setup/ntp boolean trued-i clock-setup/ntp-server string ntp.ubuntu.comd-i base-installer/kernel/image string linux-serverd-i passwd/root-login boolean falsed-i passwd/make-user boolean trued-i passwd/user-fullname string ubuntud-i passwd/username string ubuntud-i passwd/user-password-crypted password $default_password_cryptedd-i passwd/user-uid stringd-i user-setup/allow-password-weak boolean falsed-i user-setup/encrypt-home boolean falsed-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashared-i apt-setup/services-select multiselect securityd-i apt-setup/security_host string security.ubuntu.comd-i apt-setup/security_path string /ubuntud-i debian-installer/allow_unauthenticated string falsed-i pkgsel/upgrade select safe-upgraded-i pkgsel/language-packs multiselectd-i pkgsel/update-policy select noned-i pkgsel/updatedb boolean trued-i grub-installer/skip boolean falsed-i lilo-installer/skip boolean falsed-i grub-installer/only_debian boolean trued-i grub-installer/with_other_os boolean trued-i finish-install/keep-consoles boolean falsed-i finish-install/reboot_in_progress noted-i cdrom-detect/eject boolean trued-i debian-installer/exit/halt boolean falsed-i debian-installer/exit/poweroff boolean falsed-i pkgsel/include string openssh-server