Deprecated: Hook custom_css_loaded is deprecated since version jetpack-13.5! Use WordPress Custom CSS instead. Jetpack no longer supports Custom CSS. Read the WordPress.org documentation to learn how to apply custom styles to your site: https://wordpress.org/documentation/article/styles-overview/#applying-custom-css in /srv/www/srvfail.com/public_html/wp-includes/functions.php on line 6078
SysAdminStuff ⋆ Page 4 of 15 ⋆ My Online Notebook

Ubuntu shows “No Bootable Device” after installation in UEFI mode

When doing a fresh install of Ubuntu 16.04, or any other version of Ubuntu or Linux, after the install you might get your laptop or desktop machine not booting the installed OS, but instead returning “No Bootable Device” message, if laptop is set to UEFI mode.

You might be presented with this image after rebooting your laptop, after a successful OS install.

No Bootable Device message
No Bootable Device message

To resolve this issue reboot your laptop and enter BIOS.

There go to “Select and UEFI file as trusted for executing:” and press Enter key.

BIOS Select UEFI file

Once there choose HDD1.

BIOS select Hard Drive

Then choose <EFI>.

BIOS select EFI

Then you should be able to see <ubuntu> or possibly some other name of your Linux installation.

BIOS select Ubuntu

Then choose shimx64.efi

BIOS select shimx64

And then choose Yes when asked if you want to add this file to allowable database.

BIOS add file to database

Reboot your laptop and you should now be able to boot your OS normally.

VirtualBox returns “Kernel driver not installed” on Ubuntu

When trying to run VirtualBox on Ubuntu 16.04, or some other version of Linux, you might get a following type an error message, when trying to start a virtual machine, you just created on a fresh installation of VirtualBox.

VirtualBox might return error saying that it failed to open a session for  the virtual machine.

Details of error message will say that virtual machine has terminated unexpectedly during startup with exit code 1 (0x1).

VirtualBox failed session message
VirtualBox failed session message

You will also get a “Kernel driver not installed (rc=-1908” message.

VirtualBox Kernel driver error
VirtualBox Kernel driver error

Error will say “The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv.”

Error message will ask you to try to reinstall the kernel module by executing /sbin/vboxconfig as root, to reinstall the module, which could fail to complete successfully when you try to run the command in terminal.

One of the possible causes of this type of behavior is that you have Secure Boot enabled in your BIOS on the host machine, which is preventing the install of third-party drivers, and causing issues with VirtualBox installation, which fails to install all kernel modules.

To resolve this error, disable Secure Boot in your BIOS, and then try to run /sbin/vboxconfig command as root, or reinstall VirtualBox, with Secure Boot disabled, to install all the necessary modules.

How to reset FreeBSD root password

Here are the steps to reset root password on FreeBSD 11.

Boot the system, and wait till you get to the Welcome to FreeBSD boot menu.

Once you are there, press 2 to boot the system to single user mode.

FreeBSD 11 boot menu

Wait till the server shows a following message: “When prompted Enter full path name of shell or RETURN for /bin/sh:”, and then press Enter key to complete the boot process to single user mode.

You will now be presented with console input.

In the console type following commands:

mount -u /
mount -a

Now you can use passwd command to change root user password, by typing in the new password when asked, and they retyping it on second prompt.

FreeBSD 11 single user mode

Once you have set a new password, reboot the server, and log in with the new password.

VMware rename CentOS 7 NIC names

CentOS 7 virtual machines on VMware will by default use predictable network device naming for network interfaces on the machine, causing their names to be in enoXXXXXXXX format.

This will cause issues when adding 10 or more additional IPs in WHM, as network interface name will be longer than the 15 characters.

Maximum length supported for network interface name on cPanel servers is 15 characters.

When starting ipaliases service, only first 9 additional IPs will be added, and for rest of the IPs error “RTNETLINK answers: Numerical result out of range” will be shown, and IPs will not be shown in ip addr, or ifconfig output.

[root@server ~]# /scripts/restartsrv_ipaliases
Waiting for "ipaliases" to stop ...finished.
Waiting for "ipaliases" to start ...finished.
Service Status
Startup Log
 Oct 03 20:29:20 server.example.com ipaliases[233833]: [FAILED]
 Oct 03 20:29:20 server.example.com ipaliases[233833]: Bringing up eno33559296:cp14 RTNETLINK answers: Numerical
result out of range
 Oct 03 20:29:20 server.example.com ipaliases[233833]: [FAILED]
 Oct 03 20:29:20 server.example.com ipaliases[233833]: Routing 204.93.248.69 RTNETLINK answers: Invalid argument
 Oct 03 20:29:20 server.example.com ipaliases[233833]: [FAILED]
 Oct 03 20:29:20 server.example.com ipaliases[233833]: Bringing up eno33559296:cp15 RTNETLINK answers: Numerical
result out of range
 Oct 03 20:29:20 server.example.com ipaliases[233833]: [FAILED]
 Oct 03 20:29:20 server.example.com ipaliases[233833]: Routing 204.93.248.70 RTNETLINK answers: Invalid argument
 Oct 03 20:29:20 server.example.com ipaliases[233833]: [FAILED]
 Oct 03 20:29:20 server.example.com systemd[1]: Started cPanel IP aliases service.
Log Messages
 Oct 3 20:29:20 server ipaliases: [FAILED]
 Oct 3 20:29:20 server ipaliases: Routing x.x.x.x RTNETLINK answers: Invalid argument
 Oct 3 20:29:20 server ipaliases: [FAILED]
 Oct 3 20:29:20 server ipaliases: Bringing up eno33559296:cp15 RTNETLINK answers: Numerical result out of range

To resolve the issues, network devices can be renamed back to old ethX type of naming.

To rename network devices to old names following steps are needed.

  1. Edit /etc/sysconfig/grub
  2. Update GRUB configuration with new kernel parameters
  3. Rename network files
  4. Edit renamed network files
  5. Reboot the server

To rename devices do the following

Edit /etc/sysconfig/grub

Find a line containing “GRUB_CMDLINE_LINUX”, and append “net.ifnames=0 biosdevname=0“ on the line.

File should look something like this.

[root@server ~]# cat /etc/sysconfig/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=myvg/rootvol rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"

Update GRUB configuration with new kernel parameters, with following command:

grub2-mkconfig -o /boot/grub2/grub.cfg

Rename enoXXXXXXXX network files of all interfaces to ethX network file.

For example:

mv /etc/sysconfig/network-scripts/ifcfg-eno16777984 /etc/sysconfig/network-scripts/ifcfg-eth0
mv /etc/sysconfig/network-scripts/ifcfg-eno33557248 /etc/sysconfig/network-scripts/ifcfg-eth1

This will rename file ifcfg-eno16777984, to ifcfg-eth0, renaming interface eno16777984 to eth0, and will rename file ifcfg-eno33557248, to ifcfg-eth1, renaming interface eno33557248, to eth1.

Edit new ethX network files.

Replace value of both NAME and DEVICE field with new ethX names.

File should look something like this.

[root@server ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
NAME=eth0
UUID=b02f4abf-f6da-4ad4-b800-4abf4fe1d50d
DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=yes
IPADDR=x.x.x.x
NETMASK=255.255.255.0
GATEWAY=x.x.x.1

Reboot the server, and you should now see network interfaces using old CentOS 6 style names.

Additional changes for cPanel servers

Change public network interface in Basic cPanel & WHM Setup.

Go to Home »Server Configuration »Basic cPanel & WHM Setup and change public interface from old enoXXXXXXXX to new ethX name.

Change public interface to new name
Change public interface to new name

Restart ipaliases service with /scripts/restartsrv_ipaliases.

Reset root password on CentOS 6 machine

If you have forgotten root user password on your CentOS 6 machine, you can reset the password to new value, without knowing the old one, by booting the machine to single user mode, and resetting the password with passwd command.

Boot to single user mode

During the CentOS boot process, you will be presented with a countdown before CentOS boot process actually begins to load the OS.

Press any key to enter the GNU GRUB menu.

CentOS 6 boot countdown
CentOS boot countdown

On the GNU GRUB menu highlight the kernel you want to boot, and press ‘e’ key to edit the kernel commands before booting.

CentOS 6 kernel select
CentOS 6 kernel select

Once you have entered the kernel edit mode, find the line beginning with kernel, and highlight it, and press ‘e’ key to edit it.

Edit kernel line
Edit kernel line

On the end of the line add the word ‘single’, with white space before ‘single’, and press ENTER to accept the change.

Add single to then end of the kernel line
Add single to then end of the kernel line

Boot the machine with the edited kernel argument, and you will be logged in as root in single user mode.

Now just issue passwd command, and enter the new password two times, when asked.

Change password with passwd command
Change password with passwd command

Once you have changed the password, reboot the machine, and log to it with your new root password.