aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/.markdownlint.json3
-rw-r--r--www/content/notes/cheat-sheet.md142
-rw-r--r--www/content/notes/hurd.md55
-rw-r--r--www/content/notes/hurd/cheat-sheet.md65
-rw-r--r--www/content/notes/hurd/todos.md2
-rw-r--r--www/content/posts/c-func-ext.md2
-rw-r--r--www/layouts/index.html2
7 files changed, 132 insertions, 139 deletions
diff --git a/www/.markdownlint.json b/www/.markdownlint.json
index 2811a59..12bc65e 100644
--- a/www/.markdownlint.json
+++ b/www/.markdownlint.json
@@ -1,6 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json",
"default": true,
- "MD013": false,
- "MD014": false
+ "MD013": false
}
diff --git a/www/content/notes/cheat-sheet.md b/www/content/notes/cheat-sheet.md
index 77e337d..56bc92a 100644
--- a/www/content/notes/cheat-sheet.md
+++ b/www/content/notes/cheat-sheet.md
@@ -1,18 +1,24 @@
---
title: "Cheat Sheet"
date: 2025-04-01T23:09:53+08:00
-lastmod: 2025-04-01T23:09:53+08:00
+lastmod: 2025-06-12T01:09:39+08:00
---
+{{< mono >}}
+
+goto: [Hurd Cheat Sheet (in a separated page)](/notes/hurd/cheat-sheet)
+
+{{< /mono >}}
+
## GRUB
Update GRUB after `grub` package is updated. Replace `/boot` with your mount
point of the EFI partition in `--efi-directory=/boot`. Replace `GRUB` with your
bootloader id in `--bootloader-id=GRUB`.
-```bash-session
-# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
-# grub-mkconfig -o /boot/grub/grub.cfg
+```sh
+grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
+grub-mkconfig -o /boot/grub/grub.cfg
```
## (Private) My Service Infrastructure Management
@@ -23,14 +29,14 @@ All commands should be run at the project root path.
Script from <https://docs.deno.com/runtime/getting_started/installation/>
-```bash-session
-$ curl -fsSL https://deno.land/install.sh | sh
+```sh
+curl -fsSL https://deno.land/install.sh | sh
```
### Add Git Server User / Set Password
-```bash-session
-$ docker run -it --rm -v "./data/git/user-info:/user-info" httpd htpasswd /user-info [username]
+```sh
+docker run -it --rm -v "./data/git/user-info:/user-info" httpd htpasswd /user-info [username]
```
### Certbot
@@ -54,14 +60,14 @@ A complete command is `[prefix] [docker (based on challenge kind)] [command] [ch
For example, **test** create/expand/shrink with standalone server:
-```bash-session
-# docker run -it --rm --name certbot \
-> -v "./data/certbot/certs:/etc/letsencrypt" -v "./data/certbot/data:/var/lib/letsencrypt"` \
-> -p "0.0.0.0:80:80" \
-> certonly \
-> --standalone \
-> -d crupest.life -d mail.crupest.life \
-> --test-cert --dry-run
+```sh
+docker run -it --rm --name certbot \
+ -v "./data/certbot/certs:/etc/letsencrypt" -v "./data/certbot/data:/var/lib/letsencrypt"` \
+ -p "0.0.0.0:80:80" \
+ certonly \
+ --standalone \
+ -d crupest.life -d mail.crupest.life \
+ --test-cert --dry-run
```
## System Setup
@@ -70,107 +76,57 @@ For example, **test** create/expand/shrink with standalone server:
#### Setup SSL Certificates and Curl
-```bash-session
-# apt-get update
-# apt-get install ca-certificates curl
-# install -m 0755 -d /etc/apt/keyrings
+```sh
+apt-get update
+apt-get install ca-certificates curl
+install -m 0755 -d /etc/apt/keyrings
```
### Docker Setup
#### Uninstall Packages Provided by Stock Repo
-```bash-session
-# for pkg in docker.io docker-doc docker-compose \
-> podman-docker containerd runc; do
-> apt-get remove $pkg;
-> done
+```bash
+for pkg in docker.io docker-doc docker-compose \
+ podman-docker containerd runc; do
+ apt-get remove $pkg;
+done
```
#### Install Certs From Docker
Remember to [setup ssl and curl](#setup-ssl-certificates-and-curl) first.
-```bash-session
-# curl -fsSL https://download.docker.com/linux/debian/gpg \
-> -o /etc/apt/keyrings/docker.asc
-# chmod a+r /etc/apt/keyrings/docker.asc
+```sh
+curl -fsSL https://download.docker.com/linux/debian/gpg \
+ -o /etc/apt/keyrings/docker.asc
+chmod a+r /etc/apt/keyrings/docker.asc
```
#### Add Docker Repos
-```bash-session
-# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
-> https://download.docker.com/linux/debian \
-> $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
-> tee /etc/apt/sources.list.d/docker.list > /dev/null
+```bash
+echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
+ https://download.docker.com/linux/debian \
+ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
+ tee /etc/apt/sources.list.d/docker.list > /dev/null
```
#### Install Docker Packages
-```bash-session
-# apt-get update
-# apt-get install docker-ce docker-ce-cli containerd.io \
-> docker-buildx-plugin docker-compose-plugin
+```sh
+apt-get update
+apt-get install docker-ce docker-ce-cli containerd.io \
+ docker-buildx-plugin docker-compose-plugin
```
#### Start And Enable Docker
Remember to log out and log back to let user group change take effects.
-```bash-session
-# systemctl enable docker
-# systemctl start docker
-# groupadd -f docker
-# usermod -aG docker $USER
-```
-
-### Font Config
-
-```xml
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
-<fontconfig>
-
- <alias>
- <family>sans-serif</family>
- <prefer>
- <family>MiSans</family>
- <family>Noto Color Emoji</family>
- </prefer>
- </alias>
-
- <alias>
- <family>serif</family>
- <prefer>
- <family>MiSans</family>
- <family>Noto Color Emoji</family>
- </prefer>
- </alias>
-
- <alias>
- <family>Maple Mono</family>
- <prefer>
- <family>Maple Mono NF</family>
- <family>Maple Mono</family>
- </prefer>
- </alias>
-
- <alias>
- <family>Noto Sans</family>
- <prefer>
- <family>Noto Sans</family>
- <family>Noto Sans CJK SC</family>
- </prefer>
- </alias>
-
- <alias>
- <family>Noto Serif</family>
- <prefer>
- <family>Noto Serif</family>
- <family>Noto Serif CJK SC</family>
- </prefer>
- </alias>
-
-</fontconfig>
+```sh
+systemctl enable docker
+systemctl start docker
+groupadd -f docker
+usermod -aG docker $USER
```
diff --git a/www/content/notes/hurd.md b/www/content/notes/hurd.md
index 67b8df9..aeb9b15 100644
--- a/www/content/notes/hurd.md
+++ b/www/content/notes/hurd.md
@@ -1,12 +1,12 @@
---
title: "Hurd"
date: 2025-03-03T15:34:41+08:00
-lastmod: 2025-03-03T23:28:46+08:00
+lastmod: 2025-06-12T01:09:39+08:00
---
{{< mono >}}
-[TODOS](/notes/hurd/todos)
+goto: [Cheat Sheet](/notes/hurd/cheat-sheet) | [Todos](/notes/hurd/todos)
{{< /mono >}}
@@ -38,6 +38,18 @@ refs:
{{< /mono >}}
+## mailing lists / irc
+
+{{< mono >}}
+
+| name | address |
+| --- | --- |
+| hurd | <bug-hurd@gnu.org> |
+| debian | <debian-hurd@lists.debian.org> |
+| irc | librechat #hurd |
+
+{{< /mono >}}
+
## *_MAX patch
See [this](posts/c-func-ext.md)
@@ -92,42 +104,3 @@ web
cru: <https://crupest.life/git/hurd/web.git>
upstream: <https://git.savannah.gnu.org/git/hurd/web.git>
{{< /link-group >}}
-
-## cheatsheet
-
-Start qemu
-
-```sh
-qemu-system-x86_64 -enable-kvm -m 4G \
- -net nic -net user,hostfwd=tcp::3222-:22 \
- -vga vmware -drive cache=writeback,file=[...]
-```
-
-Configure/Setup network
-
-```sh
-settrans -fgap /servers/socket/2 /hurd/pfinet \
- -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
-fsysopts /servers/socket/2 /hurd/pfinet \
- -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
-fsysopts /server/socket/2 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
-```
-
-Setup apt
-
-```sh
-apt-get --allow-unauthenticated --allow-insecure-repositories update
-apt-get --allow-unauthenticated upgrade
-```
-
-## mailing lists / irc
-
-{{< mono >}}
-
-| name | address |
-| --- | --- |
-| hurd | <bug-hurd@gnu.org> |
-| debian | <debian-hurd@lists.debian.org> |
-| irc | librechat #hurd |
-
-{{< /mono >}}
diff --git a/www/content/notes/hurd/cheat-sheet.md b/www/content/notes/hurd/cheat-sheet.md
new file mode 100644
index 0000000..f48e943
--- /dev/null
+++ b/www/content/notes/hurd/cheat-sheet.md
@@ -0,0 +1,65 @@
+---
+title: "Hurd Cheat Sheet"
+date: 2025-06-12T00:59:16+08:00
+lastmod: 2025-06-12T00:59:16+08:00
+---
+
+## Mirrors
+
+The mirror has to be `debian-ports`, not `debian`, and many mirror sites do not
+provide it. Following is aliyun mirror:
+
+```txt
+/etc/apt/sources.list
+---
+deb https://mirrors.aliyun.com/debian-ports/ unstable main
+deb https://mirrors.aliyun.com/debian-ports/ unreleased main
+deb-src https://mirrors.aliyun.com/debian/ unstable main
+```
+
+The hurd-amd64 deb-src seems to not work.
+
+## Use QEMU Virtual Machine
+
+For i386, use
+
+```sh
+qemu-system-x86_64 -enable-kvm -m 4G \
+ -net nic -net user,hostfwd=tcp::3222-:22 \
+ -vga vmware -drive cache=writeback,file=[...]
+```
+
+For x86_64, use
+
+```sh
+qemu-system-x86_64 -enable-kvm -m 8G -machine q35 \
+ -net nic -net user,hostfwd=tcp::3223-:22 \
+ -vga vmware -drive cache=writeback,file=[...]
+```
+
+GRUB in the image seems to use hard-coded path of `/dev/*` block file as the
+root partition in the kernel command line rather than GUID, so if the hard disk
+bus is changed in QEMU and the path is changed accordingly, the system can't
+boot on.
+
+QEMU cli arguments `-machine q35` enables AHCI and SATA, and is **required for
+official x86_64 image to boot**. As for i386, I haven't checked now.
+
+## Inside Hurd
+
+Configure/Setup network
+
+```sh
+settrans -fgap /servers/socket/2 /hurd/pfinet \
+ -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
+fsysopts /servers/socket/2 /hurd/pfinet \
+ -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
+fsysopts /server/socket/2 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
+```
+
+Setup apt
+
+```sh
+apt-get --allow-unauthenticated --allow-insecure-repositories update
+apt-get --allow-unauthenticated upgrade
+```
diff --git a/www/content/notes/hurd/todos.md b/www/content/notes/hurd/todos.md
index cd93f01..8fe068b 100644
--- a/www/content/notes/hurd/todos.md
+++ b/www/content/notes/hurd/todos.md
@@ -58,5 +58,3 @@ gerrit: <https://chromium-review.googlesource.com/c/codecs/libgav1/+/6239812>
{{< /link-group >}}
{{< /todo >}}
-
-
diff --git a/www/content/posts/c-func-ext.md b/www/content/posts/c-func-ext.md
index 7106fad..1f5f822 100644
--- a/www/content/posts/c-func-ext.md
+++ b/www/content/posts/c-func-ext.md
@@ -8,6 +8,8 @@ tags:
- posix
---
+(I've given up on this, at least for linux pam.)
+
Recently, I’ve been working on porting some libraries to GNU/Hurd. Many (old)
libraries use [`*_MAX` constants on POSIX system
interfaces](https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/nframe.html)
diff --git a/www/layouts/index.html b/www/layouts/index.html
index abf8a74..af3e11d 100644
--- a/www/layouts/index.html
+++ b/www/layouts/index.html
@@ -26,7 +26,7 @@
<hr />
<section>
<p>Welcome to my home page! Nice to meet you here! 🥰</p>
- <p>Feel free to contact me via my email address *<crupest@crupest.life>*,
+ <p>Feel free to contact me via my email address <a href="mailto:crupest@crupest.life">crupest@crupest.life</a>,
or just create an issue in any of my <a rel="noopener noreferrer" href="https://github.com/crupest">GitHub</a>
repos. I love talking with people a lot.</p>
<div id="links" class="mono-link">