Skip to content

Instantly share code, notes, and snippets.


Marek Marczykowski-Górecki marmarek

View GitHub Profile
import argparse
import os
import os.path
import pathlib
import struct
import sys
import fileinput
marmarek / ovmf.txt
Created May 24, 2020
Set debian-10 vm to boot via OVMF in Qubes R4.0
View ovmf.txt
in TemplateVM/StandaloneVM:
fdisk -l /dev/xvda # verify xvda1 is "EFI system"
mkfs.vfat /dev/xvda1
mkdir /boot/efi
echo '/dev/xvda1 /boot/efi vfat defaults 0 0' >> /etc/fstab
mount /boot/efi
Add noapic to GRUB_CMDLINE_LINUX in /etc/default/grub
marmarek / builder.conf
Created Mar 5, 2020
qubes-builder configuration for R4.1 devel builds
View builder.conf
include example-configs/qubes-os-r4.1.conf
DIST_DOM0 = fc31
linux-kernel \
anaconda \
blivet \
installer-qubes-os \
core-admin-linux \
View default-grub
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-8aad3cbf-caba-4651-a35a-02ca14e831e9 i915.alpha_support=1 plymouth.ignore-serial-consoles graphical rhgb quiet"
GRUB_CMDLINE_XEN_DEFAULT="console=none dom0_mem=min:1024M dom0_mem=max:4096M iommu=no-igfx ucode=scan smt=off"
marmarek / builder.conf
Last active Dec 22, 2019
builder.conf for a test R4.1 on fc31 build
View builder.conf
include example-configs/qubes-os-r4.1.conf
DIST_DOM0 = fc31
ifeq (,$(filter salt,$(COMPONENTS)))
# download pre-built templates
INSTALLER_KICKSTART = /tmp/qubes-installer/conf/travis-iso-full.ks
View keyboard-blink.c
marmarek /
Last active Jun 12, 2019
qubes-core-admin to limit admin.vm.List return value based on qrexec policy
import qubes.ext
import qubespolicy
class AdminListExtension(qubes.ext.Extension):
def get_system_info(self, app):
system_info = {'domains': { {
'tags': list(domain.tags),
View hvmloader.log
(d3) HVM Loader
(d3) Detected Xen v4.12-unstable
(d3) Xenbus rings @0xfeffc000, event channel 1
(d3) System requested SeaBIOS
(d3) CPU speed is 2592 MHz
(d3) Relocating guest memory for lowmem MMIO space enabled
(XEN) irq.c:374: Dom3 PCI link 0 changed 0 -> 5
(d3) PCI-ISA link 0 routed to IRQ5
(XEN) irq.c:374: Dom3 PCI link 1 changed 0 -> 10
(d3) PCI-ISA link 1 routed to IRQ10
marmarek /
Last active Feb 17, 2022
Control keyboard color based on active qube label
# vim: et sw=4 ts=4
# Requires installed in sys-usb (compile it and put into /usr/local/bin for example)
# Usage: run in dom0:
# qvm-run --localcmd=./ --pass-io -- sys-usb 'xargs -n1 g810-led -a'
# in Qubes 4.0, the command from qvm-run argument is ignored with --localcmd
# and we get raw qubes.VMShell, so echo the command on the first line
View installer-qubes-os-dom0-fc25.log
make[2]: Entering directory '/home/user/builder-R4.0'
INFO: version 1.4.9 starting (python version = 3.6.5)...
Start: init plugins
DEBUG: ensuring that dir exists: /home/user/builder-R4.0/cache/fc25/fedora-25-x86_64/dnf_cache/
INFO: selinux disabled
Finish: init plugins
Start: run
DEBUG: mock final configuration:
DEBUG: version: 1.4.9
DEBUG: basedir: /home/user/builder-R4.0/chroot-fc25/mock