Install Ethernet driver on FreeNAS/NAS4Free (full-install)
FreeNAS supports the appropriate hardware of the FreeBSD-Version where FreeNAS is based on. But sometimes it is necessary to install a third-party or a self-compiled driver. This how-to describes how to install a downloaded binary Ethernet interface (NIC) driver on a “full installation” of FreeNAS/NAS4Free. It was written for non-experienced Unix users.
If you have installed FreeNAS/NAS4Free embedded, refer “Install Ethernet driver on FreeNAS/NAS4Free (embedded)” for details.
- USB flash drive, Fat32-formatted (to store the driver file temporarily)
- FreeNAS has to be installed as “Full OS on HDD + DATA + SWAP Partition”. Otherwise – if you installed FreeNAS “embedded” – the driver file will be stored in a RAM drive and after a reboot the driver is gone. But if you want to run FreeNAS “embedded” however refer Install Ethernet driver on FreeNAS/NAS4Free (embedded).
- Binary driver file (*.ko) for the appropriate FreeBSD-Version on which your FreeNAS is based on.
This how-to shows how to install a available binary driver for the NICs RTL8111B, RTL8168B, RTL8111, RTL8168, RTL8111C, RTL8111CP, RTL8111D(L), RTL8168C, RTL8111DP, RTL8111E on FreeNAS 0.6x or 0.7x.
- Download or compile the appropriate driver.
For the NICs mentioned above volunteers compiled and published drivers . Refer the download section for details. Please note the different writing for the different driver filenames
if_re...in the instructions #8 and #9!
- Copy the file to your flash drive. Take care that the drive was formatted with the Fat32 filesystem. That is in almost all cases the default filesystem on flash drives, so that you do not need to do anything in general.
- Connect the monitor and keyboard to your FreeNAS server.
Start your server and choose option 6 (Shell) in the console setup:
Connect your flash drive to the server.
- The command
dmesg | tail
shows the name of the flash drive device, e.g.
da2(see screenshot below).
Mount your flash drive:
mount_msdosfs /dev/da2s1 /mnt
da2means the first slice on the device
da2(here: USB flash drive). Read more about mounting in the FreeBSD manual – chapter 3.
Copy the driver to the directory
cp /mnt/if_rl.ko /boot/kernel
If this command fails you may have a current Nas4Free/FreeNAS version installed. In newer versions kernel modules (drivers) are located in
/cfis mounted read-only. To address this circumstances you have to unmount
/cfand remount it with read/write permissions. Than you can copy the driver.
umount /cf && mount -o rw /cf cp /mnt/if_rl.ko /cf/boot/kernel
To load the driver at boot time automatically append
if_re_load=„YES“to the content of the file
echo if_rl_load="YES" >> /boot/loader.conf
or in newer versions
echo if_re_load="YES" >> /cf/boot/loader.confOptional: To load the driver temporarily, type:
This is useful to check whether the driver will be loaded without errors. The command
dmesg|tailshows the last system messages for checking. Please be advised that the driver will not be loaded after a reboot again. Therefore add the driver to the
/boot/loader.confas shown above.
- Reboot system (option 7 in console setup).
Below you find some ready-to-use (binary) drivers (for NICs with RTL8111B, RTL8168B, RTL8111, RTL8168, RTL8111C, RTL8111CP, RTL8111D(L), RTL8168C, RTL8111DP, RTL8111E), some volunteers thankworthy provided for a couple FreeNAS versions.
|FreeNAS 0.69 (FreeBSD 6.4)||32-bit||http://jp.roliers.free.fr/if_rl.ko||if_rl.ko||JP Roliers|
|FreeNAS 0.69 (FreeBSD 6.4)||64-bit||-||-||-|
|FreeNAS 0.7.2 (FreeBSD 7.3)||32-bit||Realtek_RTL8111F_FreeNAS7-x86.zip||if_re.ko||Tim Rupe|
|FreeNAS 0.7.2 (FreeBSD 7.3)||64-bit||http://www.auslancer.com/if_re.ko||if_re.ko||hsvryan|
|NAS4Free 9 (FreeBSD 9)||64-bit||Realtek_RTL8111F_NAS4Free9-amd64.zip||if_re.ko, if_rl.ko||Camerlengo|
For FreeNAS 8 I have not found any download sources at the moment. If you find a binary driver for FreeNAS 8 a brief message via mailor comment is highly appreciated.
- Unix driver (source code) for RTL81xxxx – Realtek Homepage
- /cf-permissions concerning driver installation – kristijan.org