Skip to content

Commit

Permalink
changes to get freebsd going
Browse files Browse the repository at this point in the history
  • Loading branch information
jedi4ever committed Feb 11, 2011
1 parent 825e07d commit 161ade0
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
rvm use ruby-1.8.7
rvm gemset use veewee
alias vagrant="bundle exec vagrant"
alias irb="bundle exec irb"
18 changes: 13 additions & 5 deletions lib/veewee/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,19 @@ def self.build(boxname,options)

Veewee::Scancode.send_sequence("#{@vboxcmd}","#{boxname}",@definition[:boot_cmd_sequence])

puts "Starting a webserver on port #{@definition[:kickstart_port]}"
#:kickstart_port => "7122", :kickstart_ip => self.local_ip, :kickstart_timeout => 1000,:kickstart_file => "preseed.cfg",
Veewee::Web.wait_for_request(@definition[:kickstart_file],{:port => @definition[:kickstart_port],
:host => @definition[:kickstart_ip], :timeout => @definition[:kickstart_timeout],
:web_dir => File.join(@definition_dir,boxname)})
kickstartfile=@definition[:kickstart_file]
puts "#{kickstartfile}"
if kickstartfile.nil? || kickstartfile.length == 0
puts "Skipping webserver as no kickstartfile was specified"
else
puts "Starting a webserver on port #{@definition[:kickstart_port]}"
#:kickstart_port => "7122", :kickstart_ip => self.local_ip, :kickstart_timeout => 1000,:kickstart_file => "preseed.cfg",
Veewee::Web.wait_for_request(kickstartfile,{:port => @definition[:kickstart_port],
:host => @definition[:kickstart_ip], :timeout => @definition[:kickstart_timeout],
:web_dir => File.join(@definition_dir,boxname)})

end


Veewee::Ssh.when_ssh_login_works("localhost",ssh_options) do
#Transfer version of Virtualbox to $HOME/.vbox_version
Expand Down
2 changes: 1 addition & 1 deletion templates/Archlinux-latest/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ chroot /newarch pacman --noconfirm -S kernel26-headers
VBOX_VERSION=$(cat /root/.vbox_version)

##INstalling the virtualbox guest additions
cat <EOF | chroot /newarch /bin/bash -
cat <<EOF | chroot /newarch /bin/bash -
cd /tmp
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
Expand Down
2 changes: 1 addition & 1 deletion templates/Sysrescuecd-2.0.0-experimental/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' ,
:os_type_id => 'Linux',
:iso_file => "systemrescuecd-x86-2.0.0.iso",
:iso_src => "http://downloads.sourceforge.net/project/systemrescuecd/sysresccd-x86/2.0.0/systemrescuecd-x86-2.0.0.iso?r=http%3A%2F%2Fwww.sysresccd.org%2FDownload&ts=1297107227&use_mirror=ignum",
:iso_src => "http://downloads.sourceforge.net/project/systemrescuecd/sysresccd-x86/2.0.0/systemrescuecd-x86-2.0.0.iso",
:iso_md5 => "51012e0bb943cff6367e5cea3a61cdbe",
:iso_download_timeout => "1000",
:boot_wait => "10",:boot_cmd_sequence => [
Expand Down
20 changes: 20 additions & 0 deletions templates/freebsd-8.1-experimental/definition.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Veewee::Session.declare( {
:cpu_count => '1', :memory_size=> '256',
:disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' ,
:os_type_id => 'FreeBSD_64',
:iso_file => "mfsbsd-8.1-amd64.iso",
:iso_src => "http://mfsbsd.vx.sk/iso/mfsbsd-8.1-amd64.iso",
:iso_md5 => "alala",
:iso_download_timeout => "1000",
:boot_wait => "10",:boot_cmd_sequence => [
'<Enter>'
],
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "",
:ssh_login_timeout => "10000",:ssh_user => "root", :ssh_password => "mfsroot",:ssh_key => "",
:ssh_host_port => "7222", :ssh_guest_port => "22",
:sudo_cmd => "sh '%f'",
:shutdown_cmd => "shutdown -H",
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
}
)
#'setkmap=us dodhcp=eth0 dhcphostname=%NAME% ar_source=http://%IP%:%PORT%/ autoruns=0 rootpass=vagrant',
96 changes: 96 additions & 0 deletions templates/freebsd-8.1-experimental/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#http://www.freebsd.org/doc/en_US.ISO8859-1/articles/remote-install/installation.html
dd if=/dev/zero of=/dev/ad4 count=2
#bsdlabel -wB /dev/ad4

sysctl kern.geom.debugflags=16


cat <<EOF >/install.cfg
# This is the installation configuration file for our rackmounted FreeBSD
# cluster machines
# Turn on extra debugging.
debug=yes
#releaseName 8.0-RELEASE
################################
# My host specific data
#hostname=dragonfly
#domainname=cs.duke.edu
#nameserver=152.3.145.240
#defaultrouter=152.3.145.240
#ipaddr=152.3.145.64
#netmask=255.255.255.0
################################
tryDHCP=NO
################################
# Which installation device to use
_ftpPath=ftp://ftp.freebsd.org/pub/FreeBSD/
netDev=em0
mediaSetFTP
################################
################################
# Select which distributions we want.
#dists= bin doc games manpages catpages proflibs dict info des compat1x compat20 compat21 X331bin X331cfg X331doc X331html X331lib X331lkit X331man X331prog X331ps X331set X331VG16 X331nest X331vfb X331fnts X331f100 X331fcyr X331fscl X331fnon sinclude
#distSetCustom
distSetMinimum
################################
################################
# Now set the parameters for the partition editor on ad4.
disk=ad4
partition=all
#http://www.mail-archive.com/[email protected]/msg212036.html
bootManager=standard
diskPartitionEditor
diskPartitionWrite
################################
################################
# All sizes are expressed in 512 byte blocks!
#
# A 960MB root partition, followed by a 0.5G swap partition, followed by
# a 1G /var, and a /usr using all the remaining space on the disk
#
ad4s1-1=ufs 1966080 /mnt
ad4s1-2=swap 1048576 none
ad4s1-3=ufs 2097152 /mnt/var
ad4s1-4=ufs 0 /mnt/usr
# Let's do it!
diskLabelEditor
diskLabelCommit
#http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2010-11/msg00420.html
installRoot=/mnt
#
# OK, everything is set. Do it!
installCommit
# Install some packages at the end.
# package=LPRng-3.2.3
# packageAdd
# Install some packages at the end.
#
# this last package is special. It is used to configure the machine.
# it installs several files (like /root/.rhosts) an its installation
# script tweaks several options in /etc/rc.conf
#
#package=ari-0.0
#packageAdd
EOF

exit
sysinstall configFile=/install.cfg loadConfig

0 comments on commit 161ade0

Please sign in to comment.