diff options
| author | Woodpecker CI <emmett1.2miligrams@protonmail.com> | 2025-07-20 15:56:03 +0000 |
|---|---|---|
| committer | Woodpecker CI <emmett1.2miligrams@protonmail.com> | 2025-07-20 15:56:03 +0000 |
| commit | ea4c5341d0842ad9d6b2531da3c5af06c14a6309 (patch) | |
| tree | 9d155d4249d920725621ff71d999be762ac33dbf /docs | |
| parent | bf9ffaab252c045f66086d6af0d1f8f5f8b45043 (diff) | |
| download | alicelinux-ea4c5341d0842ad9d6b2531da3c5af06c14a6309.tar.gz alicelinux-ea4c5341d0842ad9d6b2531da3c5af06c14a6309.zip | |
Woodpecker CI f22084fbeacca02b73eea39f96b3e643dfff980c [SKIP CI]
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/install.html | 172 |
1 files changed, 70 insertions, 102 deletions
diff --git a/docs/install.html b/docs/install.html index 4c37115a..6abaaa33 100644 --- a/docs/install.html +++ b/docs/install.html @@ -66,160 +66,139 @@ <h1>Install Alice</h1> <p>Here is a guide to installing Alice Linux on your computer using the chroot method. You can do this from your existing Linux distribution or from a live environment, such as Alice Live or another Linux distribution. Make sure your chosen environment has the necessary partitioning tools, filesystem tools, and extraction tools.</p> <h2>Get Alice rootfs tarball</h2> -<p>Download the Alice rootfs tarball from the <a href="https://codeberg.org/emmett1/alicelinux/releases">release</a> page, along with its <code>sha256sum</code> file. -</p> +<p>Download the Alice rootfs tarball from the <a href="https://codeberg.org/emmett1/alicelinux/releases">release</a> page, along with its <code>sha256sum</code> file.</p> <pre><code>$ curl -O <url> $ curl -O <url>.sha256sum </code></pre> <p>Verify the checksum of the Alice rootfs tarball:</p> <pre><code>$ sha256sum -c alicelinux-rootfs-20240525.tar.xz.sha256sum </code></pre> -<p>Make sure it prints: -</p> +<p>Make sure it prints:</p> <pre><code>alicelinux-rootfs-20240525.tar.xz: OK </code></pre> <h2>Prepare the partition and filesystem</h2> -<p>Prepare the partition and filesystem of your choice. In this guide, I will use ext4 as an example. -</p> +<p>Prepare the partition and filesystem of your choice. In this guide, I will use <code>ext4</code> as an example.</p> <pre><code># cfdisk /dev/sdX # mkfs.ext4 /dev/sdXY </code></pre> -<p>Mount your created partition somewhere. In this guide, I will use /mnt/alice as the mount point. -</p> +<p>Mount your created partition somewhere. In this guide, I will use <code>/mnt/alice</code> as the mount point.</p> <pre><code># mkdir /mnt/alice # mount /dev/sdXY /mnt/alice </code></pre> <h2>Extract the Alice rootfs tarball</h2> -<p>Extract the Alice rootfs into the mounted partition. -</p> +<p>Extract the Alice rootfs into the mounted partition.</p> <pre><code>$ tar xvf alicelinux-rootfs-*.tar.xz -C /mnt/alice </code></pre> <h2>Enter chroot</h2> -<p>First, chroot into Alice. (Replace /mnt/alice with your chosen mount point.) -</p> +<p>First, chroot into Alice. (Replace <code>/mnt/alice</code> with your chosen mount point)</p> <pre><code># /mnt/alice/usr/bin/apkg-chroot /mnt/alice </code></pre> <p>Any further commands after this will be executed inside the Alice environment. </p> -<h2>Clone Alice repos</h2> -<p>Fetch the Alice packages repositories somewhere. I'll fetch them inside the /var/lib directory to keep the system clean. -</p> -<pre><code># cd /var/lib -# git clone --depth=1 https://codeberg.org/emmett1/alicelinux -</code></pre> -<p>Once we have the repositories cloned, we need to configure <code>apkg</code>. <code>apkg</code> is Alice's package build system (or package manager). By default, Alice does not provide an <code>apkg</code> config file (yes, <code>apkg</code> can work without a config file), but we need to create one. The <code>apkg</code> config file should be located at <code>/etc/apkg.conf</code> by default. Let's create one. </p> <h2>Configure apkg.conf</h2> -<p>First, we set <code>CFLAGS</code> and <code>CXXFLAGS</code>. Alice base packages are built using <code>-O3 -march=x86-64 -pipe</code>. You can use these settings or change them to your preference. -</p> +<p>Once we have the repositories cloned, we need to configure <code>apkg</code>. <code>apkg</code> is Alice's package build system (or package manager). By default, Alice does not provide an <code>apkg</code> config file (yes, <code>apkg</code> can work without a config file), but we need to create one. The <code>apkg</code> config file should be located at <code>/etc/apkg.conf</code> by default. Let's create one. </p> +<p>First, we set <code>CFLAGS</code> and <code>CXXFLAGS</code>. Alice base packages are built using <code>-O3 -march=x86-64 -pipe</code>. You can use these settings or change them to your preference.</p> <pre><code># echo 'export CFLAGS="-O3 -march=x86-64 -pipe"' >> /etc/apkg.conf </code></pre> -<p>And use whats in <code>CFLAGS</code> for <code>CXXFLAGS</code>. -</p> +<p>And use whats in <code>CFLAGS</code> for <code>CXXFLAGS</code>.</p> <pre><code># echo 'export CXXFLAGS="$CFLAGS"' >> /etc/apkg.conf </code></pre> -<p>Next set <code>MAKEFLAGS</code>. I will use <code>6</code> for my <code>8 threads</code> machine. -</p> +<p>Next set <code>MAKEFLAGS</code>. I will use <code>6</code> for my <code>8 threads</code> machine.</p> <pre><code># echo 'export MAKEFLAGS="-j6"' >> /etc/apkg.conf </code></pre> -<p>I'm also going to set <code>NINJAJOBS</code> here. Without it, <code>ninja</code> will use all threads of your machine when compiling. -</p> +<p>I'm also going to set <code>NINJAJOBS</code> here. Without it, <code>ninja</code> will use all threads of your machine when compiling.</p> <pre><code># echo 'export NINJAJOBS="6"' >> /etc/apkg.conf </code></pre> <p>Next, we need to set the package's build scripts path (I'll call it <code>package repos</code>) so <code>apkg</code> can find them. The <code>APKG_REPO</code> variable can accept multiple values for multiple <code>package repos</code>.</p> -<p>Alice provides four (4) <code>package repos</code> (at the time of this writing): <code>core</code>, <code>extra</code>, <code>xorg</code> and <code>wayland</code>. <code>core</code> contains all base packages, and <code>extra</code> includes other packages beyond the base. <code>xorg</code> and <code>wayland</code> contain packages for gui and their dependencies.</p> -<p>First, get the absolute path of the <code>package repos</code> where we cloned them. By the way, we are still inside the <code>/var/lib</code> directory where we cloned the repo. -</p> -<blockquote><p>NOTE: USE TAB COMPLETION!</p> -</blockquote> -<pre><code># realpath alicelinux/repos/core -/var/lib/alicelinux/repos/core -# realpath alicelinux/repos/extra -/var/lib/alicelinux/repos/extra -</code></pre> -<p>After we have the path of our <code>package repos</code>, add it to the <code>APKG_REPO</code> variable in <code>/etc/apkg.conf</code>. -</p> -<pre><code># echo 'APKG_REPO="/var/lib/alicelinux/repos/core /var/lib/alicelinux/repos/extra"' >> /etc/apkg.conf +<p>Alice provides two (2) <code>package repos</code> (at the time of this writing): <code>core</code> and <code>extra</code>. <code>core</code> contains all base packages, and <code>extra</code> includes other packages beyond the base.</p> +<p>I'm gonna use directory <code>/var/lib/repos/core</code> and <code>/var/lib/repos/extra</code> for <code>core</code> and <code>extra</code> repos respectively.</p> +<pre><code># echo 'APKG_REPO="/var/lib/repos/core /var/lib/repos/extra"' >> /etc/apkg.conf </code></pre> -<blockquote><p>NOTE: All repo paths must be declared in the APKG_REPO variable, seperated by a single space.</p> +<blockquote><p>NOTE: All repo paths must be declared in the APKG_REPO variable, separated by a single space.</p> </blockquote> -<p> -After setting up our <code>package repos</code>, make sure <code>apkg</code> can find the packages. We can use <code>apkg -s <pattern></code> to search for packages. -</p> -<pre><code># apkg -s sway -swayidle -swaybg -swaylock -sway -</code></pre> -<p>If the output appears, then we are good to go.</p> <p>Next, we will set up directories for <code>packages</code>, <code>sources</code>, and <code>work</code>. By default, these directories are inside the package template, but we will change them to <code>/var/cache/pkg</code>, <code>/var/cache/src</code>, and <code>/var/cache/work</code> respectively. You can change these to any location where you want to store these files.</p> -<p>First, create the directories: -</p> +<p>First, create the directories:</p> <pre><code># mkdir -p /var/cache/pkg # mkdir -p /var/cache/src # mkdir -p /var/cache/work </code></pre> -<p>Then add these paths to <code>/etc/apkg.conf</code>. -</p> +<p>Then add these paths to <code>/etc/apkg.conf</code>.</p> <pre><code># echo 'APKG_PACKAGE_DIR=/var/cache/pkg' >> /etc/apkg.conf # echo 'APKG_SOURCE_DIR=/var/cache/src' >> /etc/apkg.conf # echo 'APKG_WORK_DIR=/var/cache/work' >> /etc/apkg.conf </code></pre> +<h2>Configure reposync.conf</h2> +<p><code>reposync</code> is a tool to sync package templates from git repositories. Add remote repos for <code>core</code> and <code>extra</code> into <code>/etc/reposync.conf</code>. The format of remote repos in <code>reposync.conf</code> is <code><gitrepo>|<branch>|<localpath></code>.</p> +<pre><code># echo 'https://codeberg.org/emmett1/alicelinux|core|/var/lib/repos/core' >> /etc/reposync.conf +# echo 'https://codeberg.org/emmett1/alicelinux|extra|/var/lib/repos/extra' >> /etc/reposync.conf +</code></pre> +<p>Now run <code>reposync</code> to sync latest package templates.</p> +<pre><code># reposync +</code></pre> +<p> +After setting up our <code>package repos</code>, make sure <code>apkg</code> can find the packages. We can use <code>apkg -s <pattern></code> to search for packages.</p> +<pre><code># apkg -s sway +swayidle +swaybg +swaylock +sway +</code></pre> +<p>Lets combine with <code>-p</code> flags to show path or package templates.</p> +<pre><code># apkg -p $(apkg -s sway) +/var/lib/repos/extra/sway +/var/lib/repos/extra/swaylock +/var/lib/repos/extra/swaybg +/var/lib/repos/extra/swayidle +</code></pre> +<p>If the output appears, then we are good to go.</p> <h2>Full system upgrade/rebuild</h2> -<p>On the first install, we should upgrade the system first. -</p> -<blockquote><p>NOTE: Use uppercase <code>U</code> for a system upgrade, and lowercase <code>u</code> to upgrade a specific package of your choice.</p> +<p>On the first install, we should upgrade the system first.</p> +<p>Before we do, install development packages first.</p> +<pre><code># apkg -I meson cmake pkgconf libtool automake perl +</code></pre> +<blockquote><p>NOTE: use upppercase 'i' for solve dependencies, lowecase 'i' without solve dependencies.</p> </blockquote> +<p>Now lets upgrade our system.</p> <pre><code># apkg -U </code></pre> +<blockquote><p>NOTE: Use uppercase <code>U</code> for a system upgrade, and lowercase <code>u</code> to upgrade a specific package of your choice.</p> +</blockquote> <p>If you changed <code>CFLAGS</code> and <code>CXXFLAGS</code> to something other than the default, it's a good time to perform a full rebuild first. In this case, you can skip upgrading the system because performing a full rebuild will already use the latest version in <code>package repos</code>.</p> +<pre><code># apkg -u $(apkg -a) +</code></pre> <blockquote><p>NOTE: Add the <code>-f</code> flag to force rebuild of existing prebuilt package. NOTE: <code>apkg -a</code> prints all installed packages on the system.</p> </blockquote> -<pre><code># apkg -u $(apkg -a) -</code></pre> -<h2>Install development packages</h2> -<p>Before installing any additional packages, we need to install development packages. -</p> -<pre><code># apkg -I meson cmake pkgconf libtool automake perl -</code></pre> <h2>Install kernel</h2> <p>You can configure your own kernel from <a href="https://kernel.org/">kernel.org</a> or use the one provided by Alice. </p> <blockquote><p>NOTE: The provided kernel will take a lot of time to compile because many options are enabled.</p> </blockquote> -<p>If you want to use Alice's kernel, just run: -</p> +<p>If you want to use Alice's kernel, just run:</p> <pre><code># apkg -I linux </code></pre> <h2>Install firmware</h2> -<p>If your hardware requires firmware, install it using: -</p> -<pre><code># apkg -I linux-firmware linux-firmware-nvidia +<p>If your hardware requires firmware, install it using:</p> +<pre><code># apkg -I linux-firmware </code></pre> <h2>Install bootloader</h2> -<p>In this guide, I'm going to use <code>grub</code> as the bootloader. Install <code>grub</code>: -</p> +<p>In this guide, I'm going to use <code>grub</code> as the bootloader. Install <code>grub</code>:</p> <pre><code># apkg -I grub </code></pre> -<p>Then generate grub config: -</p> +<p>Then generate grub config:</p> <pre><code># grub-install /dev/sdX # grub-mkconfig -o /boot/grub/grub.cfg </code></pre> <h2>Hostname</h2> -<p>Change <code>alice</code> to the hostname of your choice. -</p> +<p>Change <code>alice</code> to the hostname of your choice.</p> <pre><code># echo alice > /etc/hostname </code></pre> <h2>Fstab</h2> -<p>Change the partition and filesystem of your choice below: -</p> +<p>Change the partition and filesystem of your choice below:</p> <pre><code># echo '/dev/sda1 swap swap defaults 0 1' >> /etc/fstab # echo '/dev/sda2 / ext4 defaults 0 0' >> /etc/fstab </code></pre> <h2>Enable runit services</h2> -<p>Alice uses busybox's <code>runit</code> as its main service manager. Enable the required services: -</p> +<p>Alice uses busybox's <code>runit</code> as its main service manager. Enable the required services:</p> <pre><code># ln -s /etc/sv/tty1 /var/service # ln -s /etc/sv/tty2 /var/service # ln -s /etc/sv/tty3 /var/service @@ -230,56 +209,45 @@ NOTE: <code>apkg -a</code> prints all installed packages on the system.</p> Create a symlink from <code>/etc/sv/<service></code> to <code>/var/service</code> to enable it; remove the symlink to disable it.</p> </blockquote> <h2>Setup user and password</h2> -<p>Add your user: -</p> +<p>Add your user:</p> <pre><code># adduser <user> </code></pre> -<p>Add your user to the <code>wheel</code> group: -</p> +<p>Add your user to the <code>wheel</code> group:</p> <pre><code># adduser <user> wheel </code></pre> -<p>You might need to add your user to the <code>input</code> and <code>video</code> groups to start the Wayland compositor later, and the <code>audio</code> group to have working audio: -</p> +<p>You might need to add your user to the <code>input</code> and <code>video</code> groups to start the Wayland compositor later, and the <code>audio</code> group to have working audio:</p> <pre><code># adduser <user> input # adduser <user> video # adduser <user> audio </code></pre> <h2>Root password</h2> -<p>Set the password for the <code>root</code> user: -</p> +<p>Set the password for the <code>root</code> user:</p> <pre><code># passwd </code></pre> <h2>Networking</h2> -<p>You might want to set up networking before rebooting. Use <code>wpa_supplicant</code> and <code>dhcpcd</code>. -</p> +<p>You might want to set up networking before rebooting. Use <code>wpa_supplicant</code> and <code>dhcpcd</code>.</p> <pre><code># apkg -I wpa_supplicant dhcpcd </code></pre> -<p>Configure your SSID: -</p> +<p>Configure your SSID:</p> <pre><code># wpa_passphrase <YOUR SSID> <ITS PASSWORD> >> /etc/wpa_supplicant.conf </code></pre> -<p>Enable the service: -</p> +<p>Enable the service:</p> <pre><code># ln -s /etc/sv/wpa_supplicant /var/service # ln -s /etc/sv/dhcpcd /var/service </code></pre> <h2>Timezone</h2> -<p>Install <code>tzdata</code>: -</p> +<p>Install <code>tzdata</code>:</p> <pre><code># apkg -I tzdata </code></pre> -<p>Then create a symlink for your timezone to <code>/etc/localtime</code>: -</p> +<p>Then create a symlink for your timezone to <code>/etc/localtime</code>:</p> <pre><code># ln -s /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime </code></pre> -<p>Alternatively, you can copy it and then uninstall <code>tzdata</code> to keep your installed packages minimal: -</p> +<p>Alternatively, you can copy it and then uninstall <code>tzdata</code> to keep your installed packages minimal:</p> <pre><code># cp /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime # apkg -r tzdata </code></pre> <h2>Reboot and enjoy!</h2> -<p>Exit the chroot environment and unmount the Alice partition, then reboot: -</p> +<p>Exit the chroot environment and unmount the Alice partition, then reboot:</p> <pre><code># exit # umount /mnt/alice # reboot |