制作liveusb实现ubuntserver12全自动无人职守安装-阿里云开发者社区

开发者社区> 开发与运维> 正文

制作liveusb实现ubuntserver12全自动无人职守安装

简介:

使用unetbootin工具制作的liveusb,/pool/main/l/linux-lts-saucy/udeb包的名字由于过长被更改成ude了,在安装的过程中会报缺udeb包的错误。这是工具的问题,所以可以挂载光盘后,手动复制过去。
还一个比较好用的工具是usb-creator-gtk,好像就是传说中的startup disk creator。使用ubuntu 12.04.4的官方iso开始进行liveusb制作。不过按照下面方法造出来的liveusb在部分机器上会卡住不能继续安装,原因未知!

sudo mount /dev/sdc1 /mnt/sdc1

cd /mnt/sdc1/syslinux && sudo mv isolinux.bin syslinux.bin

sudo vim /mnt/sdc1/syslinux/syslinux.cfg
把超时时间timeout改成30,就是3秒的意思
sudo vim /mnt/sdc1/syslinux/txt.cfg
修改append后面的内容
append initrd=/install/initrd.gz file=/cdrom/ks.seed boot=install debian-installer/locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us automatic-ubiquity quiet splash --

制作ks.seed文件
sudo vim /mnt/sdc1/ks.seed
# ubuntu preseed file
d-i debian-installer/locale string en_US  
d-i debian-installer/language string en  
d-i debian-installer/country string china
d-i localechooser/supported-locales multiselect en_US.UTF-8, zh_CN.UTF-8  
#keyboard  
d-i console-setup/ask_detect boolean false  
d-i console-configuration/layoutcode string us  
d-i keyboard-configuration/modelcode string SKIP   
#clock  
d-i clock-setup/utc boolean false  
d-i time/zone string Asia/Shanghai  
#network  
d-i netcfg/choose_interface select auto  
d-i netcfg/dhcp_failed note  
d-i netcfg/dhcp_options select Do not configure the network at this time  
d-i netcfg/get_hostname string test  
d-i netcfg/get_domain string test-domain  
d-i netcfg/wireless_wep string  
# Mirror  
d-i mirror/protocol string http  
d-i mirror/country string china  
d-i mirror/http/hostname string  mirrors.163.com  
d-i mirror/http/directory string /ubuntu  
d-i mirror/http/proxy string  
# clock  
d-i clock-setup/ntp boolean true  
# partition  
d-i partman-auto/disk string /dev/sda  
d-i partman-auto/method string regular  
d-i partman-lvm/device_remove_lvm boolean true  
d-i partman-md/device_remove_md boolean true  
d-i partman-auto/choose_recipe select atomic  
d-i partman/default_filesystem string ext4  
d-i partman/confirm_write_new_label boolean true  
d-i partman/choose_partition  select Finish partitioning and write changes to disk  
d-i partman/confirm boolean true  
#user  
#d-i passwd/root-login boolean true  
#d-i passwd/root-password-crypted password $1$3nGno0$c4rp7NcQRAcJV3AdzKV890  
#d-i passwd/make-user boolean true  
d-i passwd/user-fullname string ubuntu  
d-i passwd/username string ubuntu  
#d-i passwd/user-password-crypted password $1$3nGno0$c4rp7NcQRAcJV3AdzKV890  
d-i passwd/user-password password admaster54322
d-i passwd/user-password-again password admaster54322
d-i user-setup/allow-password-weak boolean true  
d-i user-setup/encrypt-home boolean false  
#package  
tasksel tasksel/first multiselect none  
d-i pkgsel/include string openssh-server vim gcc make 
d-i pkgsel/upgrade select full-upgrade  
d-i pkgsel/install-language-support boolean true  
d-i pkgsel/language-packs multiselect en, zh  
d-i pkgsel/update-policy select none  
# popularity-contest popularity-contest/participate boolean false  
d-i pkgsel/updatedb boolean true  

#grub  
d-i grub-installer/skip boolean false  
d-i lilo-installer/skip boolean true  
d-i grub-installer/grub2_instead_of_grup_legacy boolean true  
d-i grub-installer/only_debian boolean true  
d-i grub-installer/with_other_os boolean true  

# Finish  
d-i finish-install/keep-consoles boolean true  
d-i finish-install/reboot_in_progress note  
d-i cdrom-detect/eject boolean true  
d-i debian-installer/exit/halt boolean false  
d-i debian-installer/exit/poweroff boolean false



本文转自 朱科强 51CTO博客,原文链接:http://blog.51cto.com/zhukeqiang/1382851,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

其他文章