about summary refs log tree commit diff stats
path: root/core/install.html
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/install.html
downloaddoc-7a6d042fce619aaf3ff79de5e1ac71305330df0a.tar.gz
initial install documentation
Diffstat (limited to 'core/install.html')
-rw-r--r--core/install.html310
1 files changed, 310 insertions, 0 deletions
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>
n585'>585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654