039-解决ubuntu使用preseed装机 base-installer/kernel/failed-package-install 问题

889 阅读1分钟

这是坚持技术写作计划(含翻译)的第39篇,定个小目标999,每周最少2篇。

本文主要介绍在使用pressed无人装机安装ubuntu时,偶尔出现

Unexpected error; command not executed: 'sh -c debconf-apt-progress --no-progress --logstederr -- apt-get -q -y --no-remove install busybox-initramfs'
base-installer: error: exiting on error base-installer/kernel/failed-package-install

的解决方案。

之前写的几篇无人装机的文章(有基于cobbler和cloudboot的)

排查过程

首先,点击继续,返回上一层页面,选择shell, cat /var/log/syslog 找到报错信息 base-installer: error: exiting on error base-installer/kernel/failed-package-install 
在百度和google搜索后,找到跟我类似的问题 XenServer安装ubuntu16.04遇到的错误

但是使用作者的方式处理一遍后,没啥效果,但是阴差阳错的get了 ctrl+alt+f4 (参考 Reverting from Ctrl - Alt - F1 )

能看安装日志就简单了,排查就行了,发现是安装ubuntu security时,国外ip被ban了,换成国内源即可。

修改preseed

d-i apt-setup/services-select multiselect security
d-i apt-setup/security_host string mirrors.aliyun.com
d-i apt-setup/security_path string /ubuntu

招聘小广告

山东济南的小伙伴欢迎投简历啊 加入我们 , 一起搞事情。
长期招聘,Java程序员,大数据工程师,运维工程师,前端工程师。

参考资料