Merge ~cpete/ubuntu-manual-tests:cpete/update-amd64-netboot-tests into ubuntu-manual-tests:main

Proposed by Chris Peterson
Status: Merged
Merged at revision: cd09db355a484b0f35e393cff2b944c636a7af59
Proposed branch: ~cpete/ubuntu-manual-tests:cpete/update-amd64-netboot-tests
Merge into: ubuntu-manual-tests:main
Diff against target: 282 lines (+141/-80)
3 files modified
dev/null (+0/-80)
testcases/image/1734_PXE UEFI Netboot (Server live) (+71/-0)
testcases/image/1759_PXE BIOS Netboot (Server live) (+70/-0)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+453468@code.launchpad.net

Description of the change

These changes update the amd64 pxe netboot tests, for both UEFI and BIOS. I have re-written the instructions to direct the tester to only download the netboot artifacts, which should be now be included in the Ubuntu Server Subiquity product on the iso tracker. (At least for amd64)

Additionally, I have removed references to apache, configuring autoinstall, and downloading the ISO. The netboot artifacts are always generated with the ISO build, and the bootloader configurations provided contain the URL to the respective ISO hosted on cdimage (the same url in the test download information). This means the test machine will download the correct iso directly without the user having to set up apache and serve it themselves. This also means we lose out on the simplicity of autoinstall, but I think the overall simplification of the test case is well worth it.

Lastly, I have changed the names of the test files (but not the test case numbers) to be uniform with the other Ubuntu Server Subiquity amd64 testcases. This may require remapping these tests in the isotracker.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Looks good, but there are a few things that should be adjusted before landing this. Inline comments apply to both test cases for the most part

review: Needs Fixing
Revision history for this message
Chris Peterson (cpete) wrote (last edit ):

Thank you for the review. I addressed all of your comments and made subsequent changes. I also added a note to the top of the testcase making explicit what the instructions are asking the tester to setup, with a link to https://wiki.ubuntu.com/UEFI/SecureBoot/PXE-IPv6 for further information on setting up a PXE server.

Going to try force-pushing the commit to keep commit history clean, but I hope this doesn't mess up the comments here...

Edit: Force push worked.

Revision history for this message
Steve Langasek (vorlon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/testcases/image/1734_Netinstall (amd64 server live) b/testcases/image/1734_Netinstall (amd64 server live)
2deleted file mode 100644
3index 12c6e11..0000000
4--- a/testcases/image/1734_Netinstall (amd64 server live)
5+++ /dev/null
6@@ -1,37 +0,0 @@
7-This testcase is to run netboot installation on amd64 machines with live images. You need an installed Ubuntu machine in the same network.
8-
9-<em>Proceed in your native language if you wish. Instructions will remain in English.</em>
10-
11-RELEASE is the current development codename.
12-HOST is the IP address of installed Ubuntu machine.
13-On your installed Ubuntu machine.
14-
15-<dl>
16- <dt>sudo apt install -y tftpd-hpa apache2</dt>
17- <dt>sudo curl http://cdimage.ubuntu.com/ubuntu-server/daily-live/current/RELEASE-live-server-amd64.iso -o /var/www/html/test-live-server-amd64.iso</dt>
18- <dt>sudo mkdir /srv/tftp/grub</dt>
19- <dt>sudo mount -o loop,ro /var/www/html/test-live-server-amd64.iso /mnt</dt>
20- <dt>sudo cp /mnt/casper/initrd /srv/tftp</dt>
21- <dt>sudo cp /mnt/casper/vmlinuz /srv/tftp</dt>
22- <dt>sudo curl http://archive.ubuntu.com/ubuntu/dists/RELEASE/main/uefi/grub2-amd64/current/grubnetx64.efi -o /srv/tftp/grubnetx64.efi</dt>
23- <dt>echo "menuentry \"Netboot from Ubuntu Live image\" {" | sudo tee /srv/tftp/grub/grub.cfg</dt>
24- <dt>echo " set gfxpayload=keep" | sudo tee -a /srv/tftp/grub/grub.cfg</dt>
25- <dt>echo " linux /vmlinuz url=http://HOST/test-live-server-amd64.iso only-ubiquity ip=dhcp ---" | sudo tee -a /srv/tftp/grub/grub.cfg</dt>
26- <dt>echo " initrd /initrd" | sudo tee -a /srv/tftp/grub/grub.cfg</dt>
27- <dt>echo "}" | sudo tee -a /srv/tftp/grub/grub.cfg</dt>
28-</dl>
29-
30-You might also need to append machine specific kernel cmdline into grub.cfg. e.g. console=ttyS0,115200n8.
31-
32-Reconfigure the dhcp server for grubnetx64.efi as filename and next-server as installed Ubuntu machine. e.g.
33-
34-host testbed {
35- hardware ethernet 00:00:00:11:22:33;
36- next-server <host>;
37- filename "grubnetx64.efi";
38-}
39-
40-Power on your amd64 machine and boot from ethernet. Connect to console output and you shall see grub menu. Press ENTER to load kernel and finish the installation.
41-
42-<strong>If you finish the installation, please <a href="results#add_result">submit</a> a 'passed' result.
43- If any action fails, or produces an unexpected result, please <a href="results#add_result">submit</a> a 'failed' result and <a href="../../buginstructions">file a bug</a>. Please be sure to include the bug number when you <a href="results#add_result">submit</a> your result.</strong>
44diff --git a/testcases/image/1734_PXE UEFI Netboot (Server live) b/testcases/image/1734_PXE UEFI Netboot (Server live)
45new file mode 100644
46index 0000000..1518a3f
47--- /dev/null
48+++ b/testcases/image/1734_PXE UEFI Netboot (Server live)
49@@ -0,0 +1,71 @@
50+<p>
51+The purpose of this testcase is to run netboot installation on amd64 machines
52+with <b>UEFI</b> firmware using live images. You need an installed Ubuntu machine
53+in the same network, configured with a static IP, which will be functioning as
54+a PXE server with DHCP. This testcase includes instructions for setting up the
55+PXE server with DHCPv4 via dnsmasq. You can find additional information and alternative
56+methods of setting up DHCP at <a href="https://wiki.ubuntu.com/UEFI/SecureBoot/PXE-IPv6">https://wiki.ubuntu.com/UEFI/SecureBoot/PXE-IPv6</a>.
57+
58+</p>
59+
60+<em>
61+ Proceed in your native language if you wish. Instructions will remain in
62+ English.
63+</em>
64+
65+<ul>
66+ <li>HOST is the IP address of the machine acting as the PXE server.</li>
67+ <li>NETBOOT-URL is the compressed netboot artifacts archive, as listed in the
68+ download links for the test case.</li>
69+ <li>INTERFACE is the relevant network interface on the PXE server.</li>
70+ <li>STARTADDR and ENDADDR are the start and end points for dhcp addresses to
71+ be handed out on this test network. Choose appropriate values to match
72+ the static network configuration of the PXE server, and see the manpage for
73+ dnsmasq for more details.</li>
74+</ul>
75+
76+
77+<p>Install dnsmasq on the PXE server:</p>
78+<ol>
79+ <li>sudo apt install -y dnsmasq</li>
80+</ol>
81+
82+<p>Configure the PXE server with DHCP and TFTP by modifying <i>/etc/dnsmasq.conf</i> with:</p>
83+
84+<pre>
85+# Base DHCP and TFTP settings
86+interface=INTERFACE
87+bind-interfaces
88+dhcp-range=INTERFACE,STARTADDR,ENDADDR
89+enable-tftp
90+tftp-root=/srv/tftp
91+
92+# PXE boot settings
93+dhcp-match=set:efi-x86_64,option:client-arch,7
94+dhcp-boot=tag:efi-x86_64,amd64/bootx64.efi
95+</pre>
96+
97+<p>Restart dnsmasq:</p>
98+
99+<ol>
100+ <li>sudo systemctl restart dnsmasq.service</li>
101+</ol>
102+
103+<p>Download and place the netboot artifacts:</p>
104+<ol>
105+ <li>sudo wget -O /tmp/netboot-artifacts.tar.gz NETBOOT-URL </li>
106+ <li>sudo mkdir -p /srv/tftp/</li>
107+ <li>sudo tar -zxvf /tmp/netboot-artifacts.tar.gz -C /srv/tftp/</li>
108+</ol>
109+
110+
111+
112+<p>
113+Power on the test machine and ensure that it boots from the network device.
114+Complete the installation, using the provided defaults where possible.
115+Reboot the machine and ensure that you can log into the system with the username
116+and password you provided.
117+</p>
118+
119+<strong>If you finish the installation, please <a href="results#add_result">submit</a> a 'passed' result.
120+ If any action fails, or produces an unexpected result, please <a href="results#add_result">submit</a> a 'failed' result and <a href="../../buginstructions">file a bug</a>. Please be sure to include the bug number when you <a href="results#add_result">submit</a> your result.</strong>
121diff --git a/testcases/image/1759_PXE BIOS Netboot (Server live) b/testcases/image/1759_PXE BIOS Netboot (Server live)
122new file mode 100644
123index 0000000..56bf364
124--- /dev/null
125+++ b/testcases/image/1759_PXE BIOS Netboot (Server live)
126@@ -0,0 +1,70 @@
127+<p>
128+The purpose of this testcase is to run netboot installation on amd64 machines
129+with <b>BIOS</b> firmware using live images. You need an installed Ubuntu machine
130+in the same network, configured with a static IP, which will be functioning as
131+a PXE server with DHCP. This testcase includes instructions for setting up the
132+PXE server with DHCPv4 via dnsmasq. You can find additional information and alternative
133+methods of setting up DHCP at <a href="https://wiki.ubuntu.com/UEFI/SecureBoot/PXE-IPv6">https://wiki.ubuntu.com/UEFI/SecureBoot/PXE-IPv6</a>.
134+
135+</p>
136+
137+<em>
138+ Proceed in your native language if you wish. Instructions will remain in
139+ English.
140+</em>
141+
142+<ul>
143+ <li>HOST is the IP address of the machine acting as the PXE server.</li>
144+ <li>NETBOOT-URL is the compressed netboot artifacts archive, as listed in the
145+ download links for the test case.</li>
146+ <li>INTERFACE is the relevant network interface on the PXE server.</li>
147+ <li>STARTADDR and ENDADDR are the start and end points for dhcp addresses to
148+ be handed out on this test network. Choose appropriate values to match
149+ the static network configuration of the PXE server, and see the manpage for
150+ dnsmasq for more details.</li>
151+</ul>
152+
153+
154+<p>Install dnsmasq on the PXE server:</p>
155+<ol>
156+ <li>sudo apt install -y dnsmasq</li>
157+</ol>
158+
159+<p>Configure the PXE server with DHCP and TFTP by modifying <i>/etc/dnsmasq.conf</i> with:</p>
160+
161+<pre>
162+# Base DHCP and TFTP settings
163+interface=INTERFACE
164+bind-interfaces
165+dhcp-range=INTERFACE,STARTADDR,ENDADDR
166+enable-tftp
167+tftp-root=/srv/tftp
168+
169+# PXE boot settings
170+dhcp-boot=amd64/pxelinux.0
171+</pre>
172+
173+<p>Restart dnsmasq:</p>
174+
175+<ol>
176+ <li>sudo systemctl restart dnsmasq.service</li>
177+</ol>
178+
179+<p>Download and place the netboot artifacts:</p>
180+<ol>
181+ <li>sudo wget -O /tmp/netboot-artifacts.tar.gz NETBOOT-URL </li>
182+ <li>sudo mkdir -p /srv/tftp/</li>
183+ <li>sudo tar -zxvf /tmp/netboot-artifacts.tar.gz -C /srv/tftp/</li>
184+</ol>
185+
186+
187+
188+<p>
189+Power on the test machine and ensure that it boots from the network device.
190+Complete the installation, using the provided defaults where possible.
191+Reboot the machine and ensure that you can log into the system with the username
192+and password you provided.
193+</p>
194+
195+<strong>If you finish the installation, please <a href="results#add_result">submit</a> a 'passed' result.
196+ If any action fails, or produces an unexpected result, please <a href="results#add_result">submit</a> a 'failed' result and <a href="../../buginstructions">file a bug</a>. Please be sure to include the bug number when you <a href="results#add_result">submit</a> your result.</strong>
197diff --git a/testcases/image/1759_PXE Netboot Live Server Autoinstall b/testcases/image/1759_PXE Netboot Live Server Autoinstall
198deleted file mode 100644
199index 6a31db6..0000000
200--- a/testcases/image/1759_PXE Netboot Live Server Autoinstall
201+++ /dev/null
202@@ -1,80 +0,0 @@
203-<p>
204-This testcase is to run netboot installation on amd64 machines with live
205-images. You need an installed Ubuntu machine in the same network, configured
206-with a static IP, which will be functioning as a PXE server with DHCP.
207-</p>
208-
209-<em>
210-Proceed in your native language if you wish. Instructions will remain in
211-English.
212-</em>
213-
214-<dl>
215- <dt>HOST is the IP address of the machine acting as the PXE/DHCP/HTTP
216- server.</dt>
217- <dt>URL is the ISO being tested, as listed in the download links for
218- the test case.</dt>
219- <dt>INTERFACE is the relevant network interface on the HOST.</dt>
220- <dt>STARTADDR and ENDADDR are the start and end points for dhcp addresses to
221- be handed out on this test network. Choose appropriate values to match
222- the static network configuration of the HOST, and see the manpage for
223- dnsmasq for more details.</dt>
224-</dl>
225-
226-<p>Setup the various services:</p>
227-<dl>
228- <dt>sudo apt install -y curl dnsmasq apache2 syslinux-common</dt>
229- <dt>sudo curl URL -o /var/www/html/test-live-server-amd64.iso</dt>
230- <dt>sudo mkdir -p /srv/tftp/pxelinux.cfg</dt>
231- <dt>sudo mount -o loop,ro /var/www/html/test-live-server-amd64.iso /mnt</dt>
232- <dt>sudo cp /mnt/casper/initrd /srv/tftp</dt>
233- <dt>sudo cp /mnt/casper/vmlinuz /srv/tftp</dt>
234- <dt>sudo cp /usr/lib/syslinux/modules/bios/ldlinux.c32 /srv/tftp</dt>
235- <dt>sudo curl http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/current/legacy-images/netboot/pxelinux.0 -o /srv/tftp/pxelinux.0</dt>
236- <dt>sudo systemctl restart dnsmasq.service</dt>
237-</dl>
238-
239-<p>
240-Configure /etc/dnsmasq.d/pxe.conf:
241-</p>
242-<pre>
243-interface=INTERFACE,lo
244-bind-interfaces
245-dhcp-range=INTERFACE,STARTADDR,ENDADDR
246-dhcp-boot=pxelinux.0
247-enable-tftp
248-tftp-root=/srv/tftp
249-</pre>
250-
251-<p>Configure /var/www/html/autoinstall.yaml:</p>
252-<pre>
253-#cloud-config
254-autoinstall:
255- version: 1
256- identity:
257- hostname: live-server
258- # This password is ubuntu
259- # To use a different password, set the appropriate hash here.
260- # `mkpasswd`, from the 'whois' package, can help with hash creation.
261- password: $1$glNWVUKh$VxFYudlLU5FR9WDGXOK761
262- username: ubuntu
263- apt:
264- fallback: offline-install
265-</pre>
266-
267-<p>Configure /srv/tftp/pxelinux.cfg/default:</p>
268-<pre>
269-DEFAULT install
270-LABEL install
271- KERNEL vmlinuz
272- INITRD initrd
273- APPEND root=/dev/ram0 ramdisk_size=1500000 ip=dhcp cloud-config-url=http://HOST/autoinstall.yaml url=http://HOST/test-live-server-amd64.iso autoinstall
274-</pre>
275-
276-<p>
277-Power on the test machine and ensure that it boots PXE. The install should
278-complete without further interaction.
279-</p>
280-
281-<strong>If you finish the installation, please <a href="results#add_result">submit</a> a 'passed' result.
282- If any action fails, or produces an unexpected result, please <a href="results#add_result">submit</a> a 'failed' result and <a href="../../buginstructions">file a bug</a>. Please be sure to include the bug number when you <a href="results#add_result">submit</a> your result.</strong>

Subscribers

People subscribed via source and target branches