Header Shadow Image


Disable Linux Network Interface Renaming

Here we will adjust two boot options to prevent the newer releases of RHEL 7, CentOS 7 and Fedora from renaming our interfaces with names such as enp3S0, enp5s6, enp5s0, enp3s6 etc.  

To prevent our network interfaces from getting renamed, we can add two simple kernel parameters to our configuration to reenable out traditional naming of eth0, eth1, eth2, bond0 etc.  Simply add the following line to /etc/default/grub ( Symlinked to /etc/sysconfig/grub ) then run grub2-mkconfig to generate the /boot/grub2/grub.cfg if editing the first file doesn't work, to revert the system to the expected naming convention:

kernel /vmlinuz-3.10.5-201.fc19.i686 ro root=LABEL=/ SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us net.ifnames=0 biosdevname=0

And your interfaces will be named with ethX again:

[root@localhost log]# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.36  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::20d:88ff:fe38:a34  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:88:38:0a:34  txqueuelen 1000  (Ethernet)
        RX packets 8661  bytes 8553277 (8.1 MiB)
        RX errors 0  dropped 58  overruns 0  frame 0
        TX packets 5480  bytes 667657 (652.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost log]#

And that's it!

Cheers,
TK

Failed to start LSB: Bring up/down networking

Here we'll resolve the common Fedora / RHEL 7 network startup issue: Failed to start LSB: Bring up/down networking

This error is accompanied by a number of subissues:

  • Device eth0 has different MAC address than expected, ignoring.
  • RTNETLINK answers: File exists

For the first issue, ensure that your definition in the ifcfg-eth0 file really matches the ifconfig output:

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPV6INIT=no
BOOTPROTO=none
NM_CONTROLLED=no
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.0.36
GATEWAY=192.168.0.1
HWADDR=00:0D:88:38:0A:34
DNS=192.168.0.1

as compared with:

# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.36  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::20d:88ff:fe38:a34  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:88:38:0a:34  txqueuelen 1000  (Ethernet)
        RX packets 7438  bytes 8067940 (7.6 MiB)
        RX errors 0  dropped 32  overruns 0  frame 0
        TX packets 4905  bytes 569984 (556.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

For the second issue, ensure you remove any previous definitions of ifcfg-eth0 even if renamed and given prefixes.  The Linux Networking script will pick this up:

# rm -f back.ifcfg-eth0 back.ifcfg-eth1 old.ifcfg-eth1 old.ifcfg-eth2 strace-ifup.txt lshal-list.txt dhcp.ifcfg-wlan0 static.ifcfg-wlan0 2ISNOW0.ifcfg-eth2 FRIED.ifcfg-eth0 Dec.19.2011.ifcfg-eth2

And that should get you going.

Also don't forget to change your UDEV rules:

[root@mysql02 rules.d]# cat 90-eno-fix.rules
# This file was automatically generated on systemd update
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:86:b5:1b", NAME="eno16782080"
[root@mysql02 rules.d]#

to:

[root@mysql02 rules.d]# cat 90-eno-fix.rules
# This file was automatically generated on systemd update
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:86:b5:1b", NAME="eth0"
[root@mysql02 rules.d]#

Good Luck!

Cheers,
TK

Delay in booting up after pressing power button

Delay in booting up after pressing power button

If your laptop or pc or server shows a long delay in booting after pressing the power button, it's possible it could be underpowered.  I realized mine was 600W and after changing some green for non-green hard drives, the bootup after a cold start was taking longer and longer.  I purchased a new PSU of 750W and that resolved the issue though I never tested the 600W PSU if it was bad and took a few too many power surges.  Likely my motherboard was underpowered for the new hardware. 

Cheers,
TK

Find files larger then

In most distributions including RH / SL (Scientific Linux) / CentOS / Fedora / Ubuntu / MintLinux the following commands can be used to achieve this purpose:

find . -type f -size +10000k
find /root/ -type f -size +10000k -exec ls -altri {} \;
find . -type f -size +10000k -exec ls -altri {} \;

Cheers,
TK

B7006971 IBM Fiber Channel Error

We got the B7006971 error from our HBA card on a P5 Server.  Turns out that upgrading the firmware of our HBA did the trick.  To do so add / remove the card using the Add FRU / Remove FRU or Exchange FRU in the HMC then from the OS issue the following after downloading the firmware from IBM Fix Central:

diag -d fcs0 -T download

The firmware is packaged as a single file RPM and extracts to the following:

[ AIX root@mdsnim01:/home/root ] rpm -qpl df1000fd-0002-271304.aix.rpm
/usr/lib/microcode/df1000fd-0002.271304
[ AIX root@mdsnim01:/home/root ]

Once done, the cards did not issue the error message any further.  One card did continue to issue the above error however and upgrade of it's hardware was not possible.  This particular card showed the error during the FRU screens whereas the other cards only displayed the error from the OS command line.

Cheers,
TK

Modify or Set AIX Prompt

Here's an example of a clean prompt for use in AIX in a mixed-environment setup:

PS1="[ $(uname) $(whoami)@${HOSTNAME}:\$PWD ] "
export PS1
set -o vi

Looks like this:

[ AIX root@mdsnim01 : guest ]

Cheers,
TK

REF: Softpanorama KSH Substitutions

Install OpenSSH from AIX CD

If you've just installed AIX from CD, there is no SSH / SSL.  Getting and compiling one from the web proved to be challenging.  Here's the steps to do so:

mount -V cdrfs -o ro /dev/cd0  /cdrw
cd /cdrw/installp/ppc

smit installp
Install Software

* INPUT device / directory for software              [.]
* SOFTWARE to install  (Press ESC+4 then select )

 > openssh.base                                                       ALL
    + 6.0.0.6103  Open Secure Shell Commands                             
    + 6.0.0.6103  Open Secure Shell Server                               
 > openssh.license                                                    ALL
    + 6.0.0.6103  Open Secure Shell License                              
 > openssh.man.en_US                                                  ALL
    + 6.0.0.6103  Open Secure Shell Documentation – U.S. English         
 > openssl.base                                                       ALL
    @ 1.0.1.500  Open Secure Socket Layer                                
 > openssl.license                                                    ALL
    + 1.0.1.500  Open Secure Socket License                              
 > openssl.man.en_US                                                  ALL
    @ 1.0.1.500  Open Secure Socket Layer                                

The final setups should look like this:

                                                        [Entry Fields]
* INPUT device / directory for software               .
* SOFTWARE to install                                [openssh.base                                           > +
  PREVIEW only? (install operation will NOT occur)    no                                                       +
  COMMIT software updates?                            yes                                                      +
  SAVE replaced files?                                no                                                       +
  AUTOMATICALLY install requisite software?           yes                                                      +
  EXTEND file systems if space needed?                yes                                                      +
  OVERWRITE same or newer versions?                   no                                                       +
  VERIFY install and check file sizes?                no                                                       +
  Include corresponding LANGUAGE filesets?            yes                                                      +
  DETAILED output?                                    yes                                                      +
  Process multiple volumes?                           yes                                                      +
  ACCEPT new license agreements?                      yes                                                      +
  Preview new LICENSE agreements?                     no                                                       +

  WPAR Management
      Perform Operation in Global Environment         yes                                                      +
      Perform Operation on Detached WPARs             no                                                       +
          Detached WPAR Names                        [_all_wpars]                                              +
      Remount Installation Device in WPARs            yes                                                      +
      Alternate WPAR Installation Device             []

 

Press Enter then test login to your LPAR using SSH.


# lslpp -L|grep -Ei "openssl|openssh"
  openssh.base.client     6.0.0.6103    C     F    Open Secure Shell Commands
  openssh.base.server     6.0.0.6103    C     F    Open Secure Shell Server
  openssh.license         6.0.0.6103    C     F    Open Secure Shell License
  openssh.man.en_US       6.0.0.6103    C     F    Open Secure Shell
  openssh.msg.en_US       6.0.0.6103    C     F    Open Secure Shell Messages –
  openssl.base             1.0.1.500    C     F    Open Secure Socket Layer
  openssl.license          1.0.1.500    C     F    Open Secure Socket License
  openssl.man.en_US        1.0.1.500    C     F    Open Secure Socket Layer
#

 

Cheers,
TK

Configuring Cisco Switch 3750G POE

This is a set of running notes on configuring a Cisco 3750G POE Switch.  It's very very messy and is meant for me to remember the ins and outs of doing this.  Along the way, it could help someone else too.

First use a console connection to your switch.  The console is unaffected by what we do on the ports so for initial configuration, this is what is recommended.  You'll need a DB9 to RS-232 Cable however some wiring of the DB9 may be needed so it is highly recommended you do that.  Search for the pin placements of a DB9 to an RS-232 for a Cisco switch on this blog.  If all connected well, you'll be rewarded with a nice cold busybox prompt.  Cisco default settings are:

Read the rest of this entry »

Network error: Software caused connection abort

When I saw Failed to recv data from socket. from my VNC client and Network error: Software caused connection abort I immediately ran an arp scan to check for duplicate IP's:

Read the rest of this entry »

There are differences between boot sector and its backup

Recently I got the following at boot time of my RHEL clone (Scientific Linux 6.7), There are differences between boot sector and its backup, after which I was dumped into the maintenance console asked to type a password for maintenance and perform brain surgery.  Naturally I wondered if my recent attempts to create a bootable UEFI / DOS disk resulted in me nuking a partition.  After a short while I realized that this is likely the result of me trying to …..

Read the rest of this entry »


     
  Copyright © 2003 - 2025 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License

 

The IT Development and Technology Mini Vault | MicroDevSys.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.