Yearly Archives: 2018


Qubes 4.0: Installation crashes when installing qubes-mgmt-salt-base-topd.noarch 5

Solution

  1. Disable Secure Boot from BIOS
  2. On boot order, select Legacy Devices first, again from BIOS
  3. At the first screen of the installer (like the image below), press the e button to edit the boot arguments, disabling the graphics card driver. For us what worked is the following:
    mboot.c32 xen.gz console=none --- vmlinuz inst.stage2=hd:LABEL=Qubes-R4.0-x86_64 i915.alpha_support=1 mapbs=1 noexitboot=1 modprobe.blacklist=nouveau rd.driver.blacklist=nouveau -- initrd.img
  4. Enjoy!

Back Story

Recently, we were trying to install Qubes GNU/Linux version 4.0 on a Lenovo Legion Y520 that has NVIDIA® GeForce® GTX 1050 Ti installed. After disabling secure boot from the BIOS and then setting the default boot to be on Legacy Devices, we were able to boot the anaconda installer.

We proceeded into configuring the installation (set the timezone, the keyboard layout, created the administrator user and selected the disk for the installation) and we waited for the system to install. After some serious amount of time, we realized that the installer had crashed completely while installing qubes-mgmt-salt-base-topd.noarch. We restarted the process and tried again, this time the installed did not crash but it would get stuck at the same step. Following, we gave it a few more tries just in case it would work but unfortunately it would always result either crashing or getting infinitely stuck.

Following the guide at https://www.qubes-os.org/doc/uefi-troubleshooting/ and https://www.qubes-os.org/doc/nvidia-troubleshooting/ we modified the boot parameters of the installer to add mabps and noexitboot, then disable the nouveau driver for the graphics card and it worked like a charm.


Horrible Solution: How to delete all docker logs 2

Recently, we needed to delete the logs of a running docker setup. To do so, we used the following horrible solution:

First, we executed docker system info | grep "Docker Root Dir";to get the installation path of docker. It resulted to the following:

Docker Root Dir: /var/lib/docker

Then, we truncated all log files using the following command while executing as root:

truncate -s 0 /var/lib/docker/containers/*/*-json.log;

Bonus

To make the command a onliner, use the following:


sudo sh -c 'truncate -s 0 $(docker system info | grep "Docker Root Dir" | cut -d ":" -f2 | cut -d " " -f2-)/containers/*/*-json.log';


Notes on how to connect from an external machine to a docker database in Google Compute Engine

A) Create a firewall rule in your VPC Network that allows you to connect to your database from outside the network: https://console.cloud.google.com/networking/firewalls/list

B) From your remote machine repair your database using mysqlcheck.

On Fedora you can install it by installing the MariaDB package as follows:

sudo dnf install mariadb -y;

The following command will automatically repair all databases and tables in that instance of MySQL, where of course the user has access:

mysqlcheck --host 45.37.15.225 --port 33061 --user admin --all-databases --auto-repair --password;

C) Edit the new firewall rule and either disable it or delete it for security.


Easy way to repair and optimize core WordPress MySql DataBase Tables

To manually repair and optimize the core WordPress tables of your MySql (or MariaDB) database:

A) edit your wp-config.php and add

define('WP_ALLOW_REPAIR', true);

right before the line

/* That's all, stop editing! Happy blogging. */

B) Visit the following link (and replace example.com with the domain or the IP of your site installation)

https://example.com/wp-admin/maint/repair.php

C) Press the Repair and Optimize Database button and wait for some time (depending on the size of the core tables of your installation)

D) Once the above step is done, remove or comment out (by adding a # at the beginning of the line) the line:

define('WP_ALLOW_REPAIR', true);

You need to do this step to to prevent this page (which could potentially take a lot of resources) from being used by unauthorized users.