作者: 关于计算机  发布:2019-10-21

近年来求学Ubuntu的Orchestra, 里面集成cobbler。也集成了preseed文件。

u盘全自动安装ubuntu server 12.04




1  ubuntu 12.04 server 下 使用 Startup Disk Creater  将 ubuntu 12.04 server的iso  
烧录至 u盘 ,制作成运行盘  www.2cto.com  



# Use server kernel
d-i     base-installer/kernel/image     string linux-server

2  修改配置文件

# User Setup
#d-i    passwd/root-login    boolean false
#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 $6$.1eHH0iY$ArGzKX2YeQ3G6U.mlOO3A.NaL22Ewgz8Fi4qqz.Ns7EMKjEJRIW2Pm/TikDptZpuu7I92frytmk5YeL.9fRY4.
#d-i    passwd/user-uid    string
#d-i    user-setup/allow-password-weak    boolean false
#d-i    user-setup/encrypt-home    boolean false
#d-i    passwd/user-default-groups    string adm cdrom dialout lpadmin plugdev sambashare

    mount /dev/sdb1  /mnt/

# Account setup
d-i passwd/root-login boolean root
d-i passwd/root-password password root123
d-i passwd/root-password-again password root123
d-i user-setup/allow-password-weak boolean true
d-i passwd/make-user boolean false
d-i user-setup/encrypt-home boolean false


#今晚开什么马, APT

    cd /mnt/syslinux/

# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
d-i debian-installer/allow_unauthenticated string false


# Lang
d-i     pkgsel/language-packs   multiselect en
d-i     pkgsel/update-policy    select none
d-i     pkgsel/updatedb boolean true

    mv  isolinux.bin  syslinux.bin

# Boot-loader
d-i     grub-installer/skip     boolean false
d-i     lilo-installer/skip     boolean false
d-i     grub-installer/only_debian      boolean true
d-i     grub-installer/with_other_os    boolean true
d-i     finish-install/keep-consoles    boolean false
d-i     finish-install/reboot_in_progress       note


# Eject cdrom
d-i     cdrom-detect/eject      boolean true

    vim  syslinux.cfg

# Do not halt/poweroff after install
d-i     debian-installer/exit/halt      boolean false
d-i     debian-installer/exit/poweroff  boolean false


# Install minimum packages that are essential for server bootstrapping


# Launch byobu by default
#byobu   byobu/launch-by-default boolean true

default autoinstall  

# Set cloud-init data source to manual seeding
cloud-init      cloud-init/datasources  multiselect     NoCloud

prompt 0  

# Set rsyslog server

timeout 100  

# Post scripts. Executes late command and disables PXE
#d-i    preseed/late_command string true &&
       $SNIPPET('orchestra_rsyslog_obtain_keys') &&
       $SNIPPET('orchestra_disable_pxe') &&


更加多Ubuntu相关音信见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

menu title Custom Live CD  

今晚开什么马 1

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




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  


d-i console-setup/ask_detect boolean false  

d-i console-configuration/layoutcode string us  

d-i keyboard-configuration/modelcode string SKIP   


d-i clock-setup/utc boolean false  

d-i time/zone string Asia/Shanghai  


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  


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  


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  



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  


server 12.04 1 ubuntu 12.04 server 下 使用 Startup Disk Creater 将 ubuntu 12.04 server的iso 烧录至 u盘 ,制作成运营盘 www.2cto.com 2 修改配...