Change GPT Partition Type Code
/ 497 words
/ 3 min read
#GPT
#disk
Why change the type code of a hard disk partition? Here’s how it all started.
Ventoy is an open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files. There is a problem, when it create an EFI partition.
But there’s a problem, Ventoy creates an EFI partition, formatted as FAT16, and the partition type code is 0700 (correctly it should be EF00). On macOS, since the EFI partition is automatically mounted, if two USB flash drives are inserted at the same time, the second one will not be mounted correctly.
After doing some searching, I chose GPT fdisk. It is open source software (GPL) and cross-platform, supporting Linux, macOS, Windows.
How to Optimize MTU for PPPoE Connections
/ 585 words
/ 3 min read
#network
For users connecting via PPPoE (Point-to-Point Protocol over Ethernet), ensuring the correct MTU (Maximum Transmission Unit) setting on their router is crucial for maintaining optimal network performance and internet access.
Understanding MTU # MTU, which stands for Maximum Transmission Unit, is a concept related to Layer 2 networking. Its purpose is to limit the size of data (payload) within a MAC frame.
Think of data packets like goods being transported by trucks. If the goods are too large, the truck cannot transport them efficiently. Conversely, if the packaging is too light or insufficient, transportation efficiency suffers. MTU is akin to the maximum load capacity of the truck.
Issue a Free Wildcard SSL Certificate with acme.Sh
/ 738 words
/ 4 min read
#https
#ssl
#cronjob
Enabling HTTPS on websites can deal with “HTTP hijacking” by ISPs. In most cases, using a free SSL certificate is sufficient.
Recommended CA and Issuance Tools # ZeroSSL and Let’s Encrypt are two common CAs (Certificate Authorities). They both offer free SSL certificates with a 90-day validity period. The advantages are as follows:
Support Wildcard Certificates (like *.example.com ). Support ECC certificate (ECC certificate is smaller than RSA under the same security). Can be issued through API, no need to apply manually. It is recommended to use acme.sh as a certificate issuance tool. It supports ACME v2, pure shell implementation, no other dependencies, and can be used on Linux / BSD.
How to Delete All Git Commit History
/ 183 words
/ 1 min read
#git
#code
If you want to delete all git commit history but keep the files, you can follow the steps bellow.
IMPORTANT: Please DO NOT delete the .git folder directly, as this will cause issues with your git repository.
1. Create an Orphan Branch # git checkout --orphan new_branch Create an orphan branch (a branch without a parent branch), named new_branch, and switch to it.
--orphan: Create an orphan branch from starting from the current HEAD. The first commit made on this new branch will establish a new history that is entirely disconnected from all other branches and commits.
2. Add Alll Files to the New Brach # git add -A git commit -am "initial commint" 3.