
Build and Inspect an ext4 Image With mkfs.ext4, dumpe2fs and debugfs
Create an ext4 filesystem inside a plain file, read its superblock with dumpe2fs, and walk inodes and directories with debugfs without mounting anything.
Tag
82 posts

Create an ext4 filesystem inside a plain file, read its superblock with dumpe2fs, and walk inodes and directories with debugfs without mounting anything.

Set kernel.perf_event_paranoid, kernel.kptr_restrict and CAP_PERFMON so perf can sample user and kernel code without running everything as root.

Choose between a FUSE daemon and an in-kernel filesystem by weighing crash safety, speed, tooling and boot needs, with a decision table and a libfuse sketch.

Stop zombie children in C on Linux with a SIGCHLD handler that loops on waitpid, or with SA_NOCLDWAIT, and learn what each choice costs you.

Write a shell script that uses readelf and nm to fail a build when an ELF binary lacks PIE, full RELRO, a non-executable stack, a stack canary or CET notes.

Load an eBPF classifier with tc and cls_bpf on ingress or egress using a clsact qdisc, return TC_ACT verdicts, and see how tcx replaces it on Linux 6.6.

Build the perf tool from the Linux source tree with make -C tools/perf, check the feature report, and install it so its version matches the kernel you run.

See what zombie and orphan processes are, how each one appears in ps on Linux, why a zombie cannot be killed, and how to fix the parent that causes it.

An inode stores a file's metadata but not its name. See inode numbers with ls -i, read every field with stat, and learn why df -i can fill up first.

Find why a KVM guest is slow or stuck by recording kvm tracepoints with trace-cmd and summarizing VM exits by reason with perf kvm stat, with sample output.

XDP runs eBPF programs on packets inside the NIC driver, before the kernel builds an skb. See the hook point, the five verdicts and the three attach modes.

Prepare a Linux machine for KVM and QEMU work as a normal user: packages, the kvm group, headers, tracing access and a smoke test, with no sudo for daily use.