Talk:Install Server: Difference between revisions

From Free Geek Seattle
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
I'm going to post a really basic shell script here to replicate the setup I have on headwaiter (the install on which this article is based).
Having had more than one install server disappear, [[koanhead]] is working on automating the setup process. Results posted to github.
I will also place the file in the [[Special:ListFiles]] section so it will be wget-able. Later there will be a more refined, general-purpose script on our github.


== install-server-setup.sh ==
==pxelinux.cfg/default==
<pre>
<pre>
!#/bin/bash
include mybootmenu.cfg
default ubuntu-installer/i386/boot-screens/vesamenu.c32
prompt 0
timeout 100
</pre>


# run this as root, but READ IT FIRST.
==mybootmenu.cfg==
# BEFORE you run this, edit the ./interface-changes.txt file.  
<pre>
# if you don't see that file, don't run this script, it won't work without that file present. But it WILL break things.
menu hshift 13
 
menu width 49
apt-get install isc-dhcp-server tftpd-hpa nfs-kernel-server
menu margin 8
 
menu title Trusty NetBoot Menu
cp /etc/network/interfaces /etc/network/interfaces.old
include ubuntu-installer/i386/boot-screens/stdmenu.cfg
 
menu begin Cool options
cat ./interface-changes > /etc/network/interfaces
    default livei386
    label livei386
        menu label Xubuntu 14.04 Live 32bit
        kernel ubuntu-livecd-boot/i386/vmlinuz
        append boot=casper netboot=nfs nfsroot=192.168.0.1:/srv/nfs/live-files/i386 initrd=ubuntu-livecd-boot/i386/initrd.lz -- splash quiet
    label liveamd64
        menu label Xubuntu 14.04 Live 64bit
        kernel ubuntu-livecd-boot/amd64/vmlinuz
    append boot=casper netboot=nfs nfsroot=192.168.0.1:/srv/nfs/live-files/amd64 initrd=ubuntu-livecd-boot/amd64/initrd.lz -- splash quiet
menu end
</pre>


echo -e "INTERFACES=\"eth0\" " >> /etc/default/isc-dhcp-server


echo "/srv/nfs/live-files/i386" >> /etc/exports


mkdir /srv
== Computer with bad mobo ==
mkdir /srv/tftp
mkdir /srv/nfs
mkdir /srv/images


#set up tftp boot
I came across a computer that had a bad motherboard... (memory errors occurred with any ram that i tried)
mkdir /srv/tftp/i386
cd /srv/images/
wget -r -nH --cut-dirs=7 http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/
rm index*
rm ./netboot/index*
cp -av ./netboot ../tftp/i386
cd /srv/tftp/i386/pxelinux.cfg
touch default
echo "include trusty-bootmenu.cfg" >> default
echo "default ubuntu-installer/i386/boot-screens/vesamenu.c32" >> default
echo "prompt 0" >> default
echo "timeout 100" >> default


cd /srv/tftp/
touch trusty-bootmenu.cfg


echo "menu hshift 13" >>trusty-bootmenu.cfg
I'm wondering if that was it.
echo "menu width 49" >>trusty-bootmenu.cfg
echo "menu margin 8" >>trusty-bootmenu.cfg
echo "menu title Trusty NetBoot Menu" >>trusty-bootmenu.cfg
echo "include ubuntu-installer/i386/boot-screens/stdmenu.cfg" >>trusty-bootmenu.cfg
echo "menu begin Cool options" >>trusty-bootmenu.cfg
echo "    default livei386" >>trusty-bootmenu.cfg
echo "    label livei386" >>trusty-bootmenu.cfg
echo "        menu label Xubuntu 14.04 Live 32bit" >>trusty-bootmenu.cfg
echo "        kernel ubuntu-livecd-boot/i386/vmlinuz" >>default
echo "        append boot=casper netboot=nfs nfsroot=192.168.0.1:/srv/nfs/live-files/i386 initrd=ubuntu-livecd-boot/i386/initrd.lz -- splash quiet" >>trusty-bootmenu.cfg
echo "    label liveamd64" >>trusty-bootmenu.cfg
echo "        menu label Xubuntu 14.04 Live 64bit" >>trusty-bootmenu.cfg
echo "        kernel ubuntu-livecd-boot/amd64/vmlinuz" >>trusty-bootmenu.cfg
echo "    append boot=casper netboot=nfs nfsroot=192.168.0.1:/srv/nfs/live-files/amd64 initrd=ubuntu-livecd-boot/amd64/initrd.lz -- echo "splash quiet" >>trusty-bootmenu.cfg
echo "menu end" >>trusty-bootmenu.cfg


#configure dhcpd
I'll be there on Saturday towards the end of the session [[User:AaronPeterson|AaronPeterson]] ([[User talk:AaronPeterson|talk]]) 14:56, 31 October 2014 (PDT)


cd /etc/dhcp
I'm not sure what you mean by 'if that was it'... the server that refuses to PXE boot has OK ram as far as I can tell, the netboot issue is due to protocol mismatch between old client / new server I think. Details on page. Of the servers I set up before, one physically went missing and one got wiped by someone else.
mv dhcp.conf dhcp.conf.old


echo "ddns-update-style none; " >>dhcp.conf
[[User:Koanhead|Koanhead]] ([[User talk:Koanhead|talk]])
 
echo "# option definitions common to all supported networks..." >>dhcp.conf
 
echo -e "option domain-name \"$HOSTNAME.local\";" >>dhcp.conf
echo "option domain-name-servers 8.8.8.8, 4.4.2.1;" >>dhcp.conf
echo "default-lease-time 600;" >>dhcp.conf
echo "allow booting;" >>dhcp.conf
echo "subnet 192.168.0.0 netmask 255.255.255.0 {" >>dhcp.conf
echo "    range 192.168.0.3 192.168.0.127;" >>dhcp.conf
echo "    option broadcast-address 192.168.0.255;" >>dhcp.conf
echo "    option routers 192.168.0.1;" >>dhcp.conf
echo -e "    filename \"pxelinux.0\";" >>dhcp.conf
echo "}" >>dhcp.conf
echo "group {" >>dhcp.conf
echo "    next-server 192.168.0.1;" >>dhcp.conf
echo "    host tftpclient {" >>dhcp.conf
echo -e "        filename \"pxelinux.0\";" >>dhcp.conf
echo "    }" >>dhcp.conf
echo "}" >>dhcp.conf
 
#configure NFS
 
cd /srv/images/
wget http://releases.ubuntu.com/12.04.4/ubuntu-12.04.4-desktop-i386.iso
mkdir /srv/nfs/live-files/i386/
touch i386-temp
mount -o loop ubuntu-12.04.4-desktop-i386.iso i386-temp
cp -av i386-temp/ /srv/nfs/live-files/i386/
 
echo "/srv/nfs/live-files/i386  *(ro,async,no_root_squash,no_subtree_check)" >> /etc/exports
 
 
#configuration complete, (re)start servers
 
service tftpd-hpa restart
service isc-dhcp-server restart
exportfs -a
</pre>
 
== interface-change.sh ==
<pre>
#wired - services listen on this iface
auto allow-hotplug eth0
iface eth0 inet static
  address 192.168.0.1
  netmask 255.255.255.0
up /etc/init.d/tftpd-hpa start
up /etc/init.d/isc-dhcp-server start
up exportfs -a
 
#radio - connected to internets
allow-hotplug wlan0
iface wlan0 inet dhcp
  wpa-ssid "Network-essid"
  wpa-psk "wpa-password"
</pre>

Latest revision as of 02:00, 29 November 2014

Having had more than one install server disappear, koanhead is working on automating the setup process. Results posted to github.

pxelinux.cfg/default[edit]

include mybootmenu.cfg
default ubuntu-installer/i386/boot-screens/vesamenu.c32
prompt 0
timeout 100

mybootmenu.cfg[edit]

menu hshift 13
menu width 49
menu margin 8
menu title Trusty NetBoot Menu
include ubuntu-installer/i386/boot-screens/stdmenu.cfg
menu begin Cool options
    default livei386
    label livei386
        menu label Xubuntu 14.04 Live 32bit
        kernel ubuntu-livecd-boot/i386/vmlinuz
        append boot=casper netboot=nfs nfsroot=192.168.0.1:/srv/nfs/live-files/i386 initrd=ubuntu-livecd-boot/i386/initrd.lz -- splash quiet
    label liveamd64
        menu label Xubuntu 14.04 Live 64bit
        kernel ubuntu-livecd-boot/amd64/vmlinuz
    append boot=casper netboot=nfs nfsroot=192.168.0.1:/srv/nfs/live-files/amd64 initrd=ubuntu-livecd-boot/amd64/initrd.lz -- splash quiet
menu end


Computer with bad mobo[edit]

I came across a computer that had a bad motherboard... (memory errors occurred with any ram that i tried)


I'm wondering if that was it.

I'll be there on Saturday towards the end of the session AaronPeterson (talk) 14:56, 31 October 2014 (PDT)

I'm not sure what you mean by 'if that was it'... the server that refuses to PXE boot has OK ram as far as I can tell, the netboot issue is due to protocol mismatch between old client / new server I think. Details on page. Of the servers I set up before, one physically went missing and one got wiped by someone else.

Koanhead (talk)