blob: f48e943192b712d502de635f7f922b8e2891ab53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
```
|