Showing posts with label centos. Show all posts
Showing posts with label centos. Show all posts

Friday, 28 March 2014

Set a Linux server to automatically reboot after a kernel panic

If like me you get a kernel panic on your linux server once a year during the time you are away from internet access then this quick config edit could save you a lot of time and money.

Why not set your server to automatically reboot after a number of seconds after a kernel panic?

It really is easy to do.

Open this file using your favourite editor (nano / vi)

/etc/sysctl.conf
Then add the following line to the end of the file and save.

kernel.panic = 10
I would reboot your server after just to ensure all config changes are loaded.


You now have your server set to reboot 10 seconds after a kernel panic.
 

Wednesday, 23 October 2013

"Device eth0 does not seem to be present" after cloning / editing network adaptor on CentOS virtual machine

After cloning a machine or editing network adaptors you may find that eth0 can not be started.
This is usually down to the operating system remembering the old network adaptor and not knowing about the new one.

You need to edit the following file to show the correct network adaptors and MAC addresses.

/etc/udev/rules.d/70-persistent-net.rules

The file will look like this.
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:50:56:ae:00:1a",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:50:56:ae:00:1b",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


Check that there are the correct amount to correspond to the number of network adaptors and that the adaptor name and MAC address is correct.

Once you have made your changes you need to reload udev by running this command
start_udev

You should now be able to restart your network services
service network restart