blog.masa23.jp

Disabling Vendor Lock on Intel X520 DA2

Notes on using non-Intel SFP+ with Intel X520 DA2 on Linux. Add driver options # cat << _EOF_ > /etc/modprobe.d/ixgbe.conf options ixgbe allow_unsupported_sfp=1,1 _EOF_ Unload and reload the driver # modprobe -r ixgbe # modprobe ixgbe Regenerate initramfs # update-initramfs -u Without this, allow_unsupported_sfp=1,1 will not be enabled on reboot.
2024-05-27

Introducing 10G Home Network (SKS8300-8X)

Background I introduced NURO Hikari 2G at home and installed the SONY NSD-G1000T, but I couldn’t use the 2.5Gbps port and was wasting the 2Gbps line. There weren’t any affordable managed switches with 2.5Gbps ports, but I found a very cheap managed 10Gbps switch called SKS8300-8X and decided to buy it as a guinea pig. It has 8 10G SFP+ ports and costs less than 15,000 yen. Moreover, it’s a
2023-11-29

Using DWARF-2 Debugging Information with GDB on FreeBSD

When debugging a program built with gcc using GDB on FreeBSD, you might encounter errors if the debug information format is different. Here are some notes on the issue. Doesn’t Work When debugging a program built with gcc on FreeBSD’s GDB, you may see an error stating that there is no symbol information. # gcc -g test.c # gdb a.out Works By setting the debug information to use the DWARF-2 format, symbol information will be displayed in gdb.
2023-11-23

How to Cache 502 and 504 Errors with a Web Accelerator

This is a method to cache 502 (Bad Gateway) and 504 (Gateway Timeout) errors using the Sakura Cloud Web Accelerator. High access to non-cacheable content or even cacheable content can cause the origin server to return 502 (Bad Gateway) or 504 (Gateway Timeout) errors due to high server load. Normally, error responses from nginx do not include Cache-Control headers, so they are not cached, which means the load on the origin server continues.
2023-10-10

Rundeck Installation Notes

This document records the setup notes for Rundeck. Environment Version Ubuntu 22.04 Rundeck 4.14.1 Installing Java # apt-get install -y openjdk-11-jre-headless Registering the Repository The official method uses apt-key, which issues a warning on 22.04, so we will change it. # curl -L https://packages.rundeck.com/pagerduty/rundeck/gpgkey > /etc/apt/keyrings/rundeck.asc Next, add the Rundeck repository. # cat << _EOF_ > /etc/apt/sources.list.d/rundeck.list deb [signed-by=/etc/apt/keyrings/rundeck.asc] https://packages.rundeck.com/pagerduty/rundeck/any/ any main deb-src [signed-by=/etc/apt/keyrings/rundeck.asc] https://packages.rundeck.com/pagerduty/rundeck/any/ any main _EOF_ Once the repository is added, update the package information.
2023-07-04

Zabbix 6.4 Installation

This is a note on setting up Zabbix 6.4. The configuration includes Zabbix + Nginx + php-fpm + PostgreSQL + TimescaleDB. Environment Version Ubuntu 22.04 Zabbix 6.4 PostgreSQL 15 Nginx 1.18.0 php-fpm 8.1.2 Register the Repository Download and install Zabbix # wget https://repo.zabbix.com/zabbix/6.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.4-1+ubuntu22.04_all.deb # dpkg -i zabbix-release_6.4-1+ubuntu22.04_all.deb # apt update Install Zabbix # apt install zabbix-server-pgsql zabbix-frontend-php php8.1-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent Install PostgreSQL # apt install postgresql postgresql-contrib Add PostgreSQL Repository and Install # apt install software-properties-common gnupg postgresql-common apt-transport-https lsb-release wget # /usr/share/postgresql-common/pgdg/apt.
2023-05-02

Metabase Installation Notes

Here are the notes on installing Metabase on Ubuntu 22.04 LTS. Install Java The Java Development Kit (JDK) is required. apt-get install -y default-jdk Create Metabase Installation Directory install -d /opt/metabase cd /opt/metabase Download Metabase Download the Metabase binary with the following command: wget https://downloads.metabase.com/v0.45.3/metabase.jar Create User and Group useradd metabase -d /opt/metabase chown -R metabase:metabase /opt/metabase Create systemd Service File Create a systemd service file with the following command:
2023-03-17

Lenovo TAB6 (A101LV) Bootloader Unlock & Root

I got a Lenovo TAB6 (A101LV) and rooted it, so I’m leaving a note. Please do this at your own risk as there is a possibility of bricking the device. Also, since this is a personal note, detailed explanations are not provided. Enable USB Debugging “Settings” => “System” => “About tablet” => “Build number” Tap the build number 7 times to enable “Developer options”. “Settings” => “System” => “Developer options” => Enable “USB debugging”.
2023-03-07

Converting dmesg Timestamps with Busybox

The Busybox dmesg command lacks the -T option to convert and display timestamps, so I tried converting them with a one-liner. One-liner uptime=$(cut -d. -f1 /proc/uptime); dmesg | while read line; do time=$(echo $line | sed -e 's/^\[ *\([0-9]*\).*$/\1/g'); echo "[$(date -d @$(($(date +%s) - $uptime + $time)))] $(echo $line | cut -d ] -f 2 -)" ; done Brief Explanation /proc/uptime records the elapsed time since the system was started in seconds.
2023-02-24

Setting up HTTPS SSL Certificates on OpenWrt

This guide explains how to set up HTTPS SSL certificates on OpenWrt. Can it actually be configured from the WebUI?? For certificates with a short validity period, such as those from Let’s Encrypt, it might be a good idea to automate the process using a shell script and run it periodically with cron. Prerequisites Obtain an SSL certificate Enable HTTPS from the WebUI System -> Administration -> HTTP(S) Access Check the box for Redirect to HTTPS Convert SSL certificate and private key to DER format openssl x509 -in server.
2023-02-23