Major upgrades with FreeBSD

Here a a small summary of all invoked FreeBSD commands if you want to upgrade from let's say 11.0 to 11.1. All this info can also be found in the FreeBSD handbook.

First update your current version to the latest packages and reboot:

# freebsd-update fetch install
# pkg upgrade (command for binary packages)
# portmaster -a (command for installed ports, WARNING: see below)
# reboot

Warning for portmaster: portmaster will recompile also your binary packages if the port version is newer!

Now let's start the upgrade process:

# freebsd-update -r 11.1-RELEASE upgrade (replace 11.1-RELEASE with the upgrade version you want)
# freebsd-update install
# reboot
# freebsd-update install
# pkg-static upgrade -f (command for binary packages)
# portmaster -af (command for ports. WARNING: see above)
# freebsd-update install
# reboot

That's it. upgraded version up and running.

 

Kernel crash on CentOS 7 – Xeon E3-1230 with NVIDIA GT 710

I recently purchased a Xeon E3-1230v5 with an NVIDIA GT710 graphics card as a server and had permanent kernel panics. After some research i found a bug statement https://bugs.centos.org/view.php?id=11488

The reason for the kernel panics seems to be NVIDIAs nouveau driver.

The mentioned fixed seemd to work and i have now a stable server. It's quite simple:

Edit /etc/sysconfig/grub and add "rd.driver.blacklist=nouveau nomodeset" to GRUB_CMDLINE_LINUX. Then create /etc/modprobe.d/blacklist.conf and add "blacklist nouveau" to that file.

Now, update grub with "grub2-mkconfig -o /boot/grub2/grub.cfg" and reboot.

After that, the system was rock-solid.

SSH passwordless login in OpenSSH

You can login to a remote Linux server without entering password in 3 simple steps:

  1. create public and private keys on the source/local server:

    # ssh-keygen
  2. copy the public key from local to destination/remote host:

    # ssh-copy-id -i ~/.ssh/id_rsa.pub <remote ip>
  3. test passwordless login:

    # ssh <remote ip>

If all went well you should not be asked for a password. You can find your key on the remote system in ~/.ssh/authorized_keys

Thie above commands were executed as root user and the mechanism is done for root@local -> root@remote.