about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilvino <silvino@bk.ru>2021-03-03 03:07:44 +0000
committerpunk <punk@libernaut>2021-04-21 15:11:33 +0100
commit452477a2635d85ecf772a5242ce97d9479503bb3 (patch)
treea2e34d995cef5ac8068ec7047e93b1125c80d175
parent4de5ad72311e351792c251eaf807885a493149a4 (diff)
downloaddoc-452477a2635d85ecf772a5242ce97d9479503bb3.tar.gz
OpenBSD documentation
dev/c system dev rev
-rw-r--r--dev/c/index.html15
-rw-r--r--dev/c/src/basic/Makefile4
-rw-r--r--dev/c/src/basic/shell.c57
-rw-r--r--dev/c/src/fork/Makefile11
-rw-r--r--dev/c/src/fork/fork.c38
-rw-r--r--dev/c/src/fork/fork_exec.c40
-rw-r--r--dev/c/src/hello/Makefile3
-rw-r--r--dev/c/src/hello/hello.c6
-rw-r--r--dev/c/src/linux/Makefile13
-rw-r--r--dev/c/src/linux/init.c8
-rw-r--r--dev/c/src/linux/rungdb.sh12
-rw-r--r--dev/c/system.html101
-rw-r--r--openbsd/conf/skel/.Xdefaults4
-rw-r--r--openbsd/conf/skel/.Xresources25
-rw-r--r--openbsd/conf/skel/.kshrc3
-rw-r--r--openbsd/conf/skel/.lynx.cfg5
-rw-r--r--openbsd/conf/skel/.lynxrc333
-rw-r--r--openbsd/index.html36
-rw-r--r--openbsd/install.html124
-rw-r--r--openbsd/network.html25
-rw-r--r--openbsd/partitions.html27
-rw-r--r--openbsd/pf.html151
-rw-r--r--openbsd/sources.html79
-rw-r--r--tools/index.html1
-rw-r--r--tools/qemu.html32
-rw-r--r--tools/tar.html2
26 files changed, 1106 insertions, 49 deletions
diff --git a/dev/c/index.html b/dev/c/index.html
index 1622cc1..eaf54a8 100644
--- a/dev/c/index.html
+++ b/dev/c/index.html
@@ -14,6 +14,7 @@
 		<ul>
 		    <li><a href="hello.html#makefile">Makefile</a></li>
 		    <li><a href="hello.html#debug">Debug</a></li>
+		    <li><a href="basic.html#sources">Multiple sources</a></li>
 		</ul>
 	    </li>
 	    <li><a href="elements.html">Elements</a>
@@ -48,12 +49,7 @@
 	    <li><a href="">Control Flow</a></li>
 	    <li><a href="">Functions</a></li>
 	    <li><a href="">Input &amp; Output</a></li>
-            <li><a href="basic.html">Basic</a>
-		<ul>
-		    <li><a href="basic.html#sources">Multiple sources</a></li>
-		</ul>
-	    </li>
-	    <li><a href="lib.html">Libraries</a>
+  	    <li><a href="lib.html">Libraries</a>
 		<ul>
 		    <li><a href="lib.html#basic">Basic libraries</a></li>
 		    <li><a href="lib.html#advanced">Advanced libraries</a></li>
@@ -70,8 +66,11 @@
 
 
 	    </li>
-	    <li><a href="debugging.html">Debugging</a></li>
-	    <li><a href="system.html">System Development</a></li>
+            <li><a href="debugging.html">Debugging</a>
+	        <ul>
+	            <li><a href="system.html">System development</a></li>
+                </ul>
+            </li>
 	</ul>
 
 	<ul>
diff --git a/dev/c/src/basic/Makefile b/dev/c/src/basic/Makefile
index f165c15..88f7890 100644
--- a/dev/c/src/basic/Makefile
+++ b/dev/c/src/basic/Makefile
@@ -1,7 +1,7 @@
 CC=gcc
 CFLAGS=-Wall
 
-basic-c: main.o basic.o
+shell: shell.c
 
 clean:
-	rm -f *.o basic-c
+	rm -f *.o shell
diff --git a/dev/c/src/basic/shell.c b/dev/c/src/basic/shell.c
new file mode 100644
index 0000000..addc8a7
--- /dev/null
+++ b/dev/c/src/basic/shell.c
@@ -0,0 +1,57 @@
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+char *getinput(char *buffer, size_t buflen) {
+	printf("$$ ");
+	return fgets(buffer, buflen, stdin);
+}
+
+void sig_int(int signo) {
+	printf("\nCaught SIGINT (Signal #%d)!\n$$ ", signo);
+	(void)fflush(stdout);
+}
+
+int main(int argc, char **argv) {
+	char buf[BUFSIZ];
+	pid_t pid;
+	int status;
+
+	/* cast to void to silence compiler warnings */
+	(void)argc;
+	(void)argv;
+
+	if (signal(SIGINT, sig_int) == SIG_ERR) {
+		fprintf(stderr, "signal error: %s\n", strerror(errno));
+		exit(1);
+	}
+
+	while (getinput(buf, sizeof(buf))) {
+		buf[strlen(buf) - 1] = '\0';
+
+		if((pid=fork()) == -1) {
+			fprintf(stderr, "shell: can't fork: %s\n",
+					strerror(errno));
+			continue;
+		} else if (pid == 0) {   /* child */
+			execlp(buf, buf, (char *)0);
+			fprintf(stderr, "shell: couldn't exec %s: %s\n", buf,
+					strerror(errno));
+			exit(EX_UNAVAILABLE);
+		}
+
+		/* parent waits */
+		if ((pid=waitpid(pid, &status, 0)) < 0) {
+			fprintf(stderr, "shell: waitpid error: %s\n",
+					strerror(errno));
+		}
+	}
+
+	exit(EX_OK);
+}
diff --git a/dev/c/src/fork/Makefile b/dev/c/src/fork/Makefile
new file mode 100644
index 0000000..a737794
--- /dev/null
+++ b/dev/c/src/fork/Makefile
@@ -0,0 +1,11 @@
+
+progs=fork fork_exec
+all: $(progs)
+
+fork: fork.c
+
+fork_exec: fork_exec.c
+
+
+clean:
+	rm $(progs)
diff --git a/dev/c/src/fork/fork.c b/dev/c/src/fork/fork.c
new file mode 100644
index 0000000..25e4909
--- /dev/null
+++ b/dev/c/src/fork/fork.c
@@ -0,0 +1,38 @@
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+
+int main(){ 
+
+	pid_t cpid,ppid;
+	char errbuf[1024];
+
+	cpid = fork();
+	if (cpid == -1) {
+		(void) snprintf(errbuf, sizeof(errbuf),
+				"fork: %s", strerror(errno));
+		printf("%s\n", errbuf);
+		exit(1);
+	}
+
+	if (cpid == 0) {	
+		//child
+		ppid = getppid();
+		if(ppid == 1){
+			printf("parent died ?\n");
+			_exit(1);
+		}
+		printf("I'm child with  %i, parent %i\n", getpid(), ppid);
+		_exit(0);
+	}
+/* parent */
+	wait(NULL);
+	printf("Child id: %i\n", cpid);
+	return 0;
+}
+
diff --git a/dev/c/src/fork/fork_exec.c b/dev/c/src/fork/fork_exec.c
new file mode 100644
index 0000000..7f87c84
--- /dev/null
+++ b/dev/c/src/fork/fork_exec.c
@@ -0,0 +1,40 @@
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+
+int main(){ 
+
+	pid_t cpid,ppid;
+	char errbuf[1024];
+
+	char *prog = "vim";
+	char *const args[3]= {"vim", "fork_exec.c", NULL};
+
+	cpid = fork();
+	if (cpid == -1) {
+		(void) snprintf(errbuf, sizeof(errbuf),
+				"fork: %s", strerror(errno));
+		printf("%s\n", errbuf);
+		exit(1);
+	}
+
+	if (cpid == 0) {	
+		//child
+		ppid = getppid();
+		if(ppid == 1){
+			printf("parent died ?\n");
+			_exit(1);
+		}
+		execvp(prog, args);
+		_exit(0);
+	}
+/* parent */
+	wait(NULL);
+	printf("Child id: %i\n", cpid);
+	return 0;
+}
+
diff --git a/dev/c/src/hello/Makefile b/dev/c/src/hello/Makefile
index a6d9f07..2c0ff2d 100644
--- a/dev/c/src/hello/Makefile
+++ b/dev/c/src/hello/Makefile
@@ -1,7 +1,6 @@
-CC=gcc
 CFLAGS=-Wall
 
-hello: hello.o
+hello: hello.c
 
 clean:
 	rm -f *.o hello
diff --git a/dev/c/src/hello/hello.c b/dev/c/src/hello/hello.c
index df66493..092efa5 100644
--- a/dev/c/src/hello/hello.c
+++ b/dev/c/src/hello/hello.c
@@ -1,6 +1,10 @@
 #include <stdio.h>
+#include <unistd.h>
 
 int main() {
-    printf("hello World!");
+	char *name;
+	name = getlogin();
+
+    printf("hello %s!\n", name);
     return 0;
 }
diff --git a/dev/c/src/linux/Makefile b/dev/c/src/linux/Makefile
new file mode 100644
index 0000000..e026551
--- /dev/null
+++ b/dev/c/src/linux/Makefile
@@ -0,0 +1,13 @@
+CC=gcc
+CFLAGS=-Wall -static
+#LDFLAGS=-lc -lnss_files -lnss_dns -lresolv
+
+all: init ramdisk
+
+init: init.c
+
+ramdisk:
+	find . | cpio -o -H newc | gzip > rootfs.cpio.gz
+
+clean:
+	rm -f *.o init rootfs.cpio.gz
diff --git a/dev/c/src/linux/init.c b/dev/c/src/linux/init.c
new file mode 100644
index 0000000..10af0be
--- /dev/null
+++ b/dev/c/src/linux/init.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include <unistd.h>
+
+int main() {
+    printf("FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR\n");
+    sleep(0xFFFFFFFF);
+    return 0;
+}
diff --git a/dev/c/src/linux/rungdb.sh b/dev/c/src/linux/rungdb.sh
new file mode 100644
index 0000000..9408d7f
--- /dev/null
+++ b/dev/c/src/linux/rungdb.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+gdb \
+    -ex "add-auto-load-safe-path $(pwd)" \
+    -ex "file vmlinux" \
+    -ex 'set arch i386:x86-64:intel' \
+    -ex 'target remote localhost:1234' \
+    -ex 'hbreak start_kernel' \
+    -ex 'continue' \
+    -ex 'disconnect' \
+    -ex 'set arch i386:x86-64' \
+    -ex 'target remote localhost:1234'
diff --git a/dev/c/system.html b/dev/c/system.html
index eedf242..d1d6558 100644
--- a/dev/c/system.html
+++ b/dev/c/system.html
@@ -15,35 +15,87 @@
         will run on and GDB will connect to it to help us
         understand how things tick.</p>
 
-        <h2>Kernel Build</h2>
+        <h2>Build Kernel</h2>
 
         <pre>
-        $ tar xf linux-4.9.48.tar.xz
-        $ cd linux-4.9.48
+        $ tar xf linux-4.9.258.tar.xz
+        $ cd linux-4.9.258
         </pre>
 
         <p>Default configuration disable some security
         configurations that allow us to debug (random memory
-        layout).</p>
+        layout KALSR),  CONFIG_COMPAT_BRK don't randomize
+        position of the programs (randomize_va_space) useful when
+        debugging a program (<a href="tracing.html">tracing</a>).
+        Configuration flags to enable;</p>
+
+        <ul>
+            <li>CONFIG_64BIT</li>
+            <li>CONFIG_DEBUG_KERNEL</li>
+            <li>CONFIG_HAVE_ARCH_KGDB</li>
+            <li>CONFIG_FTRACE</li>
+            <li>CONFIG_PRINTK</li>
+            <li>CONFIG_BLK_DEV_INITRD</li>
+            <li>CONFIG_BINFMT_ELF</li>
+            <li>CONFIG_TTY</li>
+            <li>CONFIG_DEBUG_INFO</li>
+            <li>CONFIG_DEBUG_INFO_DWARF4</li>
+            <li>CONFIG_GDB_SCRIPTS</li>
+            <li>CONFIG_READABLE_ASM</li>
+            <li>CONFIG_FRAME_POINTER</li>
+            <li>CONFIG_KGDB</li>
+            <li>CONFIG_KGDB_LOW_LEVEL_TRAP</li>
+            <li>CONFIG_EARLY_PRINTK</li>
+            <li>CONFIG_COMPAT_BRK</li>
+        </ul>
+
+        <p>And to disable;</p>
+
+        <ul>
+            <li>CONFIG_CC_OPTIMIZE_FOR_SIZE</li>
+        </ul>
+
+
+        <p>This changes can be achieved by creating a config-fragment and then
+        merge it with the configuration.</p>
 
         <pre>
-        $ make x86_64_defconfig
+        $ cat &lt;&lt;EOF &gt;.config-fragment
+        CONFIG_64BIT=y
+        CONFIG_DEBUG_KERNEL=y
+        CONFIG_HAVE_ARCH_KGDB=y
+        CONFIG_COMPAT_BRK=y
+        CONFIG_FTRACE=y
+        CONFIG_PRINTK=y
+        CONFIG_BLK_DEV_INITRD=y
+        CONFIG_BINFMT_ELF=y
+        CONFIG_TTY=y
+        CONFIG_DEBUG_INFO=y
+        CONFIG_DEBUG_INFO_DWARF4=y
+        CONFIG_GDB_SCRIPTS=y
+        CONFIG_READABLE_ASM=y
+        CONFIG_FRAME_POINTER=y
+        CONFIG_KGDB=y
+        CONFIG_KGDB_LOW_LEVEL_TRAP=y
+        CONFIG_EARLY_PRINTK=y
+        CONFIG_CC_OPTIMIZE_FOR_SIZE=n
+        EOF
         </pre>
 
-        <p>Enable CONFIG_DEBUG_INFO, CONFIG_DEBUG_INFO_DWARF4
-        and CONFIG_GDB_SCRIPTS in the kernel;</p>
+        <p>Create a tiny config;</p>
 
         <pre>
-        make x86_64_defconfig
-        cat &lt;&lt;EOF &gt;.config-fragment
-        CONFIG_DEBUG_INFO=y
-        CONFIG_DEBUG_KERNEL=y
-        CONFIG_GDB_SCRIPTS=y
-        EOF
-        ./scripts/kconfig/merge_config.sh .config .config-fragment
+        $ make ARCH=x86_64 tinyconfig
         </pre>
 
-        <p>Check or change to your needs the configuration;</p>
+        <p>Merge config  with the following script;</p>
+
+        <pre>
+        $ ./scripts/kconfig/merge_config.sh .config .config-fragment
+        </pre>
+
+        <p>Check or change the configuration according to your needs;</p>
+
         <pre>
         $ make nconfig
         </pre>
@@ -138,7 +190,7 @@
             -ex "file vmlinux" \
             -ex 'set arch i386:x86-64:intel' \
             -ex 'target remote localhost:1234' \
-            -ex 'break start_kernel' \
+            -ex 'hbreak start_kernel' \
             -ex 'continue' \
             -ex 'disconnect' \
             -ex 'set arch i386:x86-64' \
@@ -169,6 +221,23 @@
 	(gdb)
 	</pre>
 
+        <p>lx-symbols allows to debug kernel modules, after starting the vm and loading
+        the module use lx-symbols to load the symbols from all the modules loaded in
+        the kernel.</p>
+
+        <pre>
+        (gdb) apropos lx
+        (gdb) lx-symbols
+        </pre>
+
+        <p>It's useful to set conditional breakpoints or a break point can be trigger
+        by unrelated tasks, example of a break point on do_exit function but only by
+        the process with pid 1;</p>
+
+        <pre>
+        (gdb) br do_exit if $lx_current()->pid == 1
+        </pre>
+
         <a href="index.html">C Index</a>
         <p>
         This is part of the LeetIO System Documentation.
diff --git a/openbsd/conf/skel/.Xdefaults b/openbsd/conf/skel/.Xdefaults
index 8594a7c..2f7b5bc 100644
--- a/openbsd/conf/skel/.Xdefaults
+++ b/openbsd/conf/skel/.Xdefaults
@@ -1,6 +1,2 @@
 ! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
 XTerm*loginShell:true
-XTerm*vt100.faceName:           terminus:pixelsize=14
-XTerm*vt100.scrollBar:          false
-*.foreground: #bbbbbb
-*.background: #222222
diff --git a/openbsd/conf/skel/.Xresources b/openbsd/conf/skel/.Xresources
new file mode 100644
index 0000000..46b58d2
--- /dev/null
+++ b/openbsd/conf/skel/.Xresources
@@ -0,0 +1,25 @@
+XTerm*faceName:DeJavuMono
+XTerm*faceSize:11
+XTerm*allowBoldFonts:false
+XTerm*scrollBar:false
+XTerm*loginShell:true
+XTerm*eightBitInput:false
+XTerm*internalBorder:2
+XTerm*foreground:white
+XTerm*background:black
+XTerm*color0:#2e3436
+XTerm*color8:#888A85
+XTerm*color1:#cc0000
+XTerm*color9:#ef2929
+XTerm*color2:#4e9a06
+XTerm*color10:#8ae234
+XTerm*color3:#edd400
+XTerm*color11:#fce94f
+XTerm*color4:#3465a4
+XTerm*color12:#729fcf
+XTerm*color5:#92659a
+XTerm*color13:#c19fbe
+XTerm*color6:#07c7ca
+XTerm*color14:#63e9e9
+XTerm*color7:#d3d7cf
+XTerm*color15:#eeeeee
diff --git a/openbsd/conf/skel/.kshrc b/openbsd/conf/skel/.kshrc
index 9c83cd7..7ce4d45 100644
--- a/openbsd/conf/skel/.kshrc
+++ b/openbsd/conf/skel/.kshrc
@@ -2,4 +2,5 @@
 alias glog='git log --stat --decorate'; export glog
 alias gloga='git log --graph --abbrev-commit --decorate --date=relative --all'; export gloga
 
-
+# When dealing with CVS in ports
+export CVSROOT="anoncvs@anoncvs.fr.openbsd.org:/cvs"
diff --git a/openbsd/conf/skel/.lynx.cfg b/openbsd/conf/skel/.lynx.cfg
new file mode 100644
index 0000000..35e51bb
--- /dev/null
+++ b/openbsd/conf/skel/.lynx.cfg
@@ -0,0 +1,5 @@
+#INCLUDE:~./lynx.cfg for COLOR VIEWER KEYMAP STARTFILE DEFAULT_INDEX_FILE
+STARTFILE:gopher://localhost
+#HELPFILE:https://lynx.invisible-island.net/lynx_help/lynx_help_main.html
+#.ex
+#DEFAULT_INDEX_FILE:http://scout.wisc.edu/
diff --git a/openbsd/conf/skel/.lynxrc b/openbsd/conf/skel/.lynxrc
new file mode 100644
index 0000000..a28eaa1
--- /dev/null
+++ b/openbsd/conf/skel/.lynxrc
@@ -0,0 +1,333 @@
+# Lynx User Defaults File
+# 
+# This file contains options saved from the Lynx Options Screen (normally
+# with the 'o' key).  To save options with that screen, you must select the
+# checkbox:
+#	Save options to disk
+#
+# You must then save the settings using the link on the line above the
+# checkbox:
+#	Accept Changes
+#
+# You may also use the command-line option "-forms_options", which displays
+# the simpler Options Menu instead.  Save options with that using the '>' key.
+# 
+# There is normally no need to edit this file manually, since the defaults
+# here can be controlled from the Options Screen, and the next time options
+# are saved from the Options Screen this file will be completely rewritten.
+# You have been warned...
+# 
+# If you are looking for the general configuration file - it is normally
+# called "lynx.cfg".  It has different content and a different format.
+# It is not this file.
+
+# accept_all_cookies allows the user to tell Lynx to automatically
+# accept all cookies if desired.  The default is "FALSE" which will
+# prompt for each cookie.  Set accept_all_cookies to "TRUE" to accept
+# all cookies.
+accept_all_cookies=off
+
+# anonftp_password allows the user to tell Lynx to use the personal
+# email address as the password for anonymous ftp.  If no value is given,
+# Lynx will use the personal email address.  Set anonftp_password
+# to a different value if you choose.
+anonftp_password=
+
+# bookmark_file specifies the name and location of the default bookmark
+# file into which the user can paste links for easy access at a later
+# date.
+bookmark_file=lynx_bookmarks.html
+
+# If case_sensitive_searching is "on" then when the user invokes a search
+# using the 's' or '/' keys, the search performed will be case sensitive
+# instead of case INsensitive.  The default is usually "off".
+case_sensitive_searching=off
+
+# The character_set definition controls the representation of 8 bit
+# characters for your terminal.  If 8 bit characters do not show up
+# correctly on your screen you may try changing to a different 8 bit
+# set or using the 7 bit character approximations.
+# Current valid characters sets are:
+#    Western (ISO-8859-1)
+#    7 bit approximations (US-ASCII)
+#    Western (ISO-8859-15)
+#    Western (cp850)
+#    Western (windows-1252)
+#    IBM PC US codepage (cp437)
+#    DEC Multinational
+#    Macintosh (8 bit)
+#    NeXT character set
+#    HP Roman8
+#    Chinese
+#    Japanese (EUC-JP)
+#    Japanese (Shift_JIS)
+#    Korean
+#    Taipei (Big5)
+#    Vietnamese (VISCII)
+#    Transparent
+#    Eastern European (ISO-8859-2)
+#    Eastern European (cp852)
+#    Eastern European (windows-1250)
+#    Latin 3 (ISO-8859-3)
+#    Latin 4 (ISO-8859-4)
+#    Baltic Rim (ISO-8859-13)
+#    Baltic Rim (cp775)
+#    Baltic Rim (windows-1257)
+#    Cyrillic (ISO-8859-5)
+#    Cyrillic (cp866)
+#    Cyrillic (windows-1251)
+#    Cyrillic (KOI8-R)
+#    Arabic (ISO-8859-6)
+#    Arabic (cp864)
+#    Arabic (windows-1256)
+#    Celtic (ISO-8859-14)
+#    Greek (ISO-8859-7)
+#    Greek (cp737)
+#    Greek2 (cp869)
+#    Greek (windows-1253)
+#    Hebrew (ISO-8859-8)
+#    Hebrew (cp862)
+#    Hebrew (windows-1255)
+#    Turkish (ISO-8859-9)
+#    Turkish (cp857)
+#    North European (ISO-8859-10)
+#    UNICODE (UTF-8)
+#    RFC 1345 w/o Intro
+#    RFC 1345 Mnemonic
+#    Ukrainian Cyrillic (cp866u)
+#    Ukrainian Cyrillic (KOI8-U)
+#    Cyrillic-Asian (PT154)
+character_set=Western (ISO-8859-1)
+
+# cookie_accept_domains and cookie_reject_domains are comma-delimited
+# lists of domains from which Lynx should automatically accept or reject
+# all cookies.  If a domain is specified in both options, rejection will
+# take precedence.  The accept_all_cookies parameter will override any
+# settings made here.
+cookie_accept_domains=
+
+# cookie_file specifies the file from which to read persistent cookies.
+# The default is ~/.lynx_cookies.
+cookie_file=
+
+# cookie_loose_invalid_domains, cookie_strict_invalid_domains, and
+# cookie_query_invalid_domains are comma-delimited lists of which domains
+# should be subjected to varying degrees of validity checking.  If a
+# domain is set to strict checking, strict conformance to RFC2109 will
+# be applied.  A domain with loose checking will be allowed to set cookies
+# with an invalid path or domain attribute.  All domains will default to
+# querying the user for an invalid path or domain.
+cookie_loose_invalid_domains=
+
+cookie_query_invalid_domains=
+
+cookie_reject_domains=
+
+cookie_strict_invalid_domains=
+
+# If emacs_keys is to "on" then the normal EMACS movement keys:
+#   ^N = down    ^P = up
+#   ^B = left    ^F = right
+# will be enabled.
+emacs_keys=off
+
+# file_editor specifies the editor to be invoked when editing local files
+# or sending mail.  If no editor is specified, then file editing is disabled
+# unless it is activated from the command line, and the built-in line editor
+# will be used for sending mail.
+file_editor=vim
+
+# The file_sorting_method specifies which value to sort on when viewing
+# file lists such as FTP directories.  The options are:
+#    BY_FILENAME -- sorts on the name of the file
+#    BY_TYPE     -- sorts on the type of the file
+#    BY_SIZE     -- sorts on the size of the file
+#    BY_DATE     -- sorts on the date of the file
+file_sorting_method=BY_FILENAME
+
+# If keypad_mode is set to "NUMBERS_AS_ARROWS", then the numbers on
+# your keypad when the numlock is on will act as arrow keys:
+#             8 = Up Arrow
+#   4 = Left Arrow    6 = Right Arrow
+#             2 = Down Arrow
+# and the corresponding keyboard numbers will act as arrow keys,
+# regardless of whether numlock is on.
+# If keypad_mode is set to "LINKS_ARE_NUMBERED", then numbers will
+# appear next to each link and numbers are used to select links.
+# If keypad_mode is set to "LINKS_AND_FORM_FIELDS_ARE_NUMBERED", then
+# numbers will appear next to each link and visible form input field.
+# Numbers are used to select links, or to move the "current link" to a
+# form input field or button.  In addition, options in popup menus are
+# indexed so that the user may type an option number to select an option in
+# a popup menu, even if the option isn't visible on the screen.  Reference
+# lists and output from the list command also enumerate form inputs.
+# NOTE: Some fixed format documents may look disfigured when
+# "LINKS_ARE_NUMBERED" or "LINKS_AND_FORM_FIELDS_ARE_NUMBERED" are
+# enabled.
+keypad_mode=LINKS_ARE_NOT_NUMBERED
+
+# lineedit_mode specifies the key binding used for inputting strings in
+# prompts and forms.  If lineedit_mode is set to "Default Binding" then
+# the following control characters are used for moving and deleting:
+# 
+#              Prev  Next       Enter = Accept input
+#    Move char: <-    ->        ^G    = Cancel input
+#    Move word: ^P    ^N        ^U    = Erase line
+#  Delete char: ^H    ^R        ^A    = Beginning of line
+#  Delete word: ^B    ^F        ^E    = End of line
+# 
+# Current lineedit modes are:
+#    Default Binding
+#    Alternate Bindings
+#    Bash-like Bindings
+lineedit_mode=Default Binding
+
+# The following allow you to define sub-bookmark files and descriptions.
+# The format is multi_bookmark<capital_letter>=<filename>,<description>
+# Up to 26 bookmark files (for the English capital letters) are allowed.
+# We start with "multi_bookmarkB" since 'A' is the default (see above).
+multi_bookmarkB=
+multi_bookmarkC=
+multi_bookmarkD=
+multi_bookmarkE=
+multi_bookmarkF=
+multi_bookmarkG=
+multi_bookmarkH=
+multi_bookmarkI=
+multi_bookmarkJ=
+multi_bookmarkK=
+multi_bookmarkL=
+multi_bookmarkM=
+multi_bookmarkN=
+multi_bookmarkO=
+multi_bookmarkP=
+multi_bookmarkQ=
+multi_bookmarkR=
+multi_bookmarkS=
+multi_bookmarkT=
+multi_bookmarkU=
+multi_bookmarkV=
+multi_bookmarkW=
+multi_bookmarkX=
+multi_bookmarkY=
+multi_bookmarkZ=
+
+# personal_mail_address specifies your personal mail address.  The
+# address will be sent during HTTP file transfers for authorization and
+# logging purposes, and for mailed comments.
+# If you do not want this information given out, set the NO_FROM_HEADER
+# to TRUE in lynx.cfg, or use the -nofrom command line switch.  You also
+# could leave this field blank, but then you won't have it included in
+# your mailed comments.
+personal_mail_address=
+
+# personal_mail_name specifies your personal name, for mail.  The
+# name is sent for mailed comments.  Lynx will prompt for this,
+# showing the configured value as a default when sending mail.
+# This is not necessarily the same as a name provided as part of the
+# personal_mail_address.
+# Lynx does not save your changes to that default value as a side-effect
+# of sending email.  To update the default value, you must use the options
+# menu, or modify this file directly.
+personal_mail_name=
+
+# preferred_charset specifies the character set in MIME notation (e.g.,
+# ISO-8859-2, ISO-8859-5) which Lynx will indicate you prefer in requests
+# to http servers using an Accept-Charset header.  The value should NOT
+# include ISO-8859-1 or US-ASCII, since those values are always assumed
+# by default.  May be a comma-separated list.
+# If a file in that character set is available, the server will send it.
+# If no Accept-Charset header is present, the default is that any
+# character set is acceptable.  If an Accept-Charset header is present,
+# and if the server cannot send a response which is acceptable
+# according to the Accept-Charset header, then the server SHOULD send
+# an error response, though the sending of an unacceptable response
+# is also allowed.
+preferred_charset=
+
+# preferred_language specifies the language in MIME notation (e.g., en,
+# fr, may be a comma-separated list in decreasing preference)
+# which Lynx will indicate you prefer in requests to http servers.
+# If a file in that language is available, the server will send it.
+# Otherwise, the server will send the file in its default language.
+preferred_language=en
+
+# select_popups specifies whether the OPTIONs in a SELECT block which
+# lacks a MULTIPLE attribute are presented as a vertical list of radio
+# buttons or via a popup menu.  Note that if the MULTIPLE attribute is
+# present in the SELECT start tag, Lynx always will create a vertical list
+# of checkboxes for the OPTIONs.  A value of "on" will set popup menus
+# as the default while a value of "off" will set use of radio boxes.
+# The default can be overridden via the -popup command line toggle.
+select_popups=on
+
+# show_color specifies how to set the color mode at startup.  A value of
+# "never" will force color mode off (treat the terminal as monochrome)
+# at startup even if the terminal appears to be color capable.  A value of
+# "always" will force color mode on even if the terminal appears to be
+# monochrome, if this is supported by the library used to build lynx.
+# A value of "default" will yield the behavior of assuming
+# a monochrome terminal unless color capability is inferred at startup
+# based on the terminal type, or the -color command line switch is used, or
+# the COLORTERM environment variable is set.  The default behavior always is
+# used in anonymous accounts or if the "option_save" restriction is set.
+# The effect of the saved value can be overridden via
+# the -color and -nocolor command line switches.
+# The mode set at startup can be changed via the "show color" option in
+# the 'o'ptions menu.  If the option settings are saved, the "on" and
+# "off" "show color" settings will be treated as "default".
+show_color=default
+
+# show_cursor specifies whether to 'hide' the cursor to the right (and
+# bottom, if possible) of the screen, or to place it to the left of the
+# current link in documents, or current option in select popup windows.
+# Positioning the cursor to the left of the current link or option is
+# helpful for speech or braille interfaces, and when the terminal is
+# one which does not distinguish the current link based on highlighting
+# or color.  A value of "on" will set positioning to the left as the
+# default while a value of "off" will set 'hiding' of the cursor.
+# The default can be overridden via the -show_cursor command line toggle.
+show_cursor=off
+
+# show_dotfiles specifies that the directory listing should include
+# "hidden" (dot) files/directories.  If set "on", this will be
+# honored only if enabled via userdefs.h and/or lynx.cfg, and not
+# restricted via a command line switch.  If display of hidden files
+# is disabled, creation of such files via Lynx also is disabled.
+show_dotfiles=off
+
+# If sub_bookmarks is not turned "off", and multiple bookmarks have
+# been defined (see below), then all bookmark operations will first
+# prompt the user to select an active sub-bookmark file.  If the default
+# Lynx bookmark_file is defined (see above), it will be used as the
+# default selection.  When this option is set to "advanced", and the
+# user mode is advanced, the 'v'iew bookmark command will invoke a
+# statusline prompt instead of the menu seen in novice and intermediate
+# user modes.  When this option is set to "standard", the menu will be
+# presented regardless of user mode.
+sub_bookmarks=OFF
+
+# user_mode specifies the users level of knowledge with Lynx.  The
+# default is "NOVICE" which displays two extra lines of help at the
+# bottom of the screen to aid the user in learning the basic Lynx
+# commands.  Set user_mode to "INTERMEDIATE" to turn off the extra info.
+# Use "ADVANCED" to see the URL of the currently selected link at the
+# bottom of the screen.
+user_mode=NOVICE
+
+# If verbose_images is "on", lynx will print the name of the image
+# source file in place of [INLINE], [LINK] or [IMAGE]
+# See also VERBOSE_IMAGES in lynx.cfg
+verbose_images=on
+
+# If vi_keys is set to "on", then the normal VI movement keys:
+#   j = down    k = up
+#   h = left    l = right
+# will be enabled.  These keys are only lower case.
+# Capital 'H', 'J' and 'K will still activate help, jump shortcuts,
+# and the keymap display, respectively.
+vi_keys=on
+
+# The visited_links setting controls how Lynx organizes the information
+# in the Visited Links Page.
+visited_links=LAST_REVERSED
diff --git a/openbsd/index.html b/openbsd/index.html
index 8b13789..f220b01 100644
--- a/openbsd/index.html
+++ b/openbsd/index.html
@@ -1 +1,37 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>OpenBSD</title>
+    </head>
+    <body>
 
+        <a href="../index.html">Documentation Index</a>
+
+        <h1>OpenBSD</h1>
+
+        <p>OpenBSD is a Unix system forked from NetBSD with the highest coding standards, as such there is no space for deprecated code, code is constantly audited, and, all the procedures that goes along with high software quality project such as documentation.</p>
+
+        <h2>1. Install notes</h2>
+        <ul>
+            <li><a href="install.html">Install</a></li>
+            <li><a href="partitions.html">Partitions</a></li>
+        </ul>
+
+        <h2>2. System administration</h2>
+        <ul>
+            <li><a href="network.html">Network</a></li>
+            <li><a href="sources.html">Sources</a></li>
+            <li><a href="pf.html">PF</a></li>
+        </ul>
+        <a href="../index.html">Documentation Index</a>
+
+        <p>
+        This is part of the LeetIO System Documentation.
+        Copyright (C) 2021
+        LeetIO Team.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+
+    </body>
+</html>
diff --git a/openbsd/install.html b/openbsd/install.html
new file mode 100644
index 0000000..eb6ec78
--- /dev/null
+++ b/openbsd/install.html
@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>1.1. Install OpenBSD notes</title>
+    </head>
+    <body>
+
+        <a href="index.html">OpenBSD Index</a>
+
+        <h1>1.1. Install OpenBSD notes</h1>
+
+
+        <p>OpenBSD bsd.rd is ram file system meant for installation or recovery procedures;</p>
+
+        <pre>
+        # mount -o loop /srv/qemu/iso/install68.iso /media/
+        # cp /media/6.8/amd64/bsd.rd /boot
+        </pre>
+
+        <p>Reboot machine and press c on grub menu, and set partition root, kernel location and boot, example;</p>
+
+        <pre>
+        grub> set root=(hd0,gpt3)
+        grub> kopenbsd /bsd.rd
+        grub> boot
+        </pre>
+
+        <p>Press enter and follow the instructions, OpenBSD installation is known to be one of the most easy of all operating systems. Read OpenBSD documentation.</p>
+
+        <p>Don't enable xenodm, enable after install and post install procedures.</p>
+
+        <p>Don't skip network configuration, it will need to fetch updates and synchronize clock.</p>
+
+        <p>Don't skip user creation, will be default administrator</p>
+
+        <p>When formatting the disk select auto and then resize of auto created partitions that shrink the last one (home). After install it will run syspatch and fw_update. </p>
+
+        <h2>Post-Install</h2>
+
+        <p>After install reboot, by default it will run syspatch and fw_updateo to check and install updates.</p>
+
+        <p>Install your favorite tools, example of a minimal setup;</p>
+
+        <pre>
+        # pkg_add vim git lynx irssi
+        # pkg_add xsel spectrwm
+        </pre>
+
+        <p>User created during install is part of wheel group by default, copy /etc/example/doas.conf to /etc/ to enable doas command;</p>
+
+        <pre>
+        # cp /etc/examples/doas.conf /etc/
+        </pre>
+
+        <p>Copy skeleton files;</p>
+
+        <pre>
+        # cp -r ~/doc/openbsd/conf/skel /etc/skel
+        </pre>
+
+        <p>Add regular user not part of wheel group</p>
+
+        <pre>
+        # useradd -m user_name
+        </pre>
+
+        <h3>X</h3>
+
+        <pre>
+        ~/.Xresources
+        XTerm*faceName:DeJavuMono
+        XTerm*faceSize:11
+        XTerm*allowBoldFonts:false
+        XTerm*scrollBar:false
+        XTerm*loginShell:true
+        XTerm*eightBitInput:false
+        XTerm*internalBorder:2
+        XTerm*foreground:white
+        XTerm*background:black
+        XTerm*color0:#2e3436
+        XTerm*color8:#888A85
+        XTerm*color1:#cc0000
+        XTerm*color9:#ef2929
+        XTerm*color2:#4e9a06
+        XTerm*color10:#8ae234
+        XTerm*color3:#edd400
+        XTerm*color11:#fce94f
+        XTerm*color4:#3465a4
+        XTerm*color12:#729fcf
+        XTerm*color5:#92659a
+        XTerm*color13:#c19fbe
+        XTerm*color6:#07c7ca
+        XTerm*color14:#63e9e9
+        XTerm*color7:#d3d7cf
+        XTerm*color15:#eeeeee
+        </pre>
+
+        <pre>
+        ~/.xsession
+        export ENV=$HOME/.kshrc
+        xrdb -merge "$HOME/.Xresources"
+        spectrwm
+        </pre>
+
+        <h3>Mouse tap</h3>
+
+        <pre>
+        libernaut# wsconsctl mouse.tp.tapping=1
+        mouse.tp.tapping -> 1
+        libernaut# cat /etc/wsconsctl.conf
+        mouse.tp.tapping=1
+        libernaut#
+        </pre>
+
+        <a href="index.html">OpenBSD Index</a>
+        <p>This is part of the LeetIO System Documentation.
+        Copyright (C) 2021
+        LeetIO Team.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+
+    </body>
+</html>
diff --git a/openbsd/network.html b/openbsd/network.html
new file mode 100644
index 0000000..446f112
--- /dev/null
+++ b/openbsd/network.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>2.0. Network</title>
+    </head>
+    <body>
+
+        <a href="index.html">OpenBSD Index</a>
+
+        <h1>2.0. Network</h1>
+
+        <pre>
+        # ifconfig iwn0 nwid ID wpakey pass
+        </pre>
+
+        <a href="index.html">OpenBSD Index</a>
+        <p>This is part of the LeetIO System Documentation.
+        Copyright (C) 2021
+        LeetIO Team.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+
+    </body>
+</html>
diff --git a/openbsd/partitions.html b/openbsd/partitions.html
new file mode 100644
index 0000000..ac78cea
--- /dev/null
+++ b/openbsd/partitions.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>1.2. Partitions</title>
+    </head>
+    <body>
+        <a href="index.html">OpenBSD Index</a>
+
+        <h1>Partitions</h1>
+
+        <pre>
+        fdisk
+        dislabel
+        newfs
+        sysctl hw.disknames
+        </pre>
+
+        <a href="index.html">OpenBSD Index</a>
+        <p>This is part of the LeetIO System Documentation.
+        Copyright (C) 2021
+        LeetIO Team.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+
+    </body>
+</html>
diff --git a/openbsd/pf.html b/openbsd/pf.html
new file mode 100644
index 0000000..88ec76a
--- /dev/null
+++ b/openbsd/pf.html
@@ -0,0 +1,151 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>1.1. Install OpenBSD notes</title>
+    </head>
+    <body>
+
+        <a href="index.html">OpenBSD Index</a>
+
+        <h1>1.1. Install OpenBSD notes</h1>
+
+        <p>Quick introduction to Packet Filter</p>
+
+        <h2>Packet filter</h2>
+
+        <p>Packet filter or pf is the  system that controls the flow of packets, read more about it on OpenBSD faq and it's man page.</p>
+
+        <p>As a service can be enable or disable with rcctl or by pfctl program. PF uses /etc/pf.conf as it's main configuration file, after boot can load more rules from other files if needed.</p>
+
+
+        <h2>Configuration</h2>
+
+        <p>To setup a simple  firewall edit /etc/pf.conf, default comes with very simple rules;</p>
+
+        <pre>
+        # $OpenBSD: pf.conf,v 1.55 2017/12/03 20:40:04 sthen Exp $
+        #
+        # See pf.conf(5) and /etc/examples/pf.conf
+
+        set skip on lo
+
+        block return	# block stateless traffic
+        pass		# establish keep-state
+
+        # By default, do not permit remote connections to X11
+        block return in on ! lo0 proto tcp to port 6000:6010
+
+        # Port build user does not need network
+        block return out log proto {tcp udp} user _pbuild
+        </pre>
+
+        <p>This configuration allows incoming connections and outgoing connections except for was is commented such as X11 or user that port system runs under when building.</p>
+
+        <h2>Control</h2>
+
+        <p>After boot PF operation can be managed using pfctl;</p>
+
+        <pre>
+        pfctl -f  /etc/pf.conf    Load the pf.conf file
+        pfctl -nf /etc/pf.conf    Parse the file, but don't load it
+        pfctl -sr                 Show the current ruleset
+        pfctl -ss                 Show the current state table
+        pfctl -si                 Show filter stats and counters
+        pfctl -sa                 Show EVERYTHING it can show
+        </pre>
+
+        <h2>Logs</h2>
+
+        <p>Documentation tells that when logging a packet a copy of it's header is sent to pflog interface with additional data such as the interface, action pf took, etc.</p>
+
+        <p>pflog interface allows user space applications to receive this data from the kernel. At boot when pf is enabled pflogd is also started and by default listens on pflog0 and writes to /var/log/pflog file.</p>
+
+        <p>To read log file;</p>
+
+        <pre>
+        # tcpdum -n -e -ttt -r /var/log/pflog
+        </pre>
+
+        <p>To read log in real time;</p>
+
+        <pre>
+        # tcpdump -n -e -ttt -i pflog0
+        </pre>
+
+
+        <h2>Simple firewall</h2>
+
+        <p>Simplified syntax for filter rules is;</p>
+
+        <pre>
+        action [direction] [log] [quick] [on interface] [af]
+        [proto protocol] [from src_addr [port src_port]]
+        [to dst_addr [port dst_port]] [flags tcp_flags] [state]
+        </pre>
+
+        <p>Start changing default configuration by setting "default policy to deny" and to log all packets. Change configuration file to contain first filter rule;</p>
+
+        <pre>
+        int_if  = "re0"
+        lan_net = "10.0.0.0/24"
+
+        set skip on lo
+
+        # scrub incoming packets
+        match in all scrub (no-df)
+
+        set block-policy drop # block silenty 
+        block drop log all    # block and log everything
+
+        # activate spoofing protection for all interfaces
+        block in quick from urpf-failed
+
+        # allow out dns
+        pass out on $int_if proto udp to 10.0.0.254 port domain
+
+        # allow out ntp
+        pass out on $int_if proto udp to any port ntp
+
+        # allow out https
+        pass out on $int_if proto tcp to any port 443
+
+        # allow out ssh
+        pass out on $int_if proto tcp to any port { 22, 2222 }
+
+        # allow in ssh
+        pass in log on $int_if proto tcp from any to 10.0.0.10 port 22
+
+        # do not permit remote connections to X11
+        block in on ! lo0 proto tcp to port 6000:6010
+
+        # port build user does not need network
+        block out log proto {tcp udp} user _pbuild    
+        </pre>
+
+        <p>To reload configuration file;</p>
+
+        <pre>
+        # pfctl -f /etc/pf.conf
+        </pre>
+
+        <p>See what ports are open;</p>
+
+        <pre>
+        # netstat -na -f inet | grep LISTEN
+        </pre>
+
+        <p>Check rules;</p>
+
+        <pre>
+        # pfctl -sr
+        </pre>
+
+        <a href="index.html">OpenBSD Index</a>
+        <p>This is part of the LeetIO System Documentation.
+        Copyright (C) 2021
+        LeetIO Team.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+    </body>
+</html>
diff --git a/openbsd/sources.html b/openbsd/sources.html
new file mode 100644
index 0000000..019044d
--- /dev/null
+++ b/openbsd/sources.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>2.1. Sources</title>
+    </head>
+    <body>
+
+        <a href="index.html">OpenBSD Index</a>
+
+        <h1>2.1. Sources</h1>
+
+        <p>Allows to fetch sources;</p>
+
+        <pre>
+        # usermod -G wsrc exampleuser
+        </pre>
+
+        <p>Allows to build from ports;</p>
+
+        <pre>
+        # usermod -G wobj exampleuser
+        </pre>
+
+        <p>Create directory xenocara and ports</p>
+
+        <pre>
+        cd /usr
+        mkdir -p   xenocara ports
+        chgrp wsrc xenocara ports
+        chmod 775  xenocara ports
+        </pre>
+
+        <p>Group wobj should have rwx</p>
+
+        <pre>
+        /usr/obj
+        </pre>
+
+        <h2>Get sources</h2>
+
+        <pre>
+        ftp https://cdn.openbsd.org/pub/OpenBSD/$(uname -r)/{ports.tar.gz,SHA256.sig}
+
+signify -Cp /etc/signify/openbsd-$(uname -r | cut -c 1,3)-base.pub -x SHA256.sig ports.tar.gz
+        </pre>
+
+        <pre>
+        $ cd /usr/src
+        $ tar xzf ~/src.tar.gz
+        $ tar xzf ~/sys.tar.gz
+        $ cd /usr
+        $ tar xzf ~/ports.tar.gz
+        $ cd /usr/xenocara
+        $ tar xzf ~/xenocara.tar.gz
+        </pre>
+
+
+        <pre>
+        echo 'export CVSROOT="anoncvs@anoncvs.fr.openbsd.org:/cvs"' >> .kshrc
+        $ cd /usr/ports
+        $ cvs -d anoncvs@anoncvs.fr.openbsd.org:/cvs -q up -Pd -rOPENBSD_6_8
+        </pre>
+
+        <p>Repeat above to the other sources, to update the ports tree later:</p>
+
+        <pre>
+        $ cd /usr/ports
+        $ cvs -q up -Pd -rOPENBSD_6_8
+        </pre>
+
+        <a href="index.html">OpenBSD Index</a>
+        <p>This is part of the LeetIO System Documentation.
+        Copyright (C) 2021
+        LeetIO Team.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+    </body>
+</html>
diff --git a/tools/index.html b/tools/index.html
index 991a1b5..dd73571 100644
--- a/tools/index.html
+++ b/tools/index.html
@@ -97,6 +97,7 @@
 		    <li><a href="nginx.html#logs">6. Logs</a></li>
 		</ul>
 	    </li>
+	    <li><a href="httpd.html">Nginx</a>
 	    <li><a href="gitolite.html">Gitolite</a>
 		<ul>
 		    <li><a href="gitolite.html#install">1. Install Gitolite</a></li>
diff --git a/tools/qemu.html b/tools/qemu.html
index 04c367d..44f48ae 100644
--- a/tools/qemu.html
+++ b/tools/qemu.html
@@ -43,7 +43,7 @@
         this describes how to create a qcow2 type;</p>
 
         <pre>
-        $ qemu-img create -f qcow2 crux-img.qcow2 15G
+        $ qemu-img create -f qcow2 crux-img.qcow2 20G
         </pre>
 
         <h3 id="mount">2.1. Mount images</h3>
@@ -68,19 +68,15 @@
 	     unit mib \
 	     mkpart primary 2 4 \
 	     name 1 grub \
-	     mkpart ESP fat32 4 128 \
+	     mkpart ESP fat32 4 132 \
 	     name 2 efi \
-	     mkpart primary ext4 128 1128 \
+	     mkpart primary ext4 132 1132 \
 	     name 3 boot \
-	     mkpart primary ext4 1128 12128 \
-	     name 4 root \
-	     mkpart primary ext4 12128 14128 \
-	     name 5 var \
-	     mkpart primary ext4 14128 100% \
-	     name 6 lvm \
+	     mkpart primary 1132 100% \
+	     name 4 lvm \
 	     set 1 bios_grub on \
 	     set 2 boot on \
-	     set 6 lvm on
+             set 4 lvm on
         </pre>
 
         <pre>
@@ -90,11 +86,19 @@
         <p>Use /dev/mapper/$(name_of_device) to assign correct blocks;</p>
 
         <pre>
+	pvcreate           /dev/mapper/${DEV_NAME}p4
+        vgcreate vg_system /dev/mapper/${DEV_NAME}p4
+        lvcreate -L 15G -n lv_root vg_system
+        lvcreate -L 2G -n lv_var vg_system
+        lvcreate -l 100%FREE -n lv_home vg_system
+        </pre>
+
+        <pre>
 	mkfs.fat -F 32  /dev/mapper/${DEV_NAME}p2
 	mkfs.ext4       /dev/mapper/${DEV_NAME}p3
-	mkfs.ext4       /dev/mapper/${DEV_NAME}p4
-	mkfs.ext4       /dev/mapper/${DEV_NAME}p5
-	pvcreate        /dev/mapper/${DEV_NAME}p6
+	mkfs.ext4       /dev/vg_system/lv_root
+	mkfs.ext4       /dev/vg_system/lv_var
+	mkfs.ext4       /dev/vg_system/lv_home
         </pre>
 
 	<p>Read <a href="lvm.html">lvm</a> documentation on how to setup
@@ -103,7 +107,7 @@
         <p>Mount partition;</p>
 
         <pre>
-	mount /dev/mapper/${DEV_NAME}p4 $CHROOT
+	mount /dev/vg_system/
 	mkdir -p $CHROOT/proc
 	mkdir -p $CHROOT/sys
 	mkdir -p $CHROOT/dev
diff --git a/tools/tar.html b/tools/tar.html
index 32fe945..02c7c73 100644
--- a/tools/tar.html
+++ b/tools/tar.html
@@ -15,7 +15,7 @@
         <p>To create a simple compressed tar;</p>
 
         <pre>
-        $ tar -czvf tar_name.tar.gz /path/to/archive
+        $ tar -czpvf tar_name.tar.gz /path/to/archive
         </pre>
 
         <p>Script