Skip to content

Instantly share code, notes, and snippets.

View kekneus373's full-sized avatar

kekneus373

View GitHub Profile
@kekneus373
kekneus373 / prev-boot-uptime.md
Created May 3, 2026 09:17
View uptime of previous boot Linux

To view the uptime for the current boot in Linux, you can use the command who -b, which shows the last system boot time. Alternatively, you can use last reboot to see a list of all reboots along with their timestamps.

Sources: 1, 2.

@kekneus373
kekneus373 / extend-freedos-diskimage.md
Last active May 1, 2026 13:04
[FAT16] Extending A Disk Image To 1000000000 Bytes In Linux (NOT EASY)

Since we are working with a FAT16 partition inside a .img file on Linux, we cannot simply use resize2fs (that's for ext filesystems). We must first ensure the partition table reflects the new size, and then use a FAT-specific tool to expand the filesystem.

Here is the step-by-step process:

1. Check the Current State

First, verify the current partition table and filesystem size. Replace your-image.img with your actual filename.

# View the partition table (look for the "Size" column)
fdisk -l your-image.img
@kekneus373
kekneus373 / spoiler.md
Created April 26, 2026 10:57
[Markdown] Quick Spoiler

Spoiler tags are not directly supported in Markdown, but you can create a similar effect using HTML's <details> and <summary> tags to hide and reveal text. For example: <details><summary>Click to reveal spoiler</summary>Your spoiler text here.</details>

Sources: 1, 2.

@kekneus373
kekneus373 / sony-prs-blank-books-fix.md
Created April 23, 2026 21:05
[E-Ink] Fix Sony Reader Issues with Blank Books: A Quick Guide

Sony Reader Blank Books Issue Fix Guide

Objective: Ensure seamless reading experience on your Sony Reader by resolving common issues related to blank pages (books without content).


Steps to Resolve Blank Books Issue:

  1. Prepare Your Book Files:
@kekneus373
kekneus373 / docker-lowend.md
Created April 15, 2026 21:57
[Docker] Overview: Running CTs under 512 MB of Wam

will light docker container run on alpine linux on 512M on RAM?

Sources: r/homelab, r/UgreenNASync, r/selfhosted +6 more

Running light Docker containers on Alpine Linux with 512MB of RAM is a challenging but potentially feasible task. Here are some insights and recommendations from Redditors who have tackled similar setups:

Alpine Linux on 512MB RAM

How is Arch Linux so fast?? Have just in...

Model: qwen3-vl-2b-instruct (LocalAI)

Date: 4/5/2026, 2:52:55 PM


User

@kekneus373
kekneus373 / recommended-groups-linux.md
Created April 15, 2026 21:53
Avoid Unexpected Issues on Linux Desktops by joining the most used Groups
@kekneus373
kekneus373 / btrfs-extend.md
Created April 5, 2026 16:14
[Btrfs] Expand filesystem

To extend a Btrfs filesystem to fill the entire disk, use the command btrfs filesystem resize max /mount-point, where /mount-point is the path to your Btrfs filesystem. This command will resize the filesystem to utilize all available space on the disk. (Do this online).

Tips for LVM expansion

@kekneus373
kekneus373 / efibootmgr-v.md
Created April 5, 2026 15:17
[UEFI] Remove unwanted boot entries

Remove Old UEFI Boot Entries

To remove old UEFI boot entries on Windows, open an elevated Command Prompt and run bcdedit /enum firmware to list all firmware applications, then copy the identifier (GUID) of the entry you wish to remove.

Once the identifier is identified, execute the deletion command bcdedit /delete {identifier}, replacing {identifier} with the specific GUID enclosed in curly braces. It is critical to back up your current boot configuration using bcdedit /export before deletion to prevent boot failure if a necessary entry is removed by mistake.

  • List Entries: bcdedit /enum firmware
  • Delete Entry: bcdedit /delete {GUID}
  • Backup: bcdedit /export newbcd
@kekneus373
kekneus373 / dd-truncate.md
Created April 5, 2026 15:14
[dd] Safely Truncate Disk Image

Truncate DD Disk Image

To safely truncate a dd disk image, you must first shrink the filesystem and partitions within the image to remove empty space, as simple truncation can corrupt partition tables, especially on GPT-formatted disks.

For GPT-partitioned images, the critical step is preserving the backup partition table located at the disk's end. Simply truncating the file will remove this backup, rendering the image unbootable on legacy BIOS systems. The safe procedure involves:

  • Mount the image as a loop device using sudo losetup --partscan -f -P myimage.img.
  • Shrink the filesystem (e.g., sudo e2fsck -f /dev/loop0p2 followed by sudo resize2fs /dev/loop0p2 5G).
  • Resize the partition to match the new filesystem size using sudo parted /dev/loop0 unit s resizepart 2 .