手机版
你好,游客 登录 注册
背景:
阅读新闻

通过PXE安装虚拟机

[日期:2012-07-12] 来源:Linux社区  作者:quqi99 [字体:大 中 小]

1.4KickStart
vi /var/www/Ubuntu/ks.cfg#System language

lang en_US

#Language modules to install

langsupport en_US

#System keyboard


keyboard us

#System mouse

mouse

#System timezone

timezone Asia/Chongqing


#Root password

rootpw --disabled

#Initial user gaojinbo/gaojinbo.com

user hua --fullname hua --passwordpassword

#Reboot after installation

reboot


#Use text mode install

text

#Install OS instead of upgrade

install

#Use Web installation

url --urlhttp://192.168.100.171/ubuntu


#System bootloader configuration

bootloader --location=mbr

#Clear the Master Boot Record

zerombr yes

#Partition clearing information

clearpart --all --initlabel


#Disk partitioning information

part / --fstype ext4 --size 10000

part swap --size 5000


auth --useshadow --enablemd5

network --bootproto=dhcp --device=eth0

#network --bootproto=static--ip=192.168.5.168 --netmask=255.255.255.0 --gateway=192.168.100.1--nameserver=221.5.88.88 --device=eth0


firewall --disabled

skipx

%packages

@openssh-server

1.5ubuntu-server.seed
vi /var/www/ubuntu/ubuntu-server.seed# Suggest LVM by default.

d-i partman-auto/init_automatically_partition stringsome_device_lvm

d-i partman-auto/init_automatically_partition seen false

# Always install the server kernel.

d-i base-installer/kernel/override-image string linux-server

# Install the Ubuntu Server seed.

tasksel tasksel/force-tasks string server

# Only install basic language packs.

d-i pkgsel/language-pack-patterns string

# No language support packages.

d-i pkgsel/install-language-support boolean false

# Only ask the UTC question if there are

d-i clock-setup/utc boolean false

d-i clock-setup/ntp boolean false

d-i apt-setup/use_mirror boolean false

d-i netcfg/get_ipaddress string 127.0.0.1

d-i mirror/http://hostname string 127.0.0.1

d-i apt-setup/restricted boolean false


# No boot splash screen.

d-i debian-installer/splash boolean false

# Install the debconf oem-config frontend (if in OEM mode).

d-i oem-config-udeb/frontend string debconf

# Add the network and tasks oem-config steps by default.

oem-config oem-config/steps multiselect language, \

timezone, keyboard, user, network, tasks

1.6 注意点
用虚机为pxeclient测试的话,应每测试一次新建一个虚机.新建出的虚机的网络配置如下:

  <network>
  <name>test</name>
  <forward mode='nat'/>
  <ip address="192.168.123.1" netmask="255.255.255.0">
    <tftp root="/var/ftpd" />
    <dhcp>
      <range start="192.168.123.2" end="192.168.123.254" />
      <bootp file="pxelinux.0" />
    </dhcp>
  </ip>
</network>

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款