Centos 6.6 Kernel Upgrade to 3.19.8
I am currently running Centos 6.6 with Kernel 2.6.32-504.16.2.el6.x86_64. The reason for my kernel upgrade is (A), I have never done one, and (B) My NAS/Plex/Asterisk/KVM box has a Qualcomm Atheros 1GB Ethernet card on the mother board and I am unable to use it with the 2.6.x Kernel. I am using a cheap TP Link 1GB card in my PCIe slot now. It works fine, but I would like to see how the Qualcomm Atheros performs.
I first test things a bit with fresh minimal install of Centos 6.6 on my PC using VMware Player 11. After the install and getting the network up I ssh into the vm with putty. I login as root and my home directory is /root. I first turn off iptables, disable selinux, then update everything.
# chkconfig iptables off
# service iptables stop
# vi /etc/sysconfig/selinux
SELINUX=disabled
# yum -y update
# reboot
Download required packages for the build and then update your system again.
# yum -y groupinstall "Development Tools"
# yum -y install ncurses-devel qt-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel wget bc gzip
# yum -y update
Now from /root directory download the kernel source.
# wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.19.8.tar.gz
Unzip and extract the source file.
# gzip -d ./linux-3.19.8.tar.gz
# tar -xvf ./linux-3.19.8.tar -C /usr/src/
Now let’s goto our source directory and configure the new Kernel. I just left everything alone and saved the file before I exit the menu.
# cd /usr/src/linux-3.19.8/
# make menuconfig
Now lets compile the Kernel.
# make
Now Install the kernel.
# make modules_install
# make install
When finished lets reboot and use the new Kernel. This will not be the default selection in grub so after you reboot the machine you need to press enter when you see the grub menu. You will only have a few seconds so beware.
# reboot
On boot screen select the new kernel for boot. After the boot and login type:
# uname -r
3.19.8
Looks like I am on the new Kernel.
Now set to default for boot up with changing default=0, If 3.19.8 is actually your first one
# vi /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_surgemail-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=8
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.19.8)
Now reboot and make sure you boot on the new Kernel.
# reboot
So far so good. Now I will do another image, install all my packages I use on the NAS/Plex/Asterisk/KVM box, then upgrade Kernel. If everything works on my vm I will backup the NAS/Plex/Asterisk/KVM box and install the new Kernel there. Wish me luck. Could be a long weekend.
4 hours later, I upgraded the Kernel on my "production" box, the NAS/Plex/Asterisk/KVM box. All went well until I noticed the zfs pool was not mounted. This is my ZFS raidz2 poll with 4 WD RED 3TB drives in it. It holds my PC backups, my movie library for the Plex server, and some my sons video and audio files he uses for editing and his YouTube channel. I was not real concerned because I backed up the entire box, including the zfs pool. I wound up having to remove all the zfs packages and then reinstall them. They recompiled for the new Kernel and then my pool showed up in:
# zpool list
But nothing showed up in:
# zpool status
A quick
# zfs mount -a
And I had my pool back on line. I confirmed all was still in place for starting zfs on boot and mounting the pool. Did a reboot, and we good. My Asterisk, Plex, ZFS, KVM, NFS, and samba are all working fine. The only error I get on boot is my USB drive is not there when it tries to mount at boot. Makes sense since its sitting on my desk and not in the box.
I still not seeing my Qualcomm Atheros 1GB Ethernet card, but I will work on that next.
2 hours later. I guess when i built the Kernel i did not include this driver in the build.
# wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.19-rc1/backports-3.19-rc1-1.tar.gz
Then uncompress, unpack, compile, and install
# tar -xvf backports-3.19-rc1-1.tar
# cd backports-3.19-rc1-1
# make defconfig-alx
# make
# make install
# modprobe alx
# reboot
After reboot i made sure the Kernel was seeing the card
# cat /var/logmessages | grep Qualcomm
May 23 00:42:04 nas kernel: alx 0000:03:00.0 eth1: Qualcomm Atheros AR816x/AR817x Ethernet [74:d4:35:ea:90:1f]
I did the above in strikeout but after a bit I discovered my Kernel crashing when running my backup software on my PC to the zpool via smb. Software I am using for PC backup is AOMEI. After about 17% into a full disk backup things would go wrong. I then see I installed a release candidate of the backport. First I verify the module with "modinfo alx. Yup, its the rc version. Then I remove the backport with modprobe, then I actually rm the alx.ko from the "/lib/modules/3.19.8/updates/drivers/net/ethernet/atheros/alx" directory. I reboot. I run "moprobe alx" and not found. Well, its removed now. So with head in hands, I go back to recompile the kernel but this time I check the the box for the "Qualcomm Atheros AR816x/AR817x Ethernet" driver. I reboot after it is done. Oh ya! lsmod shows its in. modinfo shows its not the rc version. I don't have to follow the steps below again since I already did them, but if I had done this correctly in the first place I could have saved my self some time. Live and learn i guess. So lets Continue like i did this right the first time.
Then I removed the 70-persistent-net.rules
# cd /etc/udev/rules.d/
# rm -f 70-persistent-net.rules
Now from the console, not remote ssh, as I will have to stop the network
# service network stop
I then copied over
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
I already have my MAC addr for the Atheros from the above cat of dmesg, it is 74:d4:35:ea:90:1f
Now lets get the TP Link MAC addr (HWADDR).
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=30:B5:C2:02:77:2B
TYPE=Ethernet
UUID=a949b417-3f11-4e60-821d-20467047c8dc
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.10.100
NETMASK=255.255.255.0
GATEWAY=192.168.10.1
BROADCAST=192.168.10.255
DNS1=192.168.10.1
DNS2=8.8.8.8
Now lets edit the MAC addr in ifcfg-eth0 and ifcfg-eth1. Since this is a replacement I will set the MAC addr in ifcfg-eth0 to the Atheros, and the MAC addr in ifcfg-eth1 will be the TP Link.
I will leave the TP Link in the box for the time being. Just vi the ifcfg-eth0 and chnage the MAC addr. Now vi ifcfg-eth1 and change the IP addr to 192.168.10.101
After we get the ethernet cable swapped to the new card, or add another to the switch, do a reboot.
# reboot
After the reboot check our work
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 74:D4:35:EA:90:1F
inet addr:192.168.10.100 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::76d4:35ff:feea:901f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4703225 errors:0 dropped:30 overruns:0 frame:0
TX packets:912866 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6912430254 (6.4 GiB) TX bytes:64248991 (61.2 MiB)
Interrupt:18
eth1 Link encap:Ethernet HWaddr 30:B5:C2:02:77:2B
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:8525 errors:0 dropped:0 overruns:0 frame:0
TX packets:8525 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1497843 (1.4 MiB) TX bytes:1497843 (1.4 MiB)
I don't have a cable in the TP Link now of eth1 so it does not show the IP, but the Atheros is on eth0 and looks good. Test connectivity out/in to the interface.
Time for bed. Will play more tomorrow.
No comments:
Post a Comment