[ubuntu12.04] u盘全自动安装 ubuntu server 12.04

本文介绍如何在Ubuntu 12.04 Server版中通过配置预种子文件实现自动化安装过程。内容涵盖使用Startup Disk Creator制作启动U盘、修改syslinux配置以实现自动安装选项设置、以及详细列出预种子文件的具体配置项。
摘要由CSDN通过智能技术生成

1  ubuntu 12.04 server 下 使用 Startup Disk Creater  将 ubuntu 12.04 server的iso  烧录至 u盘 ,制作成启动盘


2  修改配置文件

    mount /dev/sdb1  /mnt/

    cd /mnt/syslinux/

    mv  isolinux.bin  syslinux.bin

    vim  syslinux.cfg

default autoinstall
prompt 0
timeout 100
 
menu title Custom Live CD
menu background splash.png
menu color title 1;37;44 #c0ffffff #00000000 std
 
label autoinstall
menu label autoinstall - auto install ubuntu
kernel /install/vmlinuz
append initrd=/install/initrd.gz file=/cdrom/preseed/autoinstall.seed boot=install debian-installer/locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us automatic-ubiquity quiet splash --

3 在 /mnt/preseed/下 创建文件 autoinstall.seed

    cd /mnt/presedd/

    vim  autoinstall.seed

#locate
d-i debian-installer/locale string en_US
d-i debian-installer/language string en
d-i debian-installer/country string us
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/sdb
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-server
d-i passwd/username string ubuntu
d-i passwd/user-password-crypted password $1$3nGno0$c4rp7NcQRAcJV3AdzKV890
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 build-essential
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


    

    

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值