Author: Stefan

  • How to upgrade kernel to latest version on Ubuntu 20.04 Focal Fossa Linux

    (source: https://linuxconfig.org/how-to-upgrade-kernel-to-latest-version-on-ubuntu-20-04-focal-fossa-linux)

    In this tutorial you will learn:

    • How to install kernel upgrade script utility
    • How to to upgrade kernel to latest version
    • How to uninstall previously installed PPA kernels

    Upgrade kernel to latest version on Ubuntu 20.04 Focal Fossa Linux

    Software Requirements and Conventions Used

    CategoryRequirements, Conventions or Software Version Used
    SystemInstalled Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa
    Softwareubuntu-mainline-kernel.sh
    OtherPrivileged access to your Linux system as root or via the sudo command.
    Conventions# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
    $ – requires given linux commands to be executed as a regular non-privileged user

    Upgrade kernel to latest version on Ubuntu 20.04 step by step instructions

    1. First step is to download the ubuntu-mainline-kernel.sh Bash script utility. Open up your terminal and enter:
      $ wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
    2. Next, step is to install the previously downloaded script into our executable path:
      $ sudo install ubuntu-mainline-kernel.sh /usr/local/bin/
    3. All is ready to upgrade the Ubuntu kernel to the latest version. To do so run do following command:
      $ ubuntu-mainline-kernel.sh -i

      Finding latest version available on kernel.ubuntu.com Latest version is: v5.4.3, continue? (y/N) The above command will search for the latest kernel version available. To continue with the kernel installation answer y.
    4. Reboot your Ubuntu system and check for the loaded Kernel version:
      $ uname -rs Latest Kernel version upgrade
    5. To uninstall the PPA kernel version execute the following command and follow to wizard:
      $ ubuntu-mainline-kernel.sh -u
  • Install Odoo v13 docker container

    Step by step installation instructions.
    (Thnx to: https://www.cybrosys.com/blog/how-to-install-odoo-13-using-docker)

    Install Ubuntu server 18.04 and run all updates.

    Install docker(Ubuntu 18.04)
    First of all, we have to make sure that every required package is properly installed in the system in order to run the docker:
    # sudo apt install apt-transport-https ca-certificates curl software-properties-common

    Get a GPG key for better maintenance and security:
    # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

    Get a stable version of the Docker repository:
    # sudo add-apt-repository deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable

    Update the system packages:
    # sudo apt update

    Install Docker(Here, we are installing the community edition)
    # sudo apt install docker-ce

    Add a user to the docker group
    # sudo usermod -aG docker $USER

    Once every mentioned step is complete, you can check whether the Docker is installed properly or not by using a simple hello world command.
    # docker run hello-world

    Install Odoo on docker
    We have successfully installed  Docker on the system. Now we have to install the Odoo image on the docker. A running PostgreSQL should be there in order to run the Odoo image on the docker. So, before going to Odoo image, we have to make sure that a Postgres image runs properly on the docker environment.

    Install Postgres image

    # docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10

    Install Odoo image
    # docker run -p 8069:8069 --name odoo --link db:db -t odoo

    Odoo tries to find the name ‘db’ of the Postgres container. So in order to connect the Odoo with PostgreSQL, the alias of the Postgres container should be ‘db’.You can use your custom conf file in the Odoo container.
    # docker run -v /custom/conf/path:/etc/odoo -p 8069:8069 --name odoo --link db:db -t odoo

    While starting, Odoo will find the custom conf file from the /custom/conf/path.
    # docker run -v /path/to/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo

    If you want to include custom addons, use the /mnt/extra-addons volume.
    Set-up a docker-compose.ymlCreate a docker-compose.yml file which contains all the basic information about the Odoo-container and the database container. Here is the simplest one.

    version: '2'
    services:
      web:
        image: odoo:12.0
        depends_on:
          - db
        ports:
          - "8069:8069"
      db:
        image: postgres:10
        environment:
          - POSTGRES_DB=postgres
          - POSTGRES_PASSWORD=odoo
          - POSTGRES_USER=odoo

    You can change the configuration to make as your requirement:* web/image: Version of the Odoo* The default port will be 8069:8069, By changing the first port, you will be able to have multiple Odoo instances simultaneously.* db/image: Version of the Postgres image.

    In case server has been rebooted,
    Restart database, next start docker container
    # docker start /db
    # docker start odoo

    Useful commands:

    Start docker container
    # docker start (container_name)

    Restart docker container
    # docker restart (container_name)

    Stop docker with a container
    # docker stop (container_name)

    To start an Odoo instance. The directory should be the same where the docker-compose.yml file exists
    # docker-compose up -d 
    # docker run -p 8070:8069 --name odoo1 --link db:db -t odoo

    To start multiple Odoo instances at a time, make sure that the PostgreSQL container’s alias name is db. Otherwise, Odoo won’t consider the command. You can have any number of Odoo instances at a time by changing its port.
    # docker run -p 8071:8069 --name odoo2 --link db:db -t odoo

  • Pfsense not booting DNS resolver hang

    Due to an unknown reason, sometimes it appears that the DNS Resolver hangs at system boot. Next steps are the solution:

    backup the file just in case:

    cp /var/unbound/pfb_dnsbl.conf /tmp

    Delete it

    rm /var/unbound/pfb_dnsbl.conf

    create an empty file

    touch /var/unbound/pfb_dnsbl.conf

    reboot

  • Xpenology Proxmox e1000e driver

    To get the e1000e driver working, do the following steps:

    Make backup

    cp /usr/share/pve-manager/js/pvemanagerlib.js /usr/share/pve-manager/js/pvemanagerlib.js.dist
    
    # add e1000e
    sed -i 's/|e1000|/|e1000|e1000e|/' /usr/share/pve-manager/js/pvemanagerlib.js
    sed -i "/\['e1000', 'Intel E1000'\],/a \      ['e1000e', 'Intel e1000e']," /usr/share/pve-manager/js/pvemanagerlib.js
    
    # backup updated script
    
    cp /usr/share/pve-manager/js/pvemanagerlib.js /usr/share/pve-manager/js/pvemanagerlib.js.e1000e
    
    # make backup
    
    cp /usr/share/perl5/PVE/QemuServer.pm /usr/share/perl5/PVE/QemuServer.pm.dist
    # add e1000e
    
    sed -i "s/'e1000',  'pcnet'/'e1000', 'e1000e', 'pcnet'/" /usr/share/perl5/PVE/QemuServer.pm
    
    # backup updated script
    
    cp /usr/share/perl5/PVE/QemuServer.pm /usr/share/perl5/PVE/QemuServer.pm.e1000e
    
    
    
    Make changes take effect
    service pveproxy restart
    service pvedaemon restart
    
  • Auto reboot after kernel panic

    Auto reboot after kernel panic

    By default after a kernel panic, Linux kernel just waits there for a system administrator to hit the restart or powercycle button.  This is because of the value set on “kernel.panic” parameter.

    [root@linux23 ~]# cat /proc/sys/kernel/panic 
    0
    [root@linux23 ~]# sysctl -a | grep kernel.panic
    kernel.panic = 0

    To disable this and make the Linux OS reboot after a kernel panic, we have to set an integer N greater than zero to the parameter “kernel.panic”, where “N” is the number of seconds to wait before a automatic reboot.

    For example , if you set N = 10 , then the system waits for 10 seconds before automatic reboot. To make this permanent, edit /etc/sysctl.conf and set it.

    [root@linux23 ~]# echo 10 > /proc/sys/kernel/panic
    0
    [root@linux23 ~]# grep kernel.panic /etc/sysctl.conf kernel.panic = 10

    This helps in preventing manual intervention after a kernel panic. Setup some kernel dump or netdump to capture the kernel crash debug information.

  • pfSense – Update Realtek driver v1.95

    Download driver:
    https://forum.netgate.com/assets/uploads/files/1537813753467-if_re.zip
    jselec mirror: http://jselec.nl/wp-content/uploads/2019/01/if_re.zip

    Unzip & Place “if_re.ko” file at “/boot/kernel

    Change ownership and permissions on the if_re.ko file

    chown root:wheel if_re.ko
    chmod 0555 if_re.ko

    Then edit “/boot/loader.conf” to add this line:

    if_re_load="YES"

    Reboot.

    Then go to diagnostics > command prompt in the WebGUI

    Run the command

    kldstat

    If you did everything properly you’ll see “if_re.ko” in the list that comes up. If not, the driver isn’t loaded.

    (i didn’t get it loaded myself. Added the line of code to /boot/defaults/loader.conf Then it worked for me)

  • OTGW iSense Calenta Return water temperature

    OTGW iSense Calenta Return water temperature

    Is your OTGW (Opentherm Gateway) not returning the return water temperature?
    Issue the following command:

    AA=28
    


    Check in the list of devices. The actual temperature should now be reported.

  • Proxmox gui not responding

    Proxmox gui not responding

    It could happen that the Proxmox GUI is not responding to http request.
    One reason could be that the webdaemon is not running or has crashed.

    Try restart of the service:

    service pveproxy restart
    
  • Proxmox – Add external usb drive to LXC container

    Proxmox – Add external usb drive to LXC container

    How to mount an external USB(3) drive to a LXC container

    In this example we make use of a Western Digital 1TB external USB3 drive.
    This device is NTFS formatted, which is easy to handle in Windows.

    Our container is used for samba services and has ID 102.

    At the host system (Proxmox)

    – Check which device the drive has been given on the host.
    lsblk (in this case ‘sdg’, partition ‘sdg1’)

    – Add a mounting location
    mkdir /mnt/ext-usb

    – Install the ntfs-3g package
    apt-get update && apt-get install ntfs-3g

    – Mount the disk to the mountlocation
    mount -t ntfs-3g /dev/sdg1 /mnt/ext-usb

    AT LXC client (container)

    – Add a mount location inside the LXC container
    mkdir /mnt/ext-usb

    At the host

    – Mount the drive to the container in this example we use mp1 (check if mp1 is not allready used!)
    pct set 102 -mp1 /mnt/ext-usb,mp=/mnt/ext-usb

  • Nextcloud accept larger upload filesize

    Nextcloud accept larger upload filesize

    By default, Nextcloud only accept small upload filesize.
    This is due the configuration of php.ini in Apache, and the settings in Nextcloud itself.

    By the way? Have you already update your php to version 7? Read here how to do this: Nextcloud update php5.6 to php7.0

    In this example we use a new maximum file size of 200 GB. We change the php.ini as follow:

    • Open php.ini by your favorite editor, for example ‘nano’.
      sudo nano /etc/php*/apache2/php.ini
    • Find upload_max_filesize and change it to 200 GB (along with post_max_size)
    • Save the file
    • Restart apache
      sudo service apache2 restart
    • Edit admin settings in NC to reflect php.ini