Skip to content

Instantly share code, notes, and snippets.

@rkarsnk
rkarsnk / create-cloud-init.sh
Created April 19, 2024 03:39 — forked from casperghst42/create-cloud-init.sh
Create a cloud-init Debian 12 image on proxmox
#!/bin/bash
# Author: Casper Pedersen (github.com/casperghst42)
# License: GPL2
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
virt-customize -a debian-12-generic-amd64.qcow2 --install qemu-guest-agent --install resolvconf --install systemd-resolved --update --run-command 'mkdir -p /etc/network/interfaces.d' --run-command 'echo "auto ens18" >> /etc/network/interfaces.d/ens18' --run-command 'echo "iface ens18 inet manual" >> /etc/network/interfaces.d/ens18'
qm create 100000 --name "debian12-cloudinit-template" --memory 2048 --net0 virtio,bridge=vmbr0
qm importdisk 100000 debian-12-generic-amd64.qcow2 local-lvm -format qcow2

Keybase proof

I hereby claim:

  • I am rkarsnk on github.
  • I am rkarsnk_jp (https://keybase.io/rkarsnk_jp) on keybase.
  • I have a public key ASDofQ7yC9iJFN7ccgoxoCVLSSnbcZOe65L4_b7cGHpP2go

To claim this, I am signing this object:

@rkarsnk
rkarsnk / how_to_debug_MikanLoader.md
Last active December 1, 2021 09:40
MikanLoaderを例にEFIアプリのGDBデバッグ

GDBでEFIアプリケーションをデバッグする

DEBUG準備

UEFIモードで起動したQEMUで、debug.logを出力できるようにする。
DEBUGに対応したOVMFが必要であるため、EDK2からビルドする。

$ cd edk2
$ make -C BaseTools/Source/C        <- buildに必要なC toolをビルド
$ source ./edksetup.sh
$ build -p OvmfPkg/OvmfPkgX64.dsc -b DEBUG -a X64 -t CLANG38
$ ls edk2/Build/OvmfX64/DEBUG_CLANG38/FV/ |grep OVMF
@rkarsnk
rkarsnk / remove_pve7_subscription_notice.sh
Last active November 7, 2021 07:46
Remove Proxmox VE7 Subscription Notice
#!/bin/bash
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
systemctl restart pveproxy.service