-
Notifications
You must be signed in to change notification settings - Fork 39
Installation
By default, the switch comes pre-installed with [ONIE][1], which defines an open install environment for bare metal network switches. However, [PXE][2] installation is also possible. This document describes both methods.
Note: Installing using PXE uninstalls ONIE, which might be required by other operating systems.
- Getting the Installation Files
- Default Credentials
- Installing with ONIE
- Installing with PXE
- Customizing the Installation
- Post Installation Updates
- Installing ONIE
For Fedora, an installation tarball is available [here][3]. The following files are included in the provided tarball:
- The operating system ONIE installer, if using ONIE -
Fedora-ONIE-installer.bin
- Two auto-install files ([kickstart][4]) for ONIE and PXE -
install-onie.ks
andinstall-pxe.ks
- Recent Fedora ISO
Note that the Fedora ISO image is there to ease the installation process; It is an unmodified copy of the ISO that can be downloaded directly from [Fedora][5].
User: root Password: switchdevftw
The root password can be easily changed by editing the rootpw
command
in the kickstart file. It is highly recommended to do so!
The ONIE project describes a variety of [installation options][6]. This section describes installation using an HTTP server accessible through the management port on the switch.
The extracted contents of the ISO file, the ONIE installer and the kickstart
file (e.g. install-onie.ks
), should all be accessible through an HTTP server.
To extract the contents from the ISO file, you must first mount it. Run:
$ mount -o loop,ro -t iso9660 /path/file.iso /path/iso/directory
Then copy the contents over to the HTTP server directory. Run:
$ cp -r /path/iso/directory /path/http/server
Finally, edit the auto-install file to point to the HTTP server.
In the kickstart file, edit the url
command to point to the
extracted ISO directory.
Note: The ONIE installer makes a few assumptions about the location and
name of the auto-install. In the provided package, it is assumed that
the kickstart file is named install-onie.ks
and that it is located
in a directory called ks
, placed next to the ONIE installer. For example:
├── ks
│ ├── install-onie.ks
├── Fedora-ONIE-installer.bin
Reboot the switch and select ONIE: Resuce
in GRUB menu as the [discovery
phase][16] is unnecessary:
+----------------------------------------------------------------------------+
| ONIE: Install OS |
|*ONIE: Rescue |
| ONIE: Uninstall OS |
| ONIE: Update ONIE |
| ONIE: Embed ONIE |
| |
In the ONIE prompt run the following:
ONIE:/ # onie-nos-install http://server/Fedora-ONIE-installer.bin
From this point on, the installation is completely automatic. Once it is complete, the switch reboots into the newly installed system.
Reboot the switch and select ONIE
in the GRUB menu:
Fedora (4.8.13-100.fc23.x86_64) 23 (Twenty Three)
Fedora (0-rescue-851011758d7ea341a944f10920a2faa5) 23 (Twenty Three)
ONIE
Then select ONIE: Uninstall OS
. This removes the partitions used by the
OS, but keeps ONIE installed, so that a new OS can be installed using
it.
The instructions below assume that a configured PXE server is already available on the network and that the installation files are available over HTTP. However, [other methods][7] are possible.
As with the ONIE installation, the extracted contents of the ISO file and the
kickstart file (e.g. install-pxe.ks
) should all be accessible through an HTTP
server.
To extract the contents from the ISO file, first mount it. Run:
$ mount -o loop,ro -t iso9660 /path/file.iso /path/iso/directory
And copy the contents over to the HTTP server directory. Run:
$ cp -r /path/iso/directory /path/http/server
In addition, the kernel executable and the initrd image should be copied over to the PXE server. Run:
$ cp /path/iso/directory/images/pxeboot/{initrd.img,vmlinuz} /tftpboot/directory/
Next, edit the auto-install file to point to the HTTP server:
- In the kickstart file, edit the
url
command to point to the extracted ISO directory. - add the following lines to the file
/tftpboot/pxelinux.cfg/default
on the PXE server:
LABEL MY_LABEL
kernel directory/vmlinuz
append initrd=directory/initrd.img inst.ks=http://server/path/install-pxe.ks console=ttyS0,115200n8 modprobe.blacklist=mlxsw_pci
Make sure network boot is enabled in the BIOS (Ctrl+b) and reboot the switch.
Once up, select the recently configured PXE label (e.g. MY_LABEL
) and the
automated installation should begin.
Once done, the switch reboots into the newly installed system.
As explained above, the installation is automated using auto-install files. These files can be easily edited to provide different answers during the installation, and to select different packages to install by default. Please refer to the official RedHat [kickstart documentation][8] for more info.
Creating an ONIE-compatible installer from an ISO image is explained in [ONIE's Github repository][15], in case one wants to create its own installer.
Once Fedora is installed, it is advised to upgrade all packages to the latest available by using:
$ dnf upgrade
Notice this would also upgrade the kernel image (assuming a newer one is available) and a reboot would be required following the command's completion.
You can find more information [here][13] or in the [DNF man page][14].
At this point it is also possible to use DNF and install packages of interest
that are not part of the ISO. Some notable packages worthy of mentioning are:
iproute-tc
gcc
teamd
bridge-utils
This can be achieved by using:
` `` $ dnf install
Installing ONIE
---------------
To install ONIE on the switch you might need to access the BIOS (Ctrl+b)
and change the boot order. If the BIOS is password-protected, please
contact Mellanox global support.
For both methods described below you need the ONIE installation files
which are available [here][10]. Version `r5.0.1410` is used as an
example.
Further information regarding ONIE installation can be found in ONIE's
official documentation located [here][11].
#### Using PXE
Copy the following files to the appropriate place on the PXE server:
mlnx_x86-r5.0.1410.vmlinuz recovery-x86_64-mlnx_x86-r5.0.1410.initrd
Create the following PXE label on the server:
LABEL ONIE_r5.0.1410 KERNEL /mlnx_x86-r5.0.1410.vmlinuz APPEND /recovery-x86_64-mlnx_x86-r5.0.1410.initrd panic=10 noexec=off console=ttyS0,115200n8 ramdisk_size=1048576 root=/dev/ram boot_reason=embed install_url=file:///lib/onie/onie-updater boot_env=recovery acpi_enforce_resources=no nmi_watchdog=0
Make sure the switch is configured to boot from PXE, reboot it and choose
the `ONIE_r5.0.1410` label in the PXE menu.
#### Using a USB Drive
Copy the ISO file (e.g. `onie-recovery-x86_64-mlnx_x86-r5.0.1410.iso`)
to a USB drive. On Linux systems this can be done using the `dd`
utility. On Windows, an application such as [this one][12] is needed.
Connect the USB drive to the switch, make sure the switch is configured
to boot from the USB drive and reboot the switch. When the ONIE menu is
presented choose the `ONIE: Embed ONIE` option to install ONIE on the
switch.
#### Using kexec
If you are currently running Linux with kexec tools, booting into the
recovery image directly from the current operating system might also be
possible.
Download the ISO file to the switch, and issue the following commands:
mkdir -p /mnt/cdrom mount -o loop onie-recovery-x86_64-mlnx_x86-r5.0.1410.iso /mnt/cdrom kexec -l /mnt/cdrom/vmlinuz --initrd=/mnt/cdrom/initrd.xz --command-line "console=tty0 console=ttyS0,115200n8 boot_env=recovery boot_reason=embed install_url=file:///lib/onie/onie-updater" kexec -e
This should reinstall ONIE.
[1]: http://onie.org/
[2]: https://en.wikipedia.org/wiki/Preboot_Execution_Environment
[3]: http://switchdev.mellanox.com/releases/
[4]: https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst
[5]: https://getfedora.org/server/download/
[6]: https://github.com/opencomputeproject/onie/wiki/Quick-Start-Guide
[7]: https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#install
[8]: https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst
[9]: https://github.com/opencomputeproject/onie/blob/master/contrib/debian-iso/README.md
[10]: http://switchdev.mellanox.com/onie/
[11]: https://opencomputeproject.github.io/onie/design-spec/x86_recovery.html
[12]: https://rufus.akeo.ie/
[13]: https://fedoraproject.org/wiki/DNF?rd=Dnf
[14]: http://dnf.readthedocs.io/en/latest/command_ref.html
[15]: https://github.com/opencomputeproject/onie/blob/master/contrib/debian-iso/README.md
[16]: https://opencomputeproject.github.io/onie/design-spec/discovery.html
General information
System Maintenance
Network Interface Configuration
- Switch Port Configuration
- Netdevice Statistics
- Persistent Configuration
- Quality of Service
- Queues Management
- How To Configure Lossless RoCE
- Port Mirroring
- ACLs
- OVS
- Resource Management
- Precision Time Protocol (PTP)
Layer 2
Network Virtualization
Layer 3
- Static Routing
- Virtual Routing and Forwarding (VRF)
- Tunneling
- Multicast Routing
- Virtual Router Redundancy Protocol (VRRP)
Debugging