Skip to content

Instantly share code, notes, and snippets.

View Sadi58's full-sized avatar

Sadi Yumuşak Sadi58

  • Istanbul, Turkey
View GitHub Profile
@Axel-Erfurt
Axel-Erfurt / SpeedTest.py
Created April 27, 2018 08:21
GUI for speedtest-cli (PyQt5)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#############################################################################
import csv, codecs, time, os
import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
from PyQt5.QtCore import (QFile, QFileInfo, QPoint, QRect, QSettings, QSize,
Qt, QTextStream, QProcess, QDir)
from PyQt5.QtGui import QIcon, QFont
from PyQt5.QtWidgets import (QAction, QApplication, QMainWindow,
@benjaminblack
benjaminblack / booting-debian-linux-directly-from-the-uefi-boot-manager.md
Last active August 24, 2023 18:21
Booting (Debian) Linux directly from the UEFI boot manager

With a modern UEFI motherboard, it is possible to boot Linux directly from the UEFI boot manager, without relying on a boot loader like GRUB.

First, the kernel has to be compiled with the "EFI boot stub" option enabled, which modifies the kernel so that it can be directly executed by the UEFI boot manager.

Debian enables this flag: grep CONFIG_EFI_STUB /boot/config-*

Second, the EFI System Partition (ESP) must be large enough to hold the kernel and the initrd image. The UEFI boot manager executable files must be on the ESP; therefore, the kernel and initrd must be on the ESP, since the kernel is the EFI executable, and the kernel requires the initrd to be somewhere it can find it.

The ESP in Debian is usually 100-250 MB, which is fine.

#!/bin/bash
# Author: CzBiX
# URL: https://gist.github.com/CzBiX/e64256b23687bb13da02
# Support only Ubuntu 16.04
DEST_PACKAGE="libglib2.0-0"
DEST_VERSION="2.48.1-1~ubuntu16.04.1"
DEST_FILE="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4800.1"
PATCH_DATA="f626c: eb"
SUCCESS_MSG="Please quit nautilus with 'nautilus -q' to make sure patch worked."