-
Notifications
You must be signed in to change notification settings - Fork 4
/
aoe-howto-2019
123 lines (82 loc) · 2.77 KB
/
aoe-howto-2019
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
Mini howto for making winaoe under Windows 7 with a
Linux AoE target work. If you have questions or want
to contribute contact Johannes Thoma
The original winaoe driver is still availalbe at
http://winaoe.org . I've just added a small patch
to make it work with vblade (Linux) as well as
patches for making it compile with 2019's mingw
that comes with cygwin.
# Install aoetools (client/AoE initiator) for Ubuntu
sudo apt-get install aoetools
# Get vblade user space server (AoE target)
git clone https://github.com/OpenAoE/vblade.git
# build and install vblade
cd vblade
make
sudo make install
# Windows partition manager playground
sudo vblade 0 1 enp0s8 /dev/sdd9
# formerly
sudo vblade 0 1 enp0s8 /dev/sdb1
# loopback test
sudo vblade 0 1 lo /dev/sdb1
aoe-discover
aoe-stat
ls /dev/etherd/e0.1
# on Windows
Open cmd shell as administrator
cd into aoe/bin directory
loader64
reboot (it will say so)
Then after reboot following should work:
aoe scan
should report targets
aoe mount <client-MAC> <major> <minor>
to mount disk (will show up in partition manager)
client MAC is the MAC for the Windows host (use
ipconfig /all to display)
When successful there should be a Installing drivers for
new hardware pop up once.
# building winaoe with MinGW for 64-bit Windows
You need:
cygwin with mingw64-x86_64-gcc-core, mingw64-x86_64-gcc-headers installed
(plus make) (also runtime?)
for now there are patches needed to the mingw headers (sorry
for that). Patch files are included in cygwin-mingw-header-patches
to apply do a
cd /usr/x86_64-w64-mingw32/sys-root/mingw/include/ddk
patch -p 1 < patchfile
(for all patchfiles, something like:
for i in /path/to/patchdir/*.patch ; do patch -p 1 < $i ; done
will do the trick).
Unfortunately for signtool you also need the Ewdk from Microsoft.
Edit Makefile for your Ewdk installation (defaults to C:\Ewdk)
The rest is easy:
make
should generate the aoe64.sys loader64.exe aoe.exe and aoe.inf files.
To compile for a 32-bit target do
make -f Makefile.32
(do a make clean if you have built for 64 bit before)
----
Debugging with Windows:
Install WinDbg
Start it and select:
Capture Kernel
Kernel Verbose Output
You should see the DbgPrint output (try aoe scan it will print something)
----
Known bugs:
Fixed: Currently sizes are reported as 0. Was MinGW bug (attribute
packed does not work).
Sometimes: Partition manager claims that the drive is write-protected (however
this might be because of the size bug). Sometimes it works.
aoe umount BSODs.
----
Booting: Now hardcoded Diskless Client's MAC address: To boot:
sudo chmod o+rw /dev/sdf
cd Linbit/vblade/vblade/
sudo ./vblade 0 3 enp0s8 /dev/sdf
and use iPXE sanboot command to boot via http (need drbd.cgi,
see WinDRBD repo).
(this is specific to my setup)