diff options
author | Gabriel Ionescu <gabriel.ionescu@enea.com> | 2017-10-13 16:01:47 +0200 |
---|---|---|
committer | Martin Borg <martin.borg@enea.com> | 2017-10-13 16:07:55 +0200 |
commit | 52b21feca5803392c6156b148332d93fad9288a2 (patch) | |
tree | 2b5628879aaaaf1fa9e04e48108f3a8a323f168c /nfv-installer/script-installer/README | |
download | nfv-access-tools-52b21feca5803392c6156b148332d93fad9288a2.tar.gz |
Add NFV Access installer script
Signed-off-by: Gabriel Ionescu <gabriel.ionescu@enea.com>
Signed-off-by: Martin Borg <martin.borg@enea.com>
Diffstat (limited to 'nfv-installer/script-installer/README')
-rw-r--r-- | nfv-installer/script-installer/README | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/nfv-installer/script-installer/README b/nfv-installer/script-installer/README new file mode 100644 index 0000000..e94e178 --- /dev/null +++ b/nfv-installer/script-installer/README | |||
@@ -0,0 +1,110 @@ | |||
1 | :The purpose of this installer is to guide you through creating a bootable | ||
2 | Enea NFV Access installation on a physical media (e.g. USB stick or HDD). | ||
3 | |||
4 | Prerequisites: | ||
5 | - A GRUB .efi binary | ||
6 | - A drive of 16GB or larger | ||
7 | - For USB booting you will need: | ||
8 | - A development based rootfs (e.g. enea-nfv-access-dev-inteld1521.tar.gz) | ||
9 | - For booting from an SSD or HDD you will need: | ||
10 | - Any rootfs that needs to be installed on the board | ||
11 | (e.g. enea-nfv-access.tar.gz) | ||
12 | |||
13 | A bootable media is created after the installer runs the following steps: | ||
14 | 1. Create two partitions on a designated drive (e.g. /dev/sda): | ||
15 | - a 512MB partition for GRUB | ||
16 | - the rest of the drive is reserved for the rootfs. | ||
17 | 2. Configure GRUB on one partition (usually the first one). | ||
18 | 3. Copy a root filesystem on the other partition. | ||
19 | |||
20 | Note: Running step 3 will implicitly copy the installer on that root filesystem | ||
21 | in /usr/bin/install_nfvaccess.sh | ||
22 | ---------------------------------------------------------------------------------------- | ||
23 | To get a list of what commands are built in the installer, launch it with root | ||
24 | rights and press ENTER, once the "nfv_installer>" console is displayed: | ||
25 | help - a guide on how to use the installer | ||
26 | list-params - lists parameters | ||
27 | list-steps - lists the available steps and the parameters that they depend on | ||
28 | set - sets a parameter (e.g. "set drive=/dev/sda") | ||
29 | clear - clears a parameter (e.g. "clear drive") | ||
30 | list-partitions - lists current drives and partitions | ||
31 | dry - describes the steps to be executed and checks if the files exist | ||
32 | run - executes the steps | ||
33 | q or quit - exits the script | ||
34 | |||
35 | Run 'list-steps' to understand the built-in steps that the installer | ||
36 | can execute and what parameters they depend on in order to be executed. | ||
37 | |||
38 | Running 'list-steps' will print the following: | ||
39 | 1. Format drive - Uses the drive set for the "drive" parameter to create a | ||
40 | 512MB partition for GRUB and another partition for the rootfs. The rootfs | ||
41 | partition will be as large as the physical media minus 512MB. | ||
42 | Depends on the following parameter(s): | ||
43 | drive= | ||
44 | 2. GRUB install - Installs the binary pointed by "grub_binary" on the drive | ||
45 | set in "grub_destination". A grub.cfg file will be created that will be | ||
46 | configured to boot off of "rootfs_destination". | ||
47 | Depends on the following parameters: | ||
48 | grub_destination= | ||
49 | grub_binary= | ||
50 | rootfs_destination= | ||
51 | 3. Root filesystem install - Copies the files found in "rootfs_targz" to | ||
52 | the drive set in "rootfs_destination". | ||
53 | Depends on the following parameters: | ||
54 | rootfs_targz= | ||
55 | rootfs_destination= | ||
56 | |||
57 | A parameter can be set through the "set" command or cleared through "clear". | ||
58 | As some parameters are common for multiple steps, like rootfs_destination | ||
59 | is for the GRUB and rootfs installation steps, you can get a list of all the | ||
60 | parameters, by running "list-params". | ||
61 | |||
62 | The following parameters can be configured: | ||
63 | grub_destination=[drive] - specifies the drive where GRUB will be | ||
64 | installed | ||
65 | grub_binary=[file] - points to the GRUB executable to be installed | ||
66 | where grub_destination is set | ||
67 | rootfs_destination=[drive] - specifies where the rootfs will be deployed | ||
68 | rootfs_targz=[.tar.gz file] - what file to unpack to where | ||
69 | rootfs_destination is set | ||
70 | drive=[/dev/sdaX] - what drive to partition | ||
71 | |||
72 | Before running the actual partitioning and copying, a dry run can be executed | ||
73 | without affecting the actual layout of the physical media, by running the | ||
74 | "dry" command. | ||
75 | |||
76 | Example of partitioning a drive: | ||
77 | set drive=/dev/sda | ||
78 | run | ||
79 | |||
80 | Example of partitioning a drive, installing GRUB and a root filesystem: | ||
81 | set drive=/dev/sda | ||
82 | set grub_destination=/dev/sda1 | ||
83 | set grub_binary=/home/user/grub-binary.efi | ||
84 | set rootfs_destination=/dev/sda2 | ||
85 | set rootfs_targz=/home/user/rootfs.tar.gz | ||
86 | run | ||
87 | |||
88 | Example of deploying ONLY a root filesystem: | ||
89 | set rootfs_destination=/dev/sda2 | ||
90 | set rootfs_targz=/home/user/rootfs.tar.gz | ||
91 | runs | ||
92 | |||
93 | Troubleshooting: | ||
94 | - GRUB is throwing "error: no such partition" or "error: disk not found": | ||
95 | The default GRUB config is set to use 'hd0' as the primary drive for | ||
96 | booting. | ||
97 | Due to this, the errors described above have two possible causes: | ||
98 | - The drive where NFV Access was installed is not identified as 'hd0' | ||
99 | by the BIOS | ||
100 | - The BIOS has assigned the 'hd0' label to a different drive (e.g. USB | ||
101 | stick) than the one where NFV Access was installed. | ||
102 | Solution: | ||
103 | 1. In the GRUB selection screen press 'c' to enter the command line. | ||
104 | 2. Run 'ls' to list all the available partitions. | ||
105 | 3. For each available partition run 'ls PARTITION' in order to identify | ||
106 | where NFV Access was installed. | ||
107 | 4. After identifying the partition, press ESC to return to the GRUB | ||
108 | selection screen and press 'e' to edit the boot command. | ||
109 | 5. Set the boot partition to the one identified in step 3 | ||
110 | 6. Press F10 to boot | ||