-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.2nd
60 lines (50 loc) · 2.25 KB
/
README.2nd
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
Okay so you've finished the 12-step programme and you're wondering what the
heck you just did.
1. Put a translator on /tmp/hello
# settrans -a /tmp/hello /hurd/hello --contents="hello hurd
> "
You can use settrans to make a program provide the contents of a file.
You started a program (/hurd/hello) and placed it on a node on the
filesystem (/tmp/hello). You specified a --contents option to the translator.
2. Try out the new translator
# cat /tmp/hello
The usual programs trigger the program in the usual expected ways.
You triggered the running hello translator that sits on /tmp/hello to
provide it's contents.
3. See the subhurd boot script
# cat /boot/subhurd.script
Subhurds require a funny-looking script to work.
4. Start a subhurd
# boot -D /tmp -I /boot/subhurd.script -Tdevice hd2
You can start your own subhurd complete with your own filesystem.
This is running a kernel within a kernel, on top of one microkernel.
5. See the pretty pr0cesses
# ps -ef
Some processes in a subhurd don't show up correctly. For kicks you can
ask a Hurd expert about why this is the case.
6. Check to see if the hello translator is providing /tmp/hello
# cat /tmp/hello
Here you see that the hello translator applies to the parent hurd, and
not the subhurd. The hello translator simply isn't running in this subhurd.
/tmp/hello in the subhurd and /tmp/hello in the parent hurd are *not* the same
file. The subhurd takes the CD as a filesystem, and so does parent subhurd.
7. Put a translator on /tmp/hello
# settrans -a /tmp/hello /hurd/hello --contents="hello subhurd"
8. Try out the new translator
# cat /tmp/hello
9. Change the translator's settings
# fsysopts /tmp/hello --contents="hello subhurd
> "
Here you see that you can use fsysopts to send options to a running translator.
Amazing. We didn't start a new translator here, we passed a message to the
running translator about how to change it's operation.
10. Try out the revised translator
# cat /tmp/hello
11. Exit the subhurd
# halt
Here you learn how to get out of a subhurd.
Isn't it nifty how it cleans us after itself? Sure it is.
12. Check to see what /tmp/hello says
# cat /tmp/hello
You've done all of this as root, but guess what -- you can do all of this as
a regular user on a full-fledged hurd system.