Skip to main content
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

以 ONIE 模式安装 Cumulus Linux

贡献者 netapp-yvonneo netapp-jolieg

当交换机运行在 ONIE 模式下时,请按照以下步骤安装 Cumulus Linux (CL) 操作系统。

备注 Cumulus Linux (CL) 操作系统可以在交换机运行 ONIE 或 Cumulus Linux 时安装(参见)。"以 Cumulus 模式安装" )。
关于此任务

您可以使用开放网络安装环境 (ONIE) 安装 Cumulus Linux,ONIE 可以自动发现网络安装程序映像。这有助于实现通过操作系统选择(例如 Cumulus Linux)来保护交换机的系统模型。使用 ONIE 安装 Cumulus Linux 最简单的方法是通过本地 HTTP 发现。

备注 如果您的主机支持 IPv6,请确保它正在运行 Web 服务器。如果您的主机支持 IPv4,请确保除了 Web 服务器之外,它还运行 DHCP 服务。

本过程演示了管理员在 ONIE 启动后如何升级 Cumulus Linux。

示例 1. 步骤
Cumulus Linux 4.4.3
  1. 将 Cumulus Linux 安装文件下载到 Web 服务器的根目录。将此文件重命名为: onie-installer

  2. 使用以太网线将主机连接到交换机的管理以太网端口。

  3. 打开开关电源。

    交换机下载 ONIE 镜像安装程序并启动。安装完成后,终端窗口中会出现 Cumulus Linux 登录提示符。

    备注 每次安装 Cumulus Linux 时,整个文件系统结构都会被擦除并重建。
  4. 重启SN2100交换机:

    cumulus@cumulus:mgmt:~$ sudo reboot
  5. 在 GNU GRUB 屏幕上按 Esc 键中断正常的启动过程,选择 ONIE,然后按 Enter 键。

  6. 在下一个屏幕上,选择 ONIE:安装操作系统

  7. ONIE 安装程序发现过程会运行以搜索自动安装程序。按 Enter 键暂时停止该进程。

  8. 当发现过程停止时:

    ONIE:/ # onie-stop
    discover: installer mode detected.
    Stopping: discover...start-stop-daemon: warning: killing process 427:
    No such process done.
  9. 如果您的网络正在运行 DHCP 服务,请验证 IP 地址、子网掩码和默认网关是否已正确分配:

    ifconfig eth0

    ONIE:/ # ifconfig eth0
    eth0   Link encap:Ethernet  HWaddr B8:CE:F6:19:1D:F6
           inet addr:10.233.204.71  Bcast:10.233.205.255  Mask:255.255.254.0
           inet6 addr: fe80::bace:f6ff:fe19:1df6/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:21344 errors:0 dropped:2135 overruns:0 frame:0
           TX packets:3500 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:6119398 (5.8 MiB)  TX bytes:472975 (461.8 KiB)
           Memory:dfc00000-dfc1ffff
    
    ONIE:/ # route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    
    default         10.233.204.1    0.0.0.0         UG    0      0      0   eth0
    10.233.204.0    *               255.255.254.0   U     0      0      0   eth0
  10. 如果 IP 地址方案是手动定义的,请执行以下操作:

    ONIE:/ # ifconfig eth0 10.233.204.71 netmask 255.255.254.0
    ONIE:/ # route add default gw 10.233.204.1
  11. 重复步骤 9 以验证静态信息是否已正确输入。

  12. 安装 Cumulus Linux:

    # onie-nos-install http://<web-server>/<path>/cumulus-linux-4.4.3-mlx-amd64.bin
    ONIE:/ # route
    
      Kernel IP routing table
    
      ONIE:/ # onie-nos-install http://<web-server>/<path>/cumulus-linux-4.4.3-mlx-amd64.bin
    
      Stopping: discover... done.
      Info: Attempting http://10.60.132.97/x/eng/testbedN,svl/nic/files/cumulus-linux-4.4.3-mlx-amd64.bin ...
      Connecting to 10.60.132.97 (10.60.132.97:80)
      installer            100% |*|   552M  0:00:00 ETA
      ...
      ...
  13. 安装完成后,登录交换机。

    cumulus login: cumulus
    Password: cumulus
    You are required to change your password immediately (administrator enforced)
    Changing password for cumulus.
    Current password: cumulus
    New password: <new_password>
    Retype new password: <new_password>
  14. 请验证 Cumulus Linux 版本: net show version

    cumulus@cumulus:mgmt:~$ net show version
    NCLU_VERSION=1.0-cl4.4.3u4
    DISTRIB_ID="Cumulus Linux"
    DISTRIB_RELEASE=4.4.3
    DISTRIB_DESCRIPTION="Cumulus Linux 4.4.3”
Cumulus Linux 5.x
  1. 将 Cumulus Linux 安装文件下载到 Web 服务器的根目录。将此文件重命名为: onie-installer

  2. 使用以太网线将主机连接到交换机的管理以太网端口。

  3. 打开开关电源。

    交换机下载 ONIE 镜像安装程序并启动。安装完成后,终端窗口中会出现 Cumulus Linux 登录提示符。

    备注 每次安装 Cumulus Linux 时,整个文件系统结构都会被擦除并重建。
  4. 重启SN2100交换机:

    cumulus@cumulus:mgmt:~$ sudo reboot
    .
    .
    GNU GRUB version 2.06-3
    +-------------------------------------------------------------------------+
    | Cumulus-Linux GNU/Linux                                                 |
    | Advanced options for Cumulus-Linux GNU/Linux                            |
    | ONIE                                                                    |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    +-------------------------------------------------------------------------+
  5. 在 GNU GRUB 屏幕上按 Esc 键中断正常的启动过程,选择 ONIE,然后按 Enter 键。

    .
    .
    Loading ONIE ...
    
    GNU GRUB version 2.02
    +-------------------------------------------------------------------------+
    | ONIE: Install OS                                                        |
    | ONIE: Rescue                                                            |
    | ONIE: Uninstall OS                                                      |
    | ONIE: Update ONIE                                                       |
    | ONIE: Embed ONIE                                                        |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    +-------------------------------------------------------------------------+

    选择 ONIE:安装操作系统

  6. ONIE 安装程序发现过程会运行以搜索自动安装程序。按 Enter 键暂时停止该进程。

  7. 当发现过程停止时:

    ONIE:/ # onie-stop
    discover: installer mode detected.
    Stopping: discover...start-stop-daemon: warning: killing process 427:
    No such process done.
  8. 配置IP地址、子网掩码和默认网关:

    ifconfig eth0

    ONIE:/ # ifconfig eth0
    eth0   Link encap:Ethernet  HWaddr B8:CE:F6:19:1D:F6
           inet addr:10.233.204.71  Bcast:10.233.205.255  Mask:255.255.254.0
           inet6 addr: fe80::bace:f6ff:fe19:1df6/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:21344 errors:0 dropped:2135 overruns:0 frame:0
           TX packets:3500 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:6119398 (5.8 MiB)  TX bytes:472975 (461.8 KiB)
           Memory:dfc00000-dfc1ffff
    ONIE:/ #
    ONIE:/ # ifconfig eth0 10.228.140.27 netmask 255.255.248.0
    ONIE:/ # ifconfig eth0
    eth0   Link encap:Ethernet HWaddr B8:CE:F6:5E:05:E6
           inet addr:10.228.140.27 Bcast:10.228.143.255 Mask:255.255.248.0
           inet6 addr: fd20:8b1e:b255:822b:bace:f6ff:fe5e:5e6/64 Scope:Global
           inet6 addr: fe80::bace:f6ff:fe5e:5e6/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
           RX packets:18813 errors:0 dropped:1418 overruns:0 frame:0
           TX packets:491 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:1339596 (1.2 MiB) TX bytes:49379 (48.2 KiB)
           Memory:dfc00000-dfc1ffff
    ONIE:/ # route add default gw 10.228.136.1
    ONIE:/ # route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    
    default         10.228.136.1    0.0.0.0         UG    0      0      0   eth0
    10.228.136.1    *               255.255.248.0   U     0      0      0   eth0
  9. 安装 Cumulus Linux 5.4:

    ONIE:/ # route
    
      Kernel IP routing table
    
      ONIE:/ # onie-nos-install http://<web-server>/<path>/cumulus-linux-5.4-mlx-amd64.bin
    
      Stopping: discover... done.
      Info: Attempting http://10.60.132.97/x/eng/testbedN,svl/nic/files/cumulus-linux-5.4-mlx-amd64.bin ...
      Connecting to 10.60.132.97 (10.60.132.97:80)
      installer            100% |*|   552M  0:00:00 ETA
      ...
      ...
  10. 安装完成后,登录交换机。

    cumulus login: cumulus
    Password: cumulus
    You are required to change your password immediately (administrator enforced)
    Changing password for cumulus.
    Current password: cumulus
    New password: <new_password>
    Retype new password: <new_password>
  11. 请验证 Cumulus Linux 版本: nv show system

    cumulus@cumulus:mgmt:~$ nv show system
    operational         applied              description
    ------------------- -------------------- ---------------------
    hostname            cumulus              cumulus
    build               Cumulus Linux 5.4.0  system build version
    uptime              6 days, 13:37:36     system uptime
    timezone            Etc/UTC              system time zone
  12. 创建一个新用户并将该用户添加到 `sudo`团体。该用户仅在控制台/SSH会话重启后生效。

    sudo adduser --ingroup netedit admin

    cumulus@sw1:mgmt:~$ sudo adduser --ingroup netedit admin
    [sudo] password for cumulus:
    Adding user 'admin' ...
    Adding new user 'admin' (1001) with group `netedit' ...
    Creating home directory '/home/admin' ...
    Copying files from '/etc/skel' ...
    New password:
    Retype new password:
    passwd: password updated successfully
    Changing the user information for admin
    Enter the new value, or press ENTER for the default
    Full Name []:
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
    Is the information correct? [Y/n] y
    
    cumulus@sw1:mgmt:~$ sudo adduser admin sudo
    [sudo] password for cumulus:
    Adding user `admin' to group `sudo' ...
    Adding user admin to group sudo
    Done.
    cumulus@sw1:mgmt:~$ exit
    logout
    Connection to 10.233.204.71 closed.
    
    [admin@cycrh6svl01 ~]$ ssh admin@10.233.204.71
    admin@10.233.204.71's password:
    Linux sw1 4.19.0-cl-1-amd64 #1 SMP Cumulus 4.19.206-1+cl4.4.1u1 (2021-09-09) x86_64
    Welcome to NVIDIA Cumulus (R) Linux (R)
    
    For support and online technical documentation, visit
    http://www.cumulusnetworks.com/support
    
    The registered trademark Linux (R) is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.
    admin@sw1:mgmt:~$
  13. 添加其他用户组以供管理员用户访问 `nv`命令:

    cumulus@cumulus:mgmt:~$ sudo adduser admin nvshow
         [sudo] password for cumulus:
         Adding user `admin' to group `nvshow' ...
         Adding user admin to group nvshow
         Done.

    "NVIDIA用户帐户"了解更多信息。

下一步是什么?

在 ONIE 模式下安装 Cumulus Linux 后,您可以……"安装参考配置文件 (RCF) 脚本"