diff options
author | crupest <crupest@outlook.com> | 2025-06-12 01:10:27 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2025-06-12 01:10:27 +0800 |
commit | 5bcdda2ef5fcb523483919deeaa51ddd58ada6bd (patch) | |
tree | 67bda969251dc45a3ca61adc9b2fa685cf685587 | |
parent | 6a2f803913997c9ec715df31d7622e766f1880a5 (diff) | |
download | crupest-5bcdda2ef5fcb523483919deeaa51ddd58ada6bd.tar.gz crupest-5bcdda2ef5fcb523483919deeaa51ddd58ada6bd.tar.bz2 crupest-5bcdda2ef5fcb523483919deeaa51ddd58ada6bd.zip |
feat(www): split hurd cheat-sheet.
-rw-r--r-- | www/content/notes/cheat-sheet.md | 8 | ||||
-rw-r--r-- | www/content/notes/hurd.md | 64 | ||||
-rw-r--r-- | www/content/notes/hurd/cheat-sheet.md | 65 |
3 files changed, 74 insertions, 63 deletions
diff --git a/www/content/notes/cheat-sheet.md b/www/content/notes/cheat-sheet.md index 77e337d..11e900c 100644 --- a/www/content/notes/cheat-sheet.md +++ b/www/content/notes/cheat-sheet.md @@ -1,9 +1,15 @@ --- 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 diff --git a/www/content/notes/hurd.md b/www/content/notes/hurd.md index 7eeb2d6..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,66 +38,6 @@ refs: {{< /mono >}} -## cheatsheet - -### 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 -``` - -### Use QEMU Virtual Machine - -For i386, use - -```bash-session -# 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 - -```bash-session -# 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 -``` - ## mailing lists / irc {{< 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 +``` |