blob: 584e5581fd4b763aadb981097f026736accc15c7 [file] [log] [blame]
Sean M. Collins09e550c2014-10-21 11:40:08 -04001`DevStack </>`__
2
3- `Overview <../overview.html>`__
4- `Changes <../changes.html>`__
5- `FAQ <../faq.html>`__
6- `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
7- `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
8
9PXE Boot Server Guide: Magic Dust for Network Boot
10==================================================
11
12Boot DevStack from a PXE server to a RAM disk.
13
14Prerequisites Hardware & OpenWRT
15--------------------------------
16
17Hardware
18~~~~~~~~
19
20The whole point of this exercise is to have a highly portable boot
21server, so using a small router with a USB port is the desired platform.
22This guide uses a Buffalo WZR-HP-G300NH as an example, but it is easily
23generalized for other supported platforms. See openwrt.org for more.
24
25OpenWRT
26~~~~~~~
27
28Any recent 'Backfire' build of OpenWRT will work for the boot server
29project. We build from trunk and have made the images available at
30`http://openwrt.xr7.org/openwrt <http://openwrt.xr7.org/openwrt>`__.
31
32Installation bit blasting
33-------------------------
34
35Install the Image
36~~~~~~~~~~~~~~~~~
37
38This process follows `the OpenWRT doc OEM
39Install <http://wiki.openwrt.org/toh/buffalo/wzr-hp-g300h>`__ to tftp
40the new image onto the router. You need a computer to set up the router,
41we assume it is a recent Linux or OS/X installation.
42
43- Get openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin
44
45 ::
46
47 wget http://openwrt.xr7.org/openwrt/ar71xx/openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin
48
49- Connect computer to LAN port 4 (closest to WAN port)
50- Set computer interface to IP address in the 192.168.11.2
51- Add static arp entry for router
52
53 ::
54
55 arp -s 192.168.11.1 <mac-address>
56
57- Start TFTP transfer attempt
58
59 ::
60
61 tftp 192.168.11.1
62 binary
63 rexmt 1
64 timeout 60
65 put openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin
66
67- Power on router. Router will reboot and initialize on 192.168.1.1.
68- Delete static arp entry for router
69
70 ::
71
72 arp -d 192.168.11.1
73
74- Set computer to DHCP, connect and telnet to router and set root
75 password.
76
77Configure the Router
78~~~~~~~~~~~~~~~~~~~~
79
80- Update ``/etc/opkg.conf`` to point to our repo:
81
82 ::
83
84 src/gz packages http://192.168.5.13/openwrt/build/ar71xx/packages
85
86- Configure anon mounts:
87
88 ::
89
90 uci delete fstab.@mount[0]
91 uci commit fstab
92 /etc/init.d/fstab restart
93
94- Reset the DHCP address range. DevStack will claim the upper /25 of
95 the router's LAN address space for floating IPs so the default DHCP
96 address range needs to be moved:
97
98 ::
99
100 uci set dhcp.lan.start=65
101 uci set dhcp.lan.limit=60
102 uci commit dhcp
103
104- Enable TFTP:
105
106 ::
107
108 uci set dhcp.@dnsmasq[0].enable_tftp=1
109 uci set dhcp.@dnsmasq[0].tftp_root=/mnt/sda1/tftpboot
110 uci set dhcp.@dnsmasq[0].dhcp_boot=pxelinux.0
111 uci commit dhcp
112 /etc/init.d/dnsmasq restart
113
114Set Up tftpboot
115~~~~~~~~~~~~~~~
116
117- Create the ``/tmp/tftpboot`` structure and populate it:
118
119 ::
120
121 cd ~/devstack
122 tools/build_pxe_boot.sh /tmp
123
124 This calls ``tools/build_ramdisk.sh`` to create a 2GB ramdisk
125 containing a complete development Oneiric OS plus the OpenStack code
126 checkouts.
127
128- Copy ``tftpboot`` to a USB drive:
129
130 ::
131
132 mount /dev/sdb1 /mnt/tmp
133 rsync -a /tmp/tftpboot/ /mnt/tmp/tftpboot/
134 umount /mnt/tmp
135
136- Plug USB drive into router. It will be automounted and is ready to
137 serve content.
138
139Now `return <ramdisk.html>`__ to the RAM disk Guide to kick off your
140DevStack experience.
141
142© Openstack Foundation 2011-2013 — this is not an official OpenStack
143project...