GNU/Linux
1. Linux linux
ID: ab57dccf-c9f3-4347-b9d0-5731904f3d67 CREATED: <2025-02-09 Sun 13:33>>>
At this point, I don't really care what the non-believers think - if you are not running GNU/Linux as your daily driver, you are wrong. Of course I understand the need to run dedicated Windows and MacOS machines, when it is out of your control - say you have a Macbook or need to run it for %employer. No need to stress about that. But when you are given the opportunity - given a choice, you should pick whatever Linux-based OS suits your needs best.
1.1. Libraries
ID: 3e6b5e34-4cf0-4289-afda-bea7c2a343dd CREATED: <2025-02-14 Fri 22:11>
1.1.1. Ublk fs
ID: 46fdde04-496d-45b4-a674-367edafb8054 CREATED: <2025-03-04 Tue 17:46>
1.1.2. Tracing test log
ID: 292a62ff-6d56-42e2-88fa-bd13ddbc2fb1 CREATED: <2025-03-04 Tue 17:48>–
1.1.3. BPF log
ID: 97d3d07c-e576-412b-a97a-2879efa998c5 CREATED: <2025-03-04 Tue 19:02>–
1.1.4. RTLA test
ID: 378227a0-d265-4272-8013-73df72b5e49a CREATED: <2025-03-04 Tue 19:06>
The realtime Linux analysis tool — The Linux Kernel documentation
–1.1.5. Keyutils crypto
ID: 5e859a3f-0c31-4796-85c6-7008b346f186 CREATED: <2025-02-14 Fri 22:12>–
1.1.6. Netlink
ID: 25cc1e3f-60f0-401a-a8b6-ac8d5670233d CREATED: <2025-03-04 Tue 19:14>
Introduction to Netlink — The Linux Kernel documentation – Netlink Handbook — The Linux Kernel documentation
–1.2. Kernel
ID: caed860f-fcef-43a2-b080-94b01352cd43 CREATED: <2025-02-16 Sun 20:12>
Unreliable Guide To Hacking The Linux Kernel — The Linux Kernel documentation – The Linux Kernel documentation — The Linux Kernel documentation
–1.2.1. Devices
ID: ad25b130-d832-4109-84ad-7cb9900ed227 CREATED: <2025-01-17 Fri 19:15>
/dev In Linux, everything is a file.
dev contains special device files - usually block or character device.
major, minor = category, device 0, 5
mknod - create special device files
- utils
ID: f8ce343e-c866-4fff-8e39-2da32a59d56e CREATED: <2025-02-06 Thu 19:16>
dd if=/dev/zero of=myfile bs=1M count=32 losetup --show -f myfile ls -al /dev/loop0 losetup -d /dev/loop0 #teardown
echo "sup dude" > /dev/loop0 dd if=/dev/loop0 -bs=1 dd if=/dev/nvme0 of=/dev/null progress=true #pacman -S hdparm hdparm -T /dev/nvme0
modprobe scsi_debug add_host=5 max_luns=10 num_tgts=2 dev_size_mb=16
sparsefiles: create with C, dd, or truncate
truncate --help
test mkfs.btrfs on 10T dummy block device
dd if=/dev/zero of=/tmp/bb1 bs=1 count=1 seek=10T du -sh /tmp/bb1 losetup --show -f /tmp/bb1 mkfs.btrfs /dev/loop0
diagnostics
iostat # pacman -S sysstat blktrace # paru -S blktrace iotop # pacman -S iotop
bcc/ trace: Who/which process is executing specific functions against block devices?
bcc/biosnoop: Which process is accessing the block device, how many bytes are accessed, which latency for answering the requests?
at the kernel level besides BPF we got kmods and DKMS,
compression/de-duplication can be done via VDO kernel mod
- Frame Buffer Device
ID: 639e5d85-e143-421d-86be-9bc291bc2f8b CREATED: <2025-01-17 Fri 19:15>
The Frame Buffer Device — The Linux Kernel documentation
–/dev/fb*
- used by fbgrab/fbcat program
- Userspace Block Device
ID: d58cb494-ce43-49cc-859b-aa6a518ac314 CREATED: <2025-02-14 Fri 22:11>
– - Input Devices
ID: ea9bb3f9-3607-4be2-82f8-e9b3381a0524 CREATED: <2025-02-27 Thu 18:51>
–
1.2.2. Systems
ID: 1f728d2c-edf1-4502-9560-d0a6c45d5df8 CREATED: <2025-02-27 Thu 19:38>
syscalls(2) - Linux manual page – System Calls — The Linux Kernel documentation – linux/arch/x86/entry/syscalls/syscall_64.tbl
–- Core
ID: c670fcee-f9b1-4acd-ab32-3b795748b544 CREATED: <2025-03-07 Fri 15:35>
– - Storage
ID: f28b16e2-97e5-4575-a3d6-941efeb8942d CREATED: <2025-03-07 Fri 15:36>
– - ACPI hw
ID: ac0ae4dd-21d4-4b45-9751-a102a48f30e6 CREATED: <2025-03-04 Tue 19:16>
ACP - Wikipedia – ACPI Support — The Linux Kernel documentation
–Advanced Configuration and Power Interface
- SPI
ID: cde3ff32-1ad9-43ab-9ac7-05efd3f88490 CREATED: <2025-03-04 Tue 19:20>
Serial Peripheral Interface (SPI) — The Linux Kernel documentation
– - DFL hw
ID: 5499a81e-1c6e-48d5-b906-9d2155afc562 CREATED: <2025-03-04 Tue 19:19>
FPGA Device Feature List (DFL) Framework Overview — The Linux Kernel documentation
– - Networking net
ID: 8ed2735d-d259-4a78-8891-ded98f857846 CREATED: <2025-03-07 Fri 15:31>
- Human Interfaces
ID: 19f3c5da-0f20-4eca-b142-7fc71095ca18 CREATED: <2025-03-07 Fri 15:38>
– - IO io
ID: 9d49d145-2c94-4d6f-a4e1-5016df6cbedc CREATED: <2025-02-27 Thu 19:39>
Input/Output operations
- epoll
ID: 74367b29-6a50-4eb4-ac6b-1c1b96dabd89 CREATED: <2025-02-27 Thu 19:39>
– - io_uring
ID: 92c2a9aa-6584-470e-977a-3547bca79414 CREATED: <2025-02-27 Thu 19:39>
io_uring is not an event system · blog · despair labs – GitHub - noteflakes/awesome-io_uring: Awesome io_uring – Zero Copy Rx with io_uring – io_uring(7) - Linux manual page – Missing Manuals - io_uring worker pool – Lord of the io_uring
– - poll
ID: d43311bf-7f5f-4d21-aad8-4b35548813b5 CREATED: <2025-02-27 Thu 19:43>
–
- epoll
1.3. Distros
ID: 34966e81-ab92-4b85-b11e-073784261db5 CREATED: <2025-02-22 Sat 19:31>
List of Linux distributions - Wikipedia
–Linux Distributions
1.3.1. Fedora
ID: c9fdd74c-0eb2-4d8f-bc22-0cf40996f186 CREATED: <2025-02-22 Sat 19:32>–
- CoreOS
ID: ca6795ee-4b2c-4ec3-9bdc-f6be67c2f1ec CREATED: <2025-02-22 Sat 19:32> AKA: FCOS PROPERTIES: :header-args :export both :eval no-export :session coreos :async t
–-
cargo install coreos-installer
core
- Ignition documentation
- Provisioning Fedora CoreOS on QEMU
- requires ignition config file
- should provide ssh key for core user
fetch the qcow2 image
# stream = stable,testing,next coreos-installer download -s $stream -p qemu -f qcow2.xz --decompress -C ~/.stash/scratch/
/home/ellis/.stash/scratch/fedora-coreos-41.20250215.3.0-qemu.x86_64.qcow2
setup a new vm
IGNITION_CONFIG=$config IMAGE=$image # for x86/aarch64: IGNITION_DEVICE_ARG="-fw_cfg name=opt/com.coreos/config,file=${IGNITION_CONFIG}" # for s390x/ppc64le: IGNITION_DEVICE_ARG="-drive file=${IGNITION_CONFIG},if=none,format=raw,readonly=on,id=ignition -device virtio-blk,serial=ignition,drive=ignition" qemu-system-x86_64 -m 2048 -cpu host -nographic -snapshot \ -drive "if=virtio,file=${IMAGE}" ${IGNITION_DEVICE_ARG} \ -nic user,model=virtio,hostfwd=tcp::2222-:22
launch it
qemu-img create -f qcow2 -F qcow2 -b "${IMAGE}" my-fcos-vm.qcow2 qemu-system-x86_64 -m 2048 -cpu host -nographic \ -drive if=virtio,file=my-fcos-vm.qcow2 ${IGNITION_DEVICE_ARG} \ -nic user,model=virtio,hostfwd=tcp::2222-:22
-
- IoT
ID: 79c00d69-0624-4e85-a237-79e73e612dca CREATED: <2025-02-22 Sat 19:34>
–
1.3.2. Arch
ID: 6ef3fb84-6805-46f7-ad13-8929a023b43c CREATED: <2025-02-22 Sat 19:39>–
1.3.3. Ubuntu
ID: 5d1223c7-0ded-44b9-b494-3a3593a2fe02 CREATED: <2025-02-22 Sat 19:39>–
1.3.4. Debian
ID: f03769bc-abf2-4f58-809f-b672c66120f3 CREATED: <2025-02-22 Sat 19:39>–
1.3.5. Alpine
ID: 4e717401-7b7b-4ce6-83c7-6f8420e01b93 CREATED: <2025-02-22 Sat 19:40>–
1.3.6. Adélie
ID: b54a3fef-192f-4767-bec2-c10058e69a89 CREATED: <2025-03-04 Tue 15:27>–
1.3.7. Gentoo
ID: 5cbe7ad4-008a-4ed7-889d-e7ec5663dfd1 CREATED: <2025-02-22 Sat 19:40>–
1.3.8. Slackware
ID: 21e5a881-54d0-410e-b48a-f32ee26ef90d CREATED: <2025-02-22 Sat 19:43>–