riazj.com

source code for this website
git clone https://riazj.com/git/riazj.com
Log | Files | Refs | LICENSE

installing-alpine-linux.html (2756B)


      1 <!DOCTYPE html>
      2 <html lang="en">
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Notes on Installing Alpine Linux | Riaz's Website</title>
      6 <link rel="stylesheet" href="/style.css">
      7 <link rel="icon" href="data:,">
      8 <meta name="description" content="Notes on boot partitions, recovering deleted partitions, and installation for Alpine Linux">
      9 <meta name="viewport" content="width=device-width, initial-scale=1">
     10 </head>
     11 <body>
     12 <h1>Notes on Installing Alpine Linux</h1>
     13 <hr>
     14 <article>
     15 <h2>Partition Scheme</h2>
     16 <p>Alpine's wiki says that only a root partition is required. Despite this, all example partition schemes mention a boot partition. I could not get it to start without one.</p>
     17 <p>Even when I was able to boot, that partition never seemed to get mounted, and errors were shown. Format your drive and reboot before doing the rest of the installation, as the new partitions might not be shown until rebooting.</p>
     18 <h2>Recovering Nuked Partitions</h2>
     19 <p>I deleted and recovered my home partition twice while I was trying to get the installation to work. In this case, run <code>apk add testdisk</code>. After starting testdisk, select "Proceed" and "Analyze" on the deleted partition.</p>
     20 <h2>Resources</h2>
     21 <ul>
     22 <li><a href="https://docs.alpinelinux.org/user-handbook/0.1a/Installing/manual.html">Installation with manual partitioning</a></li>
     23 <li><a href="https://wiki.alpinelinux.org/wiki/Wi-Fi">Connecting to Wi-Fi during installation</a></li>
     24 <li><a href="https://wiki.alpinelinux.org/wiki/Filesystems">File system tools for formatting</a></li>
     25 </ul>
     26 <h2>Update: 2025 Jan 4th</h2>
     27 <p>I installed Alpine without overwriting my home partition by doing the following instead of using the manual installation guide that is linked above:</p>
     28 <pre>
     29 fdisk /dev/sda
     30 reboot
     31 apk add e2fsprogs
     32 mkfs.ext4 /dev/sdaX # repeat for new partitions, with X being the number of the partition
     33 setup-alpine # answer "none" when asked where to install
     34 mount -t ext4 /dev/sda3 /mnt # replace 3 with the number of the root partition
     35 mkdir /mnt/boot
     36 mount -t ext4 /dev/sda1 /mnt/boot # replace 1 with the number of the boot partition
     37 mkdir /mnt/home
     38 mount -t ext4 /dev/sda2 /mnt/home # replace 2 with the number of the home partition
     39 setup-disk -m sys /mnt
     40 reboot</pre>
     41 <p>When mounting the boot partition, there were no errors. I double-checked by rebooting and, again, found no errors.</p>
     42 <p>However, after compiling dwm and st and rebooting, the files in the /boot folder were removed. I got the same errors with the boot partition as before.</p>
     43 <p>When I reinstalled Artix, I decided on using dinit instead of OpenRC. It starts up faster, but there is less documentation for it since it is newer.</p>
     44 </article>
     45 <footer>
     46 <hr>
     47 <a href="/">Home Page</a></footer>
     48 </body>
     49 </html>