标签归档:dracut

浪潮NF5280M5安装redhat7.2下网卡驱动

驱动文档如下:

Building and Installation

To build a binary RPM* package of this driver, run ‘rpmbuild -tb
i40e-.tar.gz’, where is the version number for the driver tar file.

NOTES:

  • For the build to work properly, the currently running kernel MUST match
    the version and configuration of the installed kernel sources. If you have
    just recompiled the kernel reboot the system before building.
  • RPM functionality has only been tested in Red Hat distributions.
  1. Move the base driver tar file to the directory of your choice. For
    example, use ‘/home/username/i40e’ or ‘/usr/local/src/i40e’.
  2. Untar/unzip the archive, where is the version number for the
    driver tar file:
    tar zxf i40e-.tar.gz
  3. Change to the driver src directory, where is the version number
    for the driver tar:
    cd i40e-/src/
  4. Compile the driver module:
    make install
    The binary will be installed as:
    /lib/modules//updates/drivers/net/ethernet/intel/i40e/i40e.ko
    The install location listed above is the default location. This may differ
    for various Linux distributions.
  5. Load the module using the modprobe command:
    modprobe [parameter=port1_value,port2_value]
    Make sure that any older i40e drivers are removed from the kernel before
    loading the new module:
    rmmod i40e; modprobe i40e
  6. Assign an IP address to the interface by entering the following,
    where ethX is the interface name that was shown in dmesg after modprobe:
    ip address add / dev ethX
  7. Verify that the interface works. Enter the following, where IP_address
    is the IP address for another machine on the same subnet as the interface
    that is being tested:
    ping

NOTE:
For certain distributions like (but not limited to) RedHat Enterprise
Linux 7 and Ubuntu, once the driver is installed the initrd/initramfs
file may need to be updated to prevent the OS loading old versions
of the i40e driver. The dracut utility may be used on RedHat
distributions:
# dracut –force
For Ubuntu:
# update-initramfs -u

具体操作主要如下:

[root@host ~]# unzip PHY_i40e-2.0.23.zip

[root@host ~]# cd PHY_i40e-2.0.23/src

[root@host ~]# make install

[root@host ~]# rmmod i40e

[root@host ~]# modprobe i40e

[root@host ~]# dracut –force

[root@host ~]# service network restart

rmmod i40e的作用是删除系统中以前版本驱动,这一操作很关键。

对于浪潮NF5280M5服务器,建议安装redhat7.4及以上版本。低版本可能出现网络问题。

关于CentOs7使用u盘安装出现dracut:/#相关报错信息的解决方法

dracut:/#cd dev

dracut:/# ls

找到sdbx,x为一个数字,是安装u盘

dracut:/# reboot
重启之后,修改
vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet

为 vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sdbx(u盘)quiet 回车即可。

以上这个办法可行,但是有时候并不太方便获取U盘盘符,可以在安装界面修改>vmlinuz initrd=initrd.img linux dd quiet

此时可以看到U盘所在分区,比如sdc3

重启后在安装界面修改>vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sdc3 quiet即可正常安装系统。