diff options
-rw-r--r-- | doc/book-enea-nfv-access-guide/doc/getting_started.xml | 353 |
1 files changed, 107 insertions, 246 deletions
diff --git a/doc/book-enea-nfv-access-guide/doc/getting_started.xml b/doc/book-enea-nfv-access-guide/doc/getting_started.xml index 65888bf..6c3db86 100644 --- a/doc/book-enea-nfv-access-guide/doc/getting_started.xml +++ b/doc/book-enea-nfv-access-guide/doc/getting_started.xml | |||
@@ -1,46 +1,15 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | 2 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
4 | <chapter id="plat-release-content"> | 4 | <chapter id="plat-release-content"> |
5 | <title>Getting Started with Enea NFV Access</title> | 5 | <title>Getting Started with Enea NFV Access</title> |
6 | 6 | ||
7 | <para>Using Enea NFV Access requires access to a Linux machine, which is | 7 | <para>Using Enea NFV Access requires access to a Linux machine, which is |
8 | used for preparing a bootable drive or for developing applications. System | 8 | used for preparing a boot setup or for developing applications. System |
9 | requirements for the development host are detailed in the <xi:include | 9 | requirements for the development host are detailed in the <xi:include |
10 | href="../../s_docbuild/olinkdb/pardoc-common.xml" | 10 | href="../../s_docbuild/olinkdb/pardoc-common.xml" |
11 | xmlns:xi="http://www.w3.org/2001/XInclude" | 11 | xmlns:xi="http://www.w3.org/2001/XInclude" |
12 | xpointer="element(book_enea_nfv_access_release_info/1)" />.</para> | 12 | xpointer="element(book_enea_nfv_access_release_info/1)" /></para> |
13 | |||
14 | <section id="sysshell_config"> | ||
15 | <title>Default Shell Configuration</title> | ||
16 | |||
17 | <para>Before installing Enea NFV Access, make sure that bash is the | ||
18 | default shell.</para> | ||
19 | |||
20 | <para><emphasis role="bold">To verify the default system | ||
21 | shell</emphasis></para> | ||
22 | |||
23 | <itemizedlist> | ||
24 | <listitem> | ||
25 | <para>If your system runs Ubuntu, use list to verify if | ||
26 | <filename>/usr/bin</filename> is a symbolic link to <emphasis | ||
27 | role="bold">bash</emphasis>:</para> | ||
28 | |||
29 | <programlisting># ls -l /bin/sh | ||
30 | lrwxrwxrwx 1 root root 4 2012-03-02 11:53 /bin/sh -> bash</programlisting> | ||
31 | </listitem> | ||
32 | |||
33 | <listitem> | ||
34 | <para>Optionally, in case the link points to <literal>dash</literal>, | ||
35 | change it through the following steps:</para> | ||
36 | |||
37 | <programlisting># ls -l /bin/sh | ||
38 | lrwxrwxrwx 1 root root 4 2012-03-02 11:53 /bin/sh -> dash | ||
39 | # sudo dpkg-reconfigure dash | ||
40 | Use dash as the default system shell (/bin/sh)? No</programlisting> | ||
41 | </listitem> | ||
42 | </itemizedlist> | ||
43 | </section> | ||
44 | 13 | ||
45 | <section condition="hidden" id="release-content"> | 14 | <section condition="hidden" id="release-content"> |
46 | <title>NFV Access Release content</title> | 15 | <title>NFV Access Release content</title> |
@@ -91,7 +60,7 @@ Use dash as the default system shell (/bin/sh)? No</programlisting> | |||
91 | <para>For each combination of image and target, the following set of | 60 | <para>For each combination of image and target, the following set of |
92 | artifacts is available:</para> | 61 | artifacts is available:</para> |
93 | 62 | ||
94 | <programlisting>-- bzImage | 63 | <programlisting format="linespecific">-- bzImage |
95 | /* kernel image */ | 64 | /* kernel image */ |
96 | -- bzImage-<target>.bin | 65 | -- bzImage-<target>.bin |
97 | /* kernel image, same as above */ | 66 | /* kernel image, same as above */ |
@@ -130,216 +99,108 @@ Use dash as the default system shell (/bin/sh)? No</programlisting> | |||
130 | <section condition="hidden" id="prebuilt-artifacts"> | 99 | <section condition="hidden" id="prebuilt-artifacts"> |
131 | <title>How to use the Prebuilt Artifacts</title> | 100 | <title>How to use the Prebuilt Artifacts</title> |
132 | 101 | ||
133 | <section id="boot-ramdisk"> | 102 | <section id="sysshell_config"> |
134 | <title>Booting Enea NFV Access using RAMDISK</title> | 103 | <title>Booting NFV Access to RAM</title> |
135 | 104 | ||
136 | <para>There may be use cases, especially at first target ramp-up, where | 105 | <para>NFV Access can be booted on target using the RAMDISK images. |
137 | the HDD/SDD has no partitions and you need to prepare the disks for | 106 | Following is described how to prepare the environment and configure |
138 | boot. Booting from ramdisk can help with this task.</para> | 107 | bootloader(U-Boot), load and boot the NFV Access on target. Please check |
139 | 108 | the <link linkend="boot_prereq">Prerequisites</link> subchapter before | |
140 | <para>The prerequisites needed to proceed:</para> | 109 | starting boot process.</para> |
141 | 110 | ||
142 | <itemizedlist> | 111 | <para>Connect to target over serial and stop default boot process in |
143 | <listitem> | 112 | U-Boot command line interface. Set U-Boot network configuration for the |
144 | <para>Enea NFV Access ext4 rootfs image - | 113 | ethernet port which connects the target to the network. If target is not |
145 | enea-nfv-access-inteld1521.ext4.gz</para> | 114 | connected on a specific network, Enea provides DHCP and TFTP servers. |
146 | </listitem> | 115 | Please see <link linkend="boot_docker">Docker Installer</link> |
147 | 116 | subchapter about how to install them on a development host.</para> | |
148 | <listitem> | 117 | |
149 | <para>Enea NFV Access kernel image - bzImage</para> | 118 | <programlisting>> setenv ethact <vnic0/vnic1> |
150 | </listitem> | 119 | > setenv gatewayip <GatewayIP> |
151 | 120 | > setenv serverip <TFTPserverIP> | |
152 | <listitem> | 121 | > setenv netmask <netmask> |
153 | <para>BIOS has PXE boot enabled</para> | 122 | > setenv ipaddr <target IP></programlisting> |
154 | </listitem> | 123 | |
155 | 124 | <para>Boot NFV Access images:</para> | |
156 | <listitem> | 125 | |
157 | <para>PXE/tftp server configured and connected (ethernet) to | 126 | <programlisting>> tftpboot $kernel_addr Image |
158 | target.</para> | 127 | > setenv rootfs_addr 0x60000000 |
159 | </listitem> | 128 | > tftpboot $rootfs_addr enea-nfv-access-cn8304.ext4.gz.u-boot |
160 | </itemizedlist> | 129 | > booti $kernel_addr $rootfs_addr $fdtcontroladdr |
161 | 130 | > setenv bootargs root=/dev/ram0 rw ramdisk_size=1000000 console=ttyAMA0,115200n8 earlycon=pl011,0x87e028000000 coherent_pool=16M</programlisting> | |
162 | <para>Unzip enea-nfv-access-inteld1521.ext4 and copy bzImage and | 131 | |
163 | enea-nfv-access-inteld1521.ext4 images to the tftpserver configured for | 132 | <section id="boot_prereq"> |
164 | PXE boot.</para> | 133 | <title>Prerequisites:</title> |
165 | 134 | ||
166 | <para>Use the following as an example for the PXE configuration | 135 | <itemizedlist> |
167 | file:</para> | 136 | <listitem> |
168 | 137 | <para>NFV Acccess images - see NFV Access release content</para> | |
169 | <programlisting>default vesamenu.c32 | 138 | </listitem> |
170 | prompt 1 | 139 | </itemizedlist> |
171 | timeout 0 | 140 | |
172 | 141 | <itemizedlist> | |
173 | label el_ramfs | 142 | <listitem> |
174 | menu label ^EneaLinux_RAMfs | 143 | <para>DHCP server - If the board is not connected into a specific |
175 | kernel bzImage | 144 | network Enea provides a docker image with DHCP server. Please see |
176 | append root=/dev/ram0 initrd=enea-nfv-access-inteld1521.ext4 / | 145 | <link linkend="boot_docker">Docker Installer</link> |
177 | ramdisk_size=1200000 console=ttyS0,115200 eralyprintk=ttyS0,115200</programlisting> | 146 | subchapter.</para> |
178 | 147 | </listitem> | |
179 | <para>Restart the target. Then enter (F11) in the Boot Menu and select | 148 | </itemizedlist> |
180 | the Ethernet interface used for PXE boot. From the PXE Boot Menu select | 149 | |
181 | <emphasis role="bold">Enea NFV Access_RAMfs</emphasis>. Once the Enea | 150 | <itemizedlist> |
182 | NFV Access is started you can partition the HDD/SDD and install GRUB as | 151 | <listitem> |
183 | described in in the following section.</para> | 152 | <para>TFTP server - If the board is not connected into a specific |
184 | </section> | 153 | network Enea provides a docker image with TFTP server. Please see |
185 | 154 | <link linkend="boot_docker">Docker Installer</link> | |
186 | <section id="install-grub"> | 155 | subchapter.</para> |
187 | <title>Partitioning a new harddisk and installing GRUB</title> | 156 | </listitem> |
188 | 157 | </itemizedlist> | |
189 | <para>The prerequisites needed:</para> | 158 | |
190 | 159 | <itemizedlist> | |
191 | <itemizedlist> | 160 | <listitem> |
192 | <listitem> | 161 | <para>The board with U-Boot connected to a development host over |
193 | <para>grub (<literal>grub-efi-bootx64.efi</literal>) - availalble as | 162 | serial and ethernet.</para> |
194 | a pre-built artifact under | 163 | </listitem> |
195 | <literal>inteld1521/images/enea-nfv-access</literal>.</para> | 164 | </itemizedlist> |
196 | </listitem> | 165 | </section> |
197 | 166 | ||
198 | <listitem> | 167 | <section id="boot_docker"> |
199 | <para><literal>e2fsprogs-mke2fs_1.43.4-r0.0_amd64.deb,/</literal></para> | 168 | <title>Docker Installer</title> |
200 | 169 | ||
201 | <para><literal>dosfstools_4.1-r0.0_amd64.deb</literal> - available | 170 | <para>Enea provides a suite of tools in order to create a complete |
202 | under <literal>inteld1521/deb</literal>.</para> | 171 | boot process setup. System requirements for the development host are |
203 | </listitem> | 172 | detailed in the Enea NFV Access Release Information document included |
204 | </itemizedlist> | 173 | with this release. All tools are leveraged by a docker image. The |
205 | 174 | docker image must be built and ran on development host. DHCP and TFTP | |
206 | <para>Proceed using the following steps:</para> | 175 | servers will be installed and configured in order to facilitate a |
207 | 176 | RAMDISK boot process on the target. Following is an example of how to | |
208 | <orderedlist> | 177 | build and run Enea provided docker image. In this case host is |
209 | <listitem> | 178 | directly connected to target on eth1. For more details please see |
210 | <para>Boot target with Enea NFV Access from RAMDISK</para> | 179 | README file from docker installater folder.</para> |
211 | </listitem> | 180 | |
212 | 181 | <programlisting>> cd nfv-access-tools/nfv-installer/docker-pxe-ramboot/ | |
213 | <listitem> | 182 | > mkdir -p ./images |
214 | <para>Install prerequisite packages:</para> | 183 | > cp <NFVAccessReleasePath>/Image $(pwd)/images/Image |
215 | 184 | > cp <NFVAccessReleasePath>/enea-nfv-access-cn8304.ext4.gz.u-boot $(pwd)/images/enea-nfv-access-cn8304.ext4.gz.u-boot</programlisting> | |
216 | <programlisting>> dpkg -i e2fsprogs-mke2fs_1.43.4-r0.0_amd64.deb | 185 | |
217 | > dpkg -i dosfstools_4.1-r0.0_amd64.deb</programlisting> | 186 | <programlisting>> docker build . -t el_installer</programlisting> |
218 | </listitem> | 187 | |
219 | 188 | <programlisting>> docker run -it --net=host --privileged \ | |
220 | <listitem> | 189 | -v $(pwd)/dhcpd.conf:/etc/dhcp/dhcpd.conf \ |
221 | <para>Partition the disk:</para> | 190 | -v $(pwd)/images/Image:/var/lib/tftpboot/Image \ |
222 | 191 | -v $(pwd)/images/enea-nfv-access-cn8304.ext4.gz.u-boot:/var/lib/tftpboot/enea-nfv-access-cn8304.ext4.gz.u-boot \ | |
223 | <programlisting>> fdisk /dev/sda | 192 | el_installer eth1</programlisting> |
224 | fdisk> g {GPT partition type} | 193 | |
225 | fdisk> n | 194 | <para>Using this setup, on target side, U-Boot need to be configured |
226 | fdisk> 1 | 195 | as following before starting to boot Linux. It was considered that the |
227 | fdisk> {default start part} | 196 | first eth port(vnic0) is connected to host:</para> |
228 | fdisk> +512M | 197 | |
229 | fdisk> t | 198 | <programlisting>> setenv ethact vnic0 |
230 | fdisk> 1 {ESP/EFI partition} | 199 | > setenv gatewayip 192.168.1.1 |
231 | fdisk> n | 200 | > setenv serverip 192.168.1.1 |
232 | fdisk> 2 | 201 | > setenv netmask 255.255.255.0 |
233 | fdisk> {default start part} | 202 | > setenv ipaddr 192.168.1.150</programlisting> |
234 | fdisk> +18G | 203 | </section> |
235 | fdisk> 3 | ||
236 | fdisk> {default start part} | ||
237 | fdisk> +20G | ||
238 | ... | ||
239 | fdisk> 7 | ||
240 | fdisk> {default start part} | ||
241 | fdisk> {default end end part} | ||
242 | |||
243 | fdisk> p {print partion table} | ||
244 | fdisk> w {write to disk} | ||
245 | fdisk> q</programlisting> | ||
246 | </listitem> | ||
247 | |||
248 | <listitem> | ||
249 | <para>Format the partitions:</para> | ||
250 | |||
251 | <programlisting>> mkfs.fat -F32 -nEFI /dev/sda1 | ||
252 | > mkfs.ext4 -LROOT /dev/sda2 | ||
253 | > mkfs.ext4 -LROOT /dev/sda3 | ||
254 | > mkfs.ext4 -LROOT /dev/sda4 | ||
255 | > mkfs.ext4 -LROOT /dev/sda5 | ||
256 | > mkfs.ext4 -LROOT /dev/sda6 | ||
257 | > mkfs.ext4 -LROOT /dev/sda7</programlisting> | ||
258 | </listitem> | ||
259 | |||
260 | <listitem> | ||
261 | <para>Create a GRUB partition:</para> | ||
262 | |||
263 | <programlisting>> mkdir /mnt/boot | ||
264 | > mount /dev/sda1 /mnt/boot | ||
265 | > mkdir -p /mnt/boot/EFI/boot | ||
266 | |||
267 | > cp grub-efi-bootx64.efi /mnt/boot/EFI/boot/bootx64.efi | ||
268 | > vi /mnt/boot/EFI/boot/grub.cfg | ||
269 | default=1 | ||
270 | |||
271 | menuentry "Linux Reference Image" { | ||
272 | linux (hd0,gpt2)/boot/bzImage root=/dev/sda2 ip=dhcp | ||
273 | } | ||
274 | |||
275 | menuentry "Linux sda3" { | ||
276 | linux (hd0,gpt3)/boot/bzImage root=/dev/sda3 ip=dhcp | ||
277 | } | ||
278 | |||
279 | menuentry "Linux sda4" { | ||
280 | linux (hd0,gpt4)/boot/bzImage root=/dev/sda4 ip=dhcp | ||
281 | } | ||
282 | |||
283 | menuentry "Linux sda5" { | ||
284 | linux (hd0,gpt5)/boot/bzImage root=/dev/sda5 ip=dhcp | ||
285 | } | ||
286 | |||
287 | menuentry "Linux sda6" { | ||
288 | linux (hd0,gpt6)/boot/bzImage root=/dev/sda6 ip=dhcp | ||
289 | } | ||
290 | |||
291 | menuentry "Linux sda7" { | ||
292 | linux (hd0,gpt7)/boot/bzImage root=/dev/sda7 ip=dhcp | ||
293 | }</programlisting> | ||
294 | </listitem> | ||
295 | </orderedlist> | ||
296 | </section> | ||
297 | |||
298 | <section id="boot-hdd"> | ||
299 | <title>Installing and booting Enea NFV Access on the harddisk</title> | ||
300 | |||
301 | <para>After partitioning the harddisk, boot Enea NFV Access from RAMFS | ||
302 | or from a reference image installed on one of the partitions.</para> | ||
303 | |||
304 | <para>To install Enea NFV Access image on a partition follow these | ||
305 | steps:</para> | ||
306 | |||
307 | <orderedlist> | ||
308 | <listitem> | ||
309 | <para>Copy your image on target:</para> | ||
310 | |||
311 | <programlisting>server> scp ./enea-nfv-access-inteld1521.tar.gz / | ||
312 | root@<target_ip>:/home/root/</programlisting> | ||
313 | </listitem> | ||
314 | |||
315 | <listitem> | ||
316 | <para>Extract image onto the desired partition:</para> | ||
317 | |||
318 | <programlisting>target> mount /dev/sda3 /mnt/sda | ||
319 | target> tar -pzxf /home/root/enea-nfv-access-inteld1521.tar.gz / | ||
320 | -C /mnt/sda</programlisting> | ||
321 | |||
322 | <para>Alternately, you can do both steps in one command from the | ||
323 | server:</para> | ||
324 | |||
325 | <programlisting>server> cat ./enea-nfv-access-inteld1521.tar.gz | / | ||
326 | ssh root@<target_ip> "cd /mnt/sda6; tar -zxf -"</programlisting> | ||
327 | </listitem> | ||
328 | |||
329 | <listitem> | ||
330 | <para>Reboot</para> | ||
331 | </listitem> | ||
332 | |||
333 | <listitem> | ||
334 | <para>From the GRUB menu select your partition</para> | ||
335 | </listitem> | ||
336 | </orderedlist> | ||
337 | |||
338 | <note> | ||
339 | <para>In order to change kernel boot parameters you need to mount the | ||
340 | GRUB partition (i.e. <literal>/dev/sda1</literal>) and change the | ||
341 | <literal>EFI/boot/grub.cfg</literal> file.</para> | ||
342 | </note> | ||
343 | </section> | 204 | </section> |
344 | </section> | 205 | </section> |
345 | </chapter> | 206 | </chapter> \ No newline at end of file |