about summary refs log tree commit diff stats
path: root/core
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-08-19 20:41:29 +0100
committerSilvino Silva <silvino@bk.ru>2016-08-19 21:04:59 +0100
commit7a6d042fce619aaf3ff79de5e1ac71305330df0a (patch)
treee5a91be3a11ded24e98364027fa3deb71b7a00c3 /core
downloaddoc-7a6d042fce619aaf3ff79de5e1ac71305330df0a.tar.gz
initial install documentation
Diffstat (limited to 'core')
-rw-r--r--core/index.html161
-rw-r--r--core/install.html310
2 files changed, 471 insertions, 0 deletions
diff --git a/core/index.html b/core/index.html
new file mode 100644
index 0000000..7745627
--- /dev/null
+++ b/core/index.html
@@ -0,0 +1,161 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>c9 Core OS</title>
+    </head>
+    <body>
+        <h1>c9 Core OS</h1>
+
+        <p>c9 Core OS covers installation, basic commands and
+        functionality of Crux 3.2 Gnu\Linux operating system.
+        This documentation try's to follow Crux HandBook, 
+        installation method diverges for example by only 
+        documenting gpt and grub2.<p>
+
+        <p>Read Crux HandBook, you can ask for help on freenode
+        #crux.</p>
+
+        <a href="../index.html">Documentation Index</a>
+
+        <h2>Install Crux 3.2 Gnu/Linux</h2>
+
+        <ul>
+            <li>
+                <a href="install.html">1.1. Install Crux 3.2</a>
+                <ul>
+                    <li><a href="install.html#step1">1.1.1. Download</a></li>
+                    <li><a href="install.html#step2">1.1.2. Prepare Target</a></li>
+                    <li><a href="install.html#step3">1.1.3. Prepare Install</a></li>
+                    <li><a href="install.html#step4">1.1.4. Install</a></li>
+                    <li><a href="install.html#step5">1.1.5. DNS Resolver</a></li>
+                    <li><a href="install.html#step6">1.1.6. Install Handbook</a></li>
+                </ul>
+            </li>
+            <li>
+                <a href ="configure.html">1.2. Configure</a>
+                <ul>
+                    <li><a href="configure.html#hostname">1.2.1. Set hostname and hosts</a></li>
+                    <li><a href="configure.html#time">1.2.2. Set timezone</a></li>
+                    <li><a href="configure.html#locale">1.2.3. Set lacale</a></li>
+                    <li><a href="configure.html#user">1.2.4. Users</a></li>
+                    <li><a href="configure.html#fstab">1.2.5. File system table</a></li>
+                    <li><a href="configure.html#rcconf">1.2.6. Initialization Scripts</a></li>
+                </ul>
+            </li>
+            <li>
+                <a href="ports.html">1.3. Ports</a>
+                <ul>
+                    <li><a href="ports.html#fakeroot">1.3.1. Build as user</a></li>
+                    <li><a href="ports.html#filesystem">1.3.2. Ports Layout</a></li>
+                    <li><a href="ports.html#pkgmk">1.3.3. Configure pkgmk</a></li>
+                    <li><a href="ports.html#prtget">1.3.4. Configure prt-get</a></li>
+                    <li><a href="ports.html#pkginst">1.3.5. Install extra ports</a></li>
+                </ul>
+            </li>
+            <li>
+                <a href="reboot.html">1.4. Prepare for reboot</a>
+                <ul>
+                    <li><a href="reboot.html#linux">1.4.1. Linux Kernel</a></li>
+                    <li><a href="reboot.html#dracut">1.4.2. Dracut - Initramfs</a></li>
+                    <li><a href="reboot.html#grub">1.4.3. Configuring Grub</a></li>
+                    <li><a href="reboot.html#checkup">1.4.4. Checkup</a></li>
+                </ul>
+            </li>
+        </ul>
+
+        <h2>System Tools</h2>
+
+        <ul>
+            <li><a href="tar.html">1. Tar</a>
+                <ul>
+                    <li><a href="tar.html#tarbkup">1.1. Create Backup</a></li>
+                    <li><a href="tar.html#tarview">1.2. View content of tar</a></li>
+                    <li><a href="tar.html#tarextract">1.3. Extract content from tar</a></li>
+                    <li><a href="tar.html#taradd">1.4. Add content to tar</a></li>
+                    <li><a href="tar.html#tarrm">1.5. Remove content from tar</a></li>
+                </ul>
+            </li>
+
+            <li>
+                <a href="bash.html">2. Bash</a>
+                <ul>
+                    <li><a href="bash.html#profile">2.1. Profile</a></li>
+                    <li><a href="bash.html#bashrc">2.2. Bash RC</a></li>
+                    <li><a href="bash.html#bash_profile">2.2. Bash profile</a></li>
+                </ul>
+            </li>
+
+            <li>
+                <a href="vim.html">3. Vim</a>
+                <ul>
+                    <li><a href="vim.html#vimrc">3.1. Vim RC</a></li>
+                    <li><a href="vim.html#color">3.2. Color schemes</a></li>
+                    <li><a href="vim.html#spacetab">3.3. Spaces and tabs</a></li>
+                    <li><a href="vim.html#block">3.4. Editing Files</a></li>
+                    <li><a href="vim.html#spellcheck">3.5. Spell check</a></li>
+                    <li><a href="vim.html#plugin">3.6. Plugins</a></li>
+                </ul>
+            </li>
+
+        </ul>
+
+        <h2>System Configuration</h2>
+
+        <ul>
+            <li><a href="network.html">2. Network</a>
+                <ul>
+                    <li><a href="network.html#dnscrypt">2.1. Dnscrypt</a></li>
+                    <li><a href="network.html#dnsmasq">2.2. Dnsmasq</a></li>
+                    <li><a href="network.html#shorewall">2.3. Shorewall</a></li>
+                    <li><a href="network.html#sysctl">2.4. Sysctl</a></li>
+                </ul>
+            </li>
+
+            <li><a href="network.html">2. Network</a>
+                <ul>
+                    <li><a href="network.html#dnscrypt">2.1. Dnscrypt</a></li>
+                    <li><a href="network.html#dnsmasq">2.2. Dnsmasq</a></li>
+                    <li><a href="network.html#shorewall">2.3. Shorewall</a></li>
+                    <li><a href="network.html#sysctl">2.4. Sysctl</a></li>
+                </ul>
+            </li>
+        </ul>
+
+        <h2>Ports and Package System</h2>
+        <ul>
+            <li><a href="prtget.html">3. Prt-get</a>
+                <ul>
+                    <li><a href="prtget.html#sysup">3.1. Update system</a></li>
+                    <li><a href="prtget.html#depinst">3.2. Install ports and dependencies</a></li>
+                    <li><a href="prtget.html#sysdoc">3.3. Activate sysdoc ports</a></li>
+                    <li><a href="prtget.html#info">3.3. Show port information</a></li>
+                    <li><a href="prtget.html#depends">3.4. Show port dependencies</a></li>
+                    <li><a href="prtget.html#printf">3.5. Print information</a></li>
+                </ul>
+            </li>
+        </ul>
+
+        <h2>Linux Kernel</h2>
+
+        <ul>
+                    <li>
+                        <a href="linux.html">3.6. Linux Kernel</a>
+                        <ul>
+                            <li><a href="linux.html#linuxlibre">3.6.1. Port Linux libre</a></li>
+                            <li><a href="linux.html#kinstall">3.6.2. Manual install</a></li>
+                            <li><a href="linux.html#kuninstall">3.6.3. Manual remove</a></li>
+                        </ul>
+                    </li>
+                </ul>
+            </li>
+
+        <p>
+        This is part of the SysDoc Manual.
+        Copyright (C) 2016
+        Silvino Silva.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+
+    </body>
+</html>
diff --git a/core/install.html b/core/install.html
new file mode 100644
index 0000000..93f2625
--- /dev/null
+++ b/core/install.html
@@ -0,0 +1,310 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>1.1. Install Crux 3.2</title>
+    </head>
+    <body>
+
+        <a href="index.html">Core OS Index</a>
+
+        <h1>1.1. Install Crux 3.2</h1>
+
+        <p>Installation of minimal Crux 3.2 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-2">Hand book 3.2</a>,
+        .</p>
+
+        <h2 id="step1">1.1.1. Download Iso</h2>
+
+        <a href="http://crux.nu/Main/Download">Download Page</a>
+
+        <pre>
+        $ curl -k -O https://serverop.de/crux/crux-3.2/iso/crux-3.2.iso
+        $ curl -k -O https://serverop.de/crux/crux-3.2/iso/crux-3.2.md5
+        $ md5sum crux-3.2.iso
+        2e4144590f6b340de2580255ad21620e  crux-3.2.iso
+        </pre>
+
+        <h2 id="step2">1.1.2. Prepare Target</h2>
+
+        <p>Prepare disk or target location where new system will
+        be installed. Follow steps describe how to create efi and
+        separate partitions such as; boot, root, swap, var, tmp,
+        user, home and srv.</p>
+
+        <h3>/boot/efi</h3>
+
+        <p>EFI System Partition, ESP type EF00. Partition
+        with between 500M and 100M is recommended for standard
+        installations.</p>
+
+        <pre>(parted) mkpart ESP fat32 2M 514M</pre>
+
+        <pre>
+        (parted) align-check optimal 1
+        </pre>
+
+        <h3>/boot</h3>
+
+        <p>Boot partition. Partition with 2G provides
+        room for bootable ISO.</p>
+
+        <pre>(parted) mkpart primary ext4 516M 2524M</pre>
+
+        <pre>
+        (parted) align-check optimal 2
+        </pre>
+
+        <h3>/</h3>
+
+        <p>Root partition with 2G is used in this example since i
+        usr and var are mounted on other partitions</p>
+
+        <pre>(parted) mkpart primary ext4 2548M 4564M</pre>
+
+        <pre>
+        (parted) align-check optimal 3
+        </pre>
+
+        <h3>Swap (ram)</h3>
+
+        <p>Swap partition with same memory as ram, example with
+        4G. Other swap partitions can be added later for port
+        build on ram.</p>
+
+        <pre>(parted) mkpart primary linux-swap 4568M 8576M</pre>
+
+        <h3>/var</h3>
+
+        <p>Var partition with 2G;</dd>
+
+        <pre>(parted) mkpart primary ext4 8584M 10592M</pre>
+
+        <pre>
+        (parted) align-check optimal 5
+        </pre>
+
+        <h3>/tmp</h3>
+
+        <p>Temp partition with 1G;</dd>
+
+        <pre>(parted) mkpart primary ext4 10640M 11648M</pre>
+
+        <pre>
+        (parted) align-check optimal 6
+        </pre>
+
+        <h3>/usr</h3>
+
+        <p>User partition with 8G;</dd>
+
+        <pre>(parted) mkpart primary ext4 11656M 19664M</pre>
+
+        <pre>
+        (parted) align-check optimal 7
+        </pre>
+
+>>>        <h3>/home</h3>
+
+        <p>Home partition with 220G;</dd>
+
+        <pre>(parted) mkpart primary ext4 19672M 220000M</pre>
+
+        <pre>
+        (parted) align-check optimal 8
+        </pre>
+
+        <h3>/srv</h3>
+
+        <p>Server data partition 300G, will contain services data,
+        backups and ports;</dd>
+
+        <pre>(parted) mkpart primary ext4 220008M 220016M</pre>
+
+        <pre>
+        (parted) align-check optimal 9
+        </pre>
+
+        <p>Check partition layout;</p>
+
+        <pre>
+        (parted) print
+        Model: ATA TOSHIBA MQ01ABD1 (scsi)
+        Disk /dev/sda: 1000GB
+        Sector size (logical/physical): 512B/512B
+        Partition Table: gpt
+        Disk Flags:
+
+        Number  Start   End     Size    File system     Name     Flags
+         1      2097kB  514MB   512MB   fat32           ESP
+         2      516MB   2524MB  2008MB  ext4            primary
+         3      2548MB  4564MB  2016MB  ext4            primary
+         4      4568MB  8576MB  4009MB  linux-swap(v1)  primary
+         5      8584MB  10.6GB  2008MB  ext4            primary
+         6      10.6GB  11.6GB  1008MB  ext4            primary
+         7      11.7GB  19.7GB  8008MB  ext4            primary
+>>>         8      238GB   260GB   21.7GB  ext4                     boot, esp
+        10      260GB   277GB   17.8GB  ext4
+        11      277GB   371GB   93.7GB  ext4
+
+        (parted) quit
+        </pre>
+
+        <p>Create filesystems;</p>
+
+        <pre>
+       $ export BLK_EFI=/dev/sda1
+       $ export BLK_BOOT=/dev/sda2
+       $ export BLK_ROOT=/dev/sda3
+       $ export BLK_SWAP=/dev/sda4
+       $ export BLK_VAR=/dev/sda5
+       $ export BLK_TMP=/dev/sda6
+       $ export BLK_USR=/dev/sda7
+>>>    $  # export BLK_HOME=/dev/sda8
+       $ export BLK_SRV=/dev/sda10
+        </pre>
+
+        <pre>
+        $ sudo mkfs.fat -F 32  $BLK_EFI
+        </pre>
+
+        <pre>
+        $ sudo mkswap $BLK_SWAP
+        </pre>
+
+        <pre>
+       $ sudo mkfs.ext4 $BLK_BOOT
+       $ sudo mkfs.ext4 $BLK_ROOT
+       $ sudo mkfs.ext4 $BKL_VAR
+       $ sudo mkfs.ext4 $BKL_TMP
+       $ sudo mkfs.ext4 $BKL_USR
+>>>    $ sudo mkfs.ext4 $BKL_HOME
+       $ sudo mkfs.ext4 $BKL_SRV
+        </pre>
+
+        <h2 id="step3">1.1.3. Prepare Target</h2>
+
+        <pre>
+        $ export CHROOT=/mnt
+        </pre>
+
+        <pre>
+        $ sudo mount $BLK_ROOT $CHROOT
+        </pre>
+
+        <p>Create directories and mount target partitions;</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
+
+        $ 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_USR $CHROOT/usr
+        $ 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 on target partition;</p>
+
+        <pre>
+        # modprobe isofs
+        # modprobe loop
+        # mount -o loop crux-3.2.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 $CHROOT/iso/crux/core/pkgutils#5.36-2.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>
+
+        <pre>
+        /mnt/iso/crux/core/lilo#24.1-3.pkg.tar.xz
+        </pre>
+
+        <p>Create package database, it will contain a list of i
+        nstalled 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>
+
+        <pre>
+        $ sudo rm $CHROOT/pkgadd
+        $ sudo rm $CHROOT/core.lst
+        </pre>
+
+        <h2 id="step5">1.1.5. DNS Resolver</h2>
+
+        <pre>
+        $ sudo cp /etc/resolv.conf $CHROOT/etc
+        </pre>
+
+        <h2 id="step6">1.1.6. Install Handbook</h2>
+
+        <pre>
+        $ sudo cp $CHROOT/media/crux/handbook.txt $CHROOT/home/root/
+        </pre>
+
+        <a href="index.html">Core OS Index</a>
+        <p>This is part of the c9 Manual.
+        Copyright (C) 2016
+        Silvino Silva.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+
+    </body>
+</html>