Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Fedora-16-x86_64-netboot template #309

Merged
merged 1 commit into from

2 participants

@sheldonh

I took the liberty of deviating from the precendent of downloading the vbox guest adds iso for every build; it drove me mad during testing. :-)

@jedi4ever jedi4ever merged commit bbab311 into from
@petecheslock petecheslock referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 20, 2012
  1. @sheldonh
This page is out of date. Refresh to see the latest.
View
29 templates/Fedora-16-x86_64-netboot/definition.rb
@@ -0,0 +1,29 @@
+Veewee::Session.declare({
+ # Minimum RAM requirement for installation is 768MB.
+ :cpu_count => '1',
+ :memory_size=> '768',
+ :disk_size => '10140',
+ :disk_format => 'VDI',
+ :hostiocache => 'off',
+ :hwvirtext => 'on',
+ :os_type_id => 'Fedora_64',
+ :iso_file => "Fedora-16-x86_64-netinst.iso",
+ :iso_src => "http://ftp.halifax.rwth-aachen.de/fedora/linux/releases/16/Fedora/x86_64/iso/Fedora-16-x86_64-netinst.iso",
+ :iso_md5 => "388ea488c8521ceec43f3683a6d078d6",
+ :iso_download_timeout => 1000,
+ :boot_wait => "10",
+ :boot_cmd_sequence => [ '<Tab> linux text ks=http://%IP%:%PORT%/ks.cfg<Enter><Enter>' ],
+ :kickstart_port => "7122",
+ :kickstart_timeout => 10000,
+ :kickstart_file => "ks.cfg",
+ :ssh_login_timeout => 10000,
+ :ssh_user => "vagrant",
+ :ssh_password => "vagrant",
+ :ssh_key => "",
+ :ssh_host_port => "7222",
+ :ssh_guest_port => "22",
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
+ :shutdown_cmd => "/sbin/halt -h -p",
+ :postinstall_files => [ "postinstall.sh"],
+ :postinstall_timeout => 10000
+})
View
70 templates/Fedora-16-x86_64-netboot/ks.cfg
@@ -0,0 +1,70 @@
+# Kickstart file automatically generated by anaconda.
+
+install
+cdrom
+lang en_US.UTF-8
+keyboard us
+network --onboot yes --device p2p1 --bootproto dhcp --noipv6
+timezone --utc America/Los_Angeles
+rootpw --iscrypted $6$n/NGsk5H2aiBMXL4$r/oPkJtB5rasvQHPo9AvIJBe6sNVlQbpZxvTRMN7.qZk/Sn9u2qZ0XgNxflUvK20y7OIWdr/vv7MED6gzkBiH0
+selinux --enforcing
+authconfig --enableshadow --passalgo=sha512
+firewall --service=ssh
+# The following is the partition information you requested
+# Note that any partitions you deleted are not expressed
+# here so unless you clear all partitions first, this is
+# not guaranteed to work
+clearpart --all --drives=sda --initlabel
+
+part biosboot --fstype=biosboot --size=1
+part /boot --fstype=ext4 --size=500
+part pv.2 --grow --size=500
+
+volgroup vg_vagrant --pesize=32768 pv.2
+logvol / --fstype=ext4 --name=lv_root --vgname=vg_vagrant --size=1024 --grow
+logvol swap --fstype=swap --name=lv_swap --vgname=vg_vagrant --size=528 --grow --maxsize=1056
+bootloader --location=mbr --driveorder=sda --append="norhgb biosdevname=0"
+# Disable remote repositories, as this is a non-netinst install.
+#repo --name="Fedora 16 - x86_64" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-16&arch=x86_64 --cost=1000
+#repo --name="Fedora 16 - x86_64 - Updates" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f16&arch=x86_64 --cost=1000
+services --enabled network
+reboot
+
+%packages --nobase
+@core
+
+# So we can scp stuff into the basebox
+openssh-clients
+
+# Requirements for vagrant
+kernel-devel
+kernel-headers
+%end
+
+%post
+# Make ssh quicker in disconnected situations.
+echo 'UseDNS no' >> /etc/ssh/sshd_config
+
+# Disable udev persistent net rules
+# We do this so that we do not persist rules mapped to virtual machines
+# instances created from this basebox.
+ln -s /dev/null /etc/udev/rule.d/70-persistent-net.rules
+
+# Add Vagrant user and group.
+/usr/sbin/groupadd vagrant
+/usr/sbin/useradd vagrant -g vagrant
+echo "vagrant"|passwd --stdin vagrant
+
+# Give Vagrant user permission to sudo.
+echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant
+echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
+chmod 440 /etc/sudoers.d/vagrant
+
+# Install vagrant authorized ssh key.
+mkdir /home/vagrant/.ssh
+curl -L 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' > /home/vagrant/.ssh/authorized_keys
+chown vagrant:vagrant -R /home/vagrant/.ssh
+chmod 700 /home/vagrant/.ssh
+chmod 600 /home/vagrant/.ssh/authorized_keys
+chcon -R unconfined_u:object_r:user_home_t:s0 /home/vagrant/.ssh
+%end
View
26 templates/Fedora-16-x86_64-netboot/postinstall.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+date > /etc/vagrant_box_build_time
+
+VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
+
+yum -y install \
+ dkms \
+ gcc \
+ make \
+ ruby \
+ ruby-devel \
+ rubygems \
+
+yum clean all
+
+mount /dev/cdrom1 /mnt
+sh /mnt/VBoxLinuxAdditions.run
+umount /mnt
+restorecon -R /opt/VBoxGuestAdditions-${VBOX_VERSION}
+
+gem install chef puppet --no-rdoc --no-ri
+
+exit
+
+# EOF
Something went wrong with that request. Please try again.