about summary refs log tree commit diff stats
path: root/core/install.html
blob: 64fbe023d24c74fbdd457ec312a682f1f666fd84 (plain) (blame)
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<!DOCTYPE html>
<html dir="ltr" lang="en">
    <head>
        <meta charset='utf-8'>
        <title>1.1. Install Crux 3.5</title>
    </head>
    <body>

        <a href="index.html">Core OS Index</a>

        <h1>1.1. Install Crux 3.5</h1>

        <p>Installation of minimal Crux 3.5 Gnu\Linux system,
        with selected packages from core, opt and contrib
        ports. Process of installation documented can be
        executed from iso or from existing gnu\linux installation.
        Read
        <a href="http://crux.nu/Main/Handbook3-5">Hand book 3.5</a>,
        .</p>

        <p>If you are booting from crux iso and is not your keyboard
        layout of choice run;</p>

        <pre>
        # loadkeys dvorak
        </pre>

        <h2 id="step1">1.1.1. Download iso</h2>

        <p>Visit crux
        <a href="http://crux.nu/Main/Download">download page</a> for
        more notes before downloading iso. Script
        <a href="scripts/setup-iso.sh">setup-iso.sh</a> downloads
        iso from master repo and checks md5sum.</p>

        <pre>
        $ curl -k -O https://serverop.de/crux/crux-3.5/iso/crux-3.5.iso
        $ curl -k -O https://serverop.de/crux/crux-3.5/iso/crux-3.5.md5
        $ md5sum crux-3.5.iso
        eb0c9b75322ba240f229ec9834feddfd crux-3.5.iso
        </pre>

        <h2 id="step2">1.1.2. Prepare target</h2>

        <p>Prepare disk or target location where new system will
        be installed. Following steps describe how to create efi
        system or msdos. Systems with bios_boot(msdos) only require
        boot partition in the beginning of the disk, use ext4 file
        system. For more information about gpt partitions table read
        <a href="http://devil-detail.blogspot.com/2013/07/install-grub2-on-gpt-disk-dedicated-partition.html">devil-detail grub2 on gpt</a>. Script <a href="scripts/setup-target.sh">setup-target.sh</a> help to create partitions
        scripts.</p>

        <p>Load dm-crypt module and start parted;</p>

        <pre>
        # modprobe dm-crypt
        # parted /dev/sda
        </pre>

        <p>Set unit size to use;</p>

        <pre>
        (parted) unit mib
        </pre>

        <h3>bios_boot</h3>

        <p>If the system don't support efi, on bios_boot systems;</p>

        <pre>
        (parted) mklabel msdos
        </pre>

        <p>Boot partition. Partition with 1G provide room for kernels
        and bootable iso's that can be directly boot from grub (without root
        partition). Partition size ~1G;</p>

        <pre>
        (parted) mkpart primary ext4 2 1132
        (parted) set 1 boot on
        </pre>

        <h3>efi/esp</h3>

        <p>On systems that support efi;</p>

        <pre>
        (parted) mklabel gpt
        </pre>

        <p>Partition used by grub boot loader. Partition size 2M;</p>

        <pre>
        mkpart primary 2 4
        name 1 grub
        set 1 bios_grub on
        </pre>

        <p>EFI System Partition, ESP type EF00. Partition
        with between 500M and 100M is recommended for standard
        installations. Partition size 128M;</p>

        <pre>
        (parted) mkpart ESP fat32 4 132
        (parted) name 2 efi
        (parted) set 2 boot on
        </pre>

        <p>Boot partition. Partition with 1G provide room for kernels
        and bootable iso's that can be directly boot from grub (without root
        partition). Partition size ~1G;</p>

        <pre>
        (parted) mkpart primary ext4 132 1132
        (parted) name 3 boot
        </pre>

        <h3>Encrypted lvm</h3>

        <p>There are different ways to achieve disk encryption,
        the method described uses cryptosetup to create cryptodevice
        with <a href="../tools/lvm.html">lvm</a> inside containing
        root and other partitions such as;
        var, usr, swap and home.

        <pre>
        (parted) mkpart primary 1132 100%
        </pre>

        <p>Create encrypted block for lvm, partition layout of efi and bios boot systems is different.</p>

        <p>On bios_boot systems partition should be  2;</p>

        <pre>
        (parted) set 4 lvm on
        # cryptsetup luksFormat /dev/sda2
        # cryptsetup luksOpen /dev/sda2 cryptlvm
        </pre>

        <p>Create physical group and volume group;</p>

        <pre>
        # pvcreate /dev/mapper/cryptlvm
        # vgcreate vg_system /dev/mapper/cryptlvm
        </pre>

        <h3>/ root partition</h3>

        <p>Core collection installation on root partition uses
        approximately 2G. Partition with 8G-20G is recommended
        for a server or desktop with dedicated ports partition
        or using only compiled packages. Partition size 20G;</p>


        <pre>
        # lvcreate -L 20G -n lv_root vg_system
        </pre>

        <h3>/var partition</h3>

        <p>Var partition is recommended 1G-5G depending on how
        system is configured. Partition size 2G;</p>

        <pre>
        # lvcreate -L 2G -n lv_var vg_system
        </pre>

        <h3>Swap (ram)</h3>

        <p>Swap partition general advice is to have the same size as
        memory ram, ports system will be configured to build on ram.
        To build firefox is necessary at least 34G. Partition size 4G;</p>

        <pre>
        # lvcreate -L 4G -n lv_swap vg_system
        </pre>


        <h3>/home</h3>

        <p>On desktop fill the rest of disk space while on server
        this partition can be replaced with /srv.
        Fill the rest of disk space;</p>

        <pre>
        # lvcreate -L 120G -n lv_home vg_system
        </pre>

        <h3>Create filesystems</h3>

        <pre>
        $ sudo mkfs.fat -F 32 /dev/sda2
        $ sudo mkfs.ext4      /dev/sda3
        $ sudo mkfs.ext4      /dev/vg_system/lv_root
        $ sudo mkfs.ext4      /dev/vg_system/lv_var
        $ sudo mkswap	      /dev/vg_system/lv_swap
        $ sudo mkfs.ext4      /dev/vg_system/lv_home
        </pre>

        <h2 id="step3">1.1.3. Prepare Install</h2>

        <p>From now on script
        <a href="scripts/setup-target.sh">setup-target.sh</a>
        create file systems, <a href="scripts/install-core.sh">install-core.sh</a> install core packages and
        <a href="scripts/setup-core.sh">setup-core.sh</a>
        configure host metadata and setup ports;</p>

        <p>Export target root partition;</p>

        <pre>
        $ export BLK_ROOT=/dev/vg_system/lv_root
        </pre>

        <p>Export target root directory you want to install;</p>

        <pre>
        $ export CHROOT=/mnt
        </pre>

        <p>If you are installing to a directory and not partitions you don't need to mount;</p>

        <pre>
        $ sudo mount $BLK_ROOT $CHROOT
        </pre>

        <p>Create follow directories;</p>

        <pre>
        $ sudo mkdir -p $CHROOT/boot
        $ sudo mkdir -p $CHROOT/var
        $ sudo mkdir -p $CHROOT/usr
        $ sudo mkdir -p $CHROOT/media
        $ sudo mkdir -p $CHROOT/home

        $ sudo mkdir -p $CHROOT/dev
        $ sudo mkdir -p $CHROOT/tmp
        $ sudo mkdir -p $CHROOT/proc
        $ sudo mkdir -p $CHROOT/sys
        </pre>

        <p>If partition layout is different or target is a directory is not necessary to mount, create only the directories;</p>

        <pre>
        $ sudo mount $BLK_BOOT $CHROOT/boot
        $ sudo mkdir -p $CHROOT/boot/efi
        $ sudo mount $BLK_EFI $CHROOT/boot/efi

        $ sudo mount $BLK_VAR $CHROOT/var
        $ sudo mkdir -p $CHROOT/var/lib/pkg

        $ sudo mount $BLK_HOME $CHROOT/home
        </pre>

        <p>Activate Chroot;</p>

        <pre>
        $ sudo mount --bind /dev $CHROOT/dev
        $ sudo mount -vt devpts devpts $CHROOT/dev/pts
        $ sudo mount -vt tmpfs shm $CHROOT/dev/shm
        $ sudo mount -vt proc proc $CHROOT/proc
        $ sudo mount -vt sysfs sysfs $CHROOT/sys
        </pre>

        <p>Mount iso or copy packages to target /mnt directory;</p>

        <pre>
        # modprobe isofs
        # modprobe loop
        # mount -o loop crux-3.5.iso $CHROOT/media
        </pre>

        <h2 id="step4">1.1.4. Install Crux</h2>

        <p>Create file $CHROOT/core.lst containing
        list of binary packages present in $CHROOT/media/crux/core/;</p>

        <pre>
        $ sudo for p in $CHROOT/media/crux/core/*; do echo $p &lt;&lt; $CHROOT/core.lst; done
        </pre>

        <p>Install temporary pkgadd on $CHROOT;</p>

        <pre>
        $ sudo tar xf /media/crux/core/pkgutils#5.40-1.pkg.tar.xz usr/bin/pkgadd -O > $CHROOT/pkgadd
        $ sudo chmod +x $CHROOT/pkgadd
        </pre>

        <p>Edit $CHROOT/core.lst with your preferences, you can remove
        or add packages from opt collection. Remove lilo if you want
        grub.</p>

        <p>Create package database, it will contain a list of
        installed packages files.</p>

        <pre>
        $ sudo touch $CHROOT/var/lib/pkg/db
        </pre>

        <p>Install all packages listed in $CHROOT/core.lst;</p>

        <pre>
        $ su
        # cd $CHROOT
        while read line; do
                printf "Installing $line;\n"
                $CHROOT/pkgadd -f -r $CHROOT $line
        done &lt; core.lst
        </pre>

        <h2 id="step5">1.1.5. Install extra packages</h2>

        <p>Install additional ports like wireless-tools, grub2
        and fakeroot;</p>

        <pre>
        cp $CHROOT/media/crux/opt/* $CHROOT/usr/ports/packages
        cp $CHROOT/media/crux/xorg/* $CHROOT/usr/ports/packages
        </pre>

        <pre>
        # chroot $CHROOT /bin/bash
        </pre>

        <pre>
        pkgadd /usr/ports/packages/fakeroot#*
        pkgadd /usr/ports/packages/dbus#*
        pkgadd /usr/ports/packages/expat#*
        pkgadd /usr/ports/packages/libnl#*
        pkgadd /usr/ports/packages/libpng#*
        pkgadd /usr/ports/packages/freetype#*
        pkgadd /usr/ports/packages/libffi#*
        pkgadd /usr/ports/packages/sqlite3#*
        pkgadd /usr/ports/packages/python#*
        pkgadd /usr/ports/packages/glib#*
        pkgadd /usr/ports/packages/grub2#*
        pkgadd /usr/ports/packages/grub2-efi#*
        pkgadd /usr/ports/packages/wireless-tools#*
        pkgadd /usr/ports/packages/wpa_supplicant#*
        pkgadd /usr/ports/packages/lvm2#*
        pkgadd /usr/ports/packages/mdadm#*
        pkgadd /usr/ports/packages/efivar#*
        pkgadd /usr/ports/packages/efibootmgr#*
        pkgadd /usr/ports/packages/dosfstools#*
        pkgadd /usr/ports/packages/ported#*
        pkgadd /usr/ports/packages/libgcrypt#*
        pkgadd /usr/ports/packages/cryptsetup#*
        pkgadd /usr/ports/packages/popt#*
        pkgadd /usr/ports/packages/libgpg-error#*
        pkgadd /usr/ports/packages/libevent#*
        pkgadd /usr/ports/packages/libtirpc#*
        pkgadd /usr/ports/packages/git#*
        pkgadd /usr/ports/packages/tmux#*
        pkgadd /usr/ports/packages/prt-utils#*
        pkgadd /usr/ports/packages/elfutils#*
        </pre>

        <pre>
        # exit
        </pre>

        <pre>
        $ sudo rm $CHROOT/pkgadd
        $ sudo rm $CHROOT/core.lst
        </pre>

        <h2 id="step6">1.1.6. Install extra ports</h2>

        <p>Create port collection;</p>

        <pre>
        $ sudo mkdir $CHROOT/usr/ports/machine-ports
        </pre>

        <p>Copy ports from  doc/core/ports;</p>

        <pre>
        $ sudo cp -r ports/* $CHROOT/usr/ports/machine-ports/
        </pre>

        <h2 id="step7">1.1.7. DNS Resolver</h2>

        <pre>
        $ sudo cp /etc/resolv.conf $CHROOT/etc
        </pre>

        <h2 id="step8">1.1.8. Install Handbook</h2>

        <pre>
        $ sudo cp $CHROOT/media/crux/handbook.txt $CHROOT/home/root/
        </pre>

        <h2 id="step9">1.1.9. Basic Skeleton</h2>

        <p>Copy skeletons from  doc/core/conf;</p>

        <pre>
        $ sudo cp -R  conf/skel $CHROOT/etc/
        </pre>

        <a href="index.html">Core OS Index</a>
        <p>This is part of the Tribu System Documentation.
        Copyright (C) 2020
        Tribu Team.
        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
        for copying conditions.</p>

    </body>
</html>
l assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.