forked from zfsonlinux/zfsonlinux.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generic-deb.html
146 lines (127 loc) · 5.5 KB
/
generic-deb.html
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<html>
<head>
<title>ZFS on Linux</title>
<meta name="keyword" content="zfs, linux"/>
<meta name="description" content="Building Generic DEB Packages." />
<meta name="robots" content="all" />
</head>
<body>
<center>
<a href="index.html"><img title="Native ZFS on Linux" alt="Native ZFS on Linux" src="images/zfs-linux.png"></a>
<table width=80%>
<tr bgcolor="#aaaaaa">
<th> Building Generic DEB Packages </th>
</tr>
<tr><td>
<p>Use the <a href="debian.html">Debian</a> or
<a href="https://launchpad.net/~zfs-native/+archive/stable">Ubuntu</a>
packages for regular installations.
<p>The following instructions assume you are building from an official release
tarball or directly from the git repository. Most users should not need to
do this and should preferentially use the packages provided by their
distribution. As a general rule the distribution packages will be more
tightly integrated, widely tested, and better supported. However, if your
distribution of choice doesn't provide packages then this may be your best
option.</p>
<p>The first thing to be aware of is that the build system is capable of
generating two different types of kernel packages. Which type of package
you choose depends on your expected environment.</p>
<ul>
<li><b>DKMS</b> packages contain only the source code and scripts for
rebuilding the kernel modules. When the DKMS package is installed kernel
modules will be built for all available kernels. Additionally, when the
kernel is upgraded new kernels modules will be automatically built for that
kernel. This is particularly convenient for desktop systems which receive
frequent kernel updates. The downside is that because the DKMS packages
build the kernel modules from source a full development environment is
required which may not be appropriate for large deployments.</li>
<li><b>KMOD</b> packages are binary kernel modules which are compiled
against a specific version of the kernel. This means that if you update
the kernel you <i>must</i> recompile and install a new KMOD package.
If you don't frequently update your kernel or if your managing a large number
of systems then KMOD packages are a good choice.</li>
</ul>
<p>By default the build system will generate user packages and both DKMS
and KMOD packages. The user packages can be used with either set of kernel
packages and do not need to be rebuilt when the kernel is updated. You
can also streamline the build process by building only the DKMS or KMOD
packages as shown below.</p>
<p>Be aware that when building directly from a git repository you must first
run the <i>autogen.sh</i> script to create the <i>configure</i> script. This
will require installing the GNU autotools packages for your distribution.</p>
</td></tr>
<tr bgcolor="#aaaaaa">
<th> DKMS Packages </th>
</tr>
<tr><td>
<p>Currently the build system does not support generic DKMS deb packages.
DKMS packages may be available from your distribution.</p>
</td></tr>
<tr bgcolor="#aaaaaa">
<th> KMOD Packages </th>
</tr>
<tr><td>
<p>Building KMOD packages is similar to building DKMS packages. The major
difference is that when building a KMOD a specific Linux kernel must be
specified. At <i>configure</i> time the build system will make an educated
guess as to which kernel you want to build against. However, if <i>configure</i>
is unable to locate your kernel development headers, or you want to build
against a different kernel, you can specify the exact path with the
<i>--with-linux</i> and <i>--with-linux-obj</i> options.</p>
<table align="center" width=95%>
<tr bgcolor="#eeeeee"><td><pre>
$ sudo apt-get install build-essential gawk alien fakeroot linux-headers-$(uname -r)
$ sudo apt-get install zlib1g-dev uuid-dev libblkid-dev libselinux-dev parted lsscsi wget
$ wget http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/spl-x.y.z.tar.gz
$ wget http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-x.y.z.tar.gz
$ tar -xzf spl-x.y.z.tar.gz
$ tar -xzf zfs-x.y.z.tar.gz
$ cd spl-x.y.z
$ ./configure
$ make deb-utils deb-kmod
# Install the spl development headers, they are required to build zfs.
$ sudo dpkg -i \
kmod-spl-devel-x.y.z-r.arch.deb \
kmod-spl-devel-kernel-x.y.z-r.arch.deb
$ cd ../zfs-x.y.z
$ ./configure
$ make deb-utils deb-kmod
</pre></td/></tr>
</table>
<p>The build process will generate the following packages. All of the
<b>.deb</b> packages should be installed.</p>
<table align="center" width=95%>
<tr bgcolor="#eeeeee"><td><pre>
$ cd ..
$ ls spl-x.y.z/*.deb
spl-x.y.z/kmod-spl-kernel-x.y.z-r.arch.deb
spl-x.y.z/kmod-spl-devel-x.y.z-r.arch.deb
spl-x.y.z/kmod-spl-devel-kernel-x.y.z-r.arch.deb
spl-x.y.z/spl-x.y.z-r.arch.deb
$ ls zfs-x.y.z/*.deb
zfs-x.y.z/kmod-zfs-kernel-x.y.z-r.arch.deb
zfs-x.y.z/kmod-zfs-devel-x.y.z-r.arch.deb
zfs-x.y.z/kmod-zfs-devel-kernel-x.y.z-r.arch.deb
zfs-x.y.z/zfs-x.y.z-r.arch.deb
zfs-x.y.z/zfs-devel-x.y.z-r.arch.deb
zfs-x.y.z/zfs-dracut-x.y.z-r.arch.deb
zfs-x.y.z/zfs-test-x.y.z-r.arch.deb
$ sudo dpkg -i \
spl-x.y.z/spl-x.y.z-r.arch.deb \
spl-x.y.z/kmod-spl-kernel-x.y.z-r.arch.deb \
zfs-x.y.z/zfs-x.y.z-r.arch.deb \
zfs-x.y.z/kmod-zfs-kernel-x.y.z-r.arch.deb \
zfs-x.y.z/kmod-zfs-devel-x.y.z-r.arch.deb \
zfs-x.y.z/kmod-zfs-devel-kernel-x.y.z-r.arch.deb \
zfs-x.y.z/zfs-dracut-x.y.z-r.arch.deb \
zfs-x.y.z/zfs-test-x.y.z-r.arch.deb
</pre></td></tr>
</table>
<p>That's it! Once the packages are successfully installed you can use it just
just like you would in Solaris, Illumos, or FreeBSD.</p>
<p></p>
<tr><td>
</table>
</center>
</body>
</html>