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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
[[!meta copyright="Copyright © 2007, 2008, 2009, 2011 Free Software Foundation,
Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]
[[!toc]]
# Xen dom0, hypervisor
/!\ Now that GNU Mach handles PAE you can use a PAE-enabled hypervisor.
You can either get binaries at <http://youpibouh.thefreecat.org/hurd-xen/> or build them yourself.
- Copy `gnumach-xen-pae` and `hurd-modules` to your dom0 /boot. If you still have a non-PAE hypervisor, use `gnumach-xen-nonpae` instead.
- Copy `hurd` into `/etc/xen`, edit it for fixing access to your hurd / and swap
# GNU/Hurd system
/!\ You need an already installed [[GNU/Hurd_system|hurd/running]].
If you have a free partition, you can fdisk to type 0x83, create a filesystem using:
sudo mke2fs -b 4096 -I 128 -o hurd /dev/sda4
Replace /dev/sda4 with your partition. Install and use crosshurd to setup a GNU/Hurd system on this partition.
# /etc/xen/hurd configuration
Here is a sample /etc/xen/hurd configuration
kernel = "/boot/gnumach-xen-pae"
memory = 256
disk = ['phy:sda4,hda,w']
extra = "root=device:hd0"
vif = [ '' ]
ramdisk = "/boot/hurd-modules"
Do not give more than 580MB memory (due to bootstrap limitations, it's not easy
to map more).
Suggestions about [[networking_configuration]] are available.
If you need stable MAC addresses, use a syntax like `vif = [
'mac=00:16:3e:XX:XX:XX, bridge=br0' ]`.
# Running Hurd with Xen
To run Hurd with Xen, use:
xm create -c hurd
and gnumach should get started. Proceed with native-install.
export TERM=mach
./native-install
- If `xm` complains about networking (`vif could not be connected`), it's Xen scripts' fault, see Xen documentation for how to configure the network. The simplest way is network-bridge with fixed IPs (note that you need the bridge-utils package for this). You can also just disable networking by commenting the vif line in the config.
- If `xm` complains `Error: (2, 'Invalid kernel', 'xc_dom_compat_check: guest type xen-3.0-x86_32 not supported by xen kernel, sorry\n')`, you most probably have a PAE-enabled hypervisor and a non-PAE gnumach. Either install and boot non-PAE hypervisor and kernel, or rebuilt gnumach in PAE mode.
# Building from sources
If you want to generate these images, first get the `gnumach-1-branch-Xen-branch` branch from gnumach CVS.
Then look for "Ugly" in `kern/bootstrap.c`, how to generate `hurd-modules` is explained there, and you'll have to fix `EXT2FS_SIZE` and `LD_SO_SIZE` by hand.
Then use
./configure --enable-platform=xen
make
The current `hurd-modules` was built from the debian packages `hurd 20070606-2` and `libc0.3 2.6.1-1`.
/!\ This means that when using this image, your GNU/Hurd system also needs to be a glibc version 2.6 or later-based one!
# `pv-grub`
From Xen 4.0 on you can run the GNU Hurd directly using `pv-grub`,
without the need to [prepare a special bootstrap
image](http://youpibouh.thefreecat.org/hurd-xen/build_hurd-modules) (like an
initrd).
Download http://youpibouh.thefreecat.org/hurd-xen/pv-grub.gz into /boot, and use the following for instance:
kernel = "/boot/pv-grub.gz"
memory = 256
disk = ['phy:sda4,hda,w']
extra = "(hd0,1)/boot/grub/menu.lst"
vif = [ '' ]
extra is now the path to the grub config file.
# Partitions
You will need the following notation for the gnumach root= parameter:
root=part:2:device:hd0
to access the second partition of hd0, for instance.
You will also need to use the parted storeio module for the /dev entries, for instance:
settrans -fgap /dev/hd0s1 /hurd/storeio -T typed part:1:device:hd0
# Miscellaneous
[[Internals]].
[[!GNU_Savannah_task 5468]], [[!GNU_Savannah_task 6584]].
# Host-side Writeback Caching
Optimization possible as it is with
[[QEMU|hurd/running/qemu/writeback_caching]]?
IRC, freenode, #hurd, 2011-06-08
<braunr> youpi: does xen provide disk caching options ?
<youpi> through a blktap, probably
<braunr> ok
|