Skip to content

Instantly share code, notes, and snippets.

View onomatopellan's full-sized avatar

onomatopellan

View GitHub Profile
@onomatopellan
onomatopellan / .config
Created June 12, 2020 19:49
kernel configuration for a working 5.7.0 kernel in Insider builds 19640+
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.7.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90201
CONFIG_LD_VERSION=233000000
CONFIG_CLANG_VERSION=0
CONFIG_CC_CAN_LINK=y
@onomatopellan
onomatopellan / vhdx.txt
Last active January 21, 2024 21:57
How to automount an external vhdx file in WSL2
1. Ubuntu WSL2 must be already installed in C: system drive and user should be able to call windows binaries like wsl.exe from bash.
2. We will install Alpine WSL2 distro in an external partition/disk:
Download Alpine from here:
https://github.com/yuk7/AlpineWSL/releases/download/3.11.5-1/Alpine.zip
Extract the files in an external partition/disk. (for example D:\Alpine)
Make sure WSL2 is enabled by default (wsl.exe --set-default-version 2)
Inside the Alpine folder run Alpine.exe to install the Distro. An ext4.vhdx file will be created in that same folder.
@onomatopellan
onomatopellan / mongo.strace
Last active May 22, 2020 16:43
sudo service mongodb start in Ubuntu 20.04 WSL1 build 19628
66 execve("/usr/sbin/service", ["service", "mongodb", "start"], 0x7fffca86c0f8 /* 13 vars */) = 0
66 brk(NULL) = 0x7fffe0bcd000
66 arch_prctl(0x3001 /* ARCH_??? */, 0x7fffe95b59e0) = -1 EINVAL (Invalid argument)
66 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
66 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
66 fstat(3, {st_mode=S_IFREG|0644, st_size=28564, ...}) = 0
66 mmap(NULL, 28564, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fac7a509000
66 close(3) = 0
66 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
66 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360q\2\0\0\0\0\0"..., 832) = 832
@onomatopellan
onomatopellan / mongodb.strace
Last active May 13, 2020 20:37
mongodb build 19041 in Ubuntu 20.04 WSL1 strace
2370 execve("/usr/bin/sudo", ["sudo", "service", "mongodb", "start"], 0x7fffd9411040 /* 13 vars */) = 0
2370 access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
2370 brk(NULL) = 0x7fffd325c000
2370 arch_prctl(0x3001 /* ARCH_??? */, 0x7fffd9f91550) = -1 EINVAL (Invalid argument)
2370 fcntl(0, F_GETFD) = 0
2370 fcntl(1, F_GETFD) = 0
2370 fcntl(2, F_GETFD) = 0
2370 access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
2370 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
2370 openat(AT_FDCWD, "/usr/lib/sudo/tls/haswell/x86_64/libaudit.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
@onomatopellan
onomatopellan / wsl.conf
Last active December 19, 2023 09:09
/etc/wsl.conf Avoid adding Windows Path to Linux $PATH
[interop]
appendWindowsPath=false