1
0

add more alpine knowledge, consolidate postmarketos into alpine

This commit is contained in:
dtb
2022-04-21 00:58:44 -04:00
parent 634ce98c30
commit 9b8f6a0d64
2 changed files with 63 additions and 63 deletions

View File

@@ -16,22 +16,76 @@
<SCRIPT SRC="/js/sheets.js" TYPE="application/javascript"></SCRIPT>
<SCRIPT TYPE="application/javascript">window.onload = window.initializesheets;</SCRIPT>
<H1>alpine</H1>
<H3>updated 2021-10-14</H3>
<H3>updated 2022-04-20</H3>
<HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H2>Resources</H2>
<UL>
<LI><A HREF="https://pkgs.alpinelinux.org/contents">Alpine repositories content search</A></LI>
</UL>
<H2>Setting up a C compilation environment</H2>
<P>You will need the following.</P>
<H2>Always install manual pages</H2>
<P>
Alpine doesn't include man pages in program packages to save on space, instead keeping them in <CODE>[<I>package</I>]-doc</CODE> sibling packages.
To always install doc packages with program packages, <CODE>apk add docs</CODE>.
</P>
<H2>Common utilities</H2>
<P>A lot of common utilities such as <CODE>lsblk(8)</CODE> and <CODE>more(1)</CODE> are provided by <CODE>util-linux</CODE> which is not installed by default.</P>
<H3>C language</H3>
<UL>
<LI><B>C standard library headers</B> - <CODE>musl-dev</CODE></LI>
<LI><B>C compiler</B> - <CODE>tcc</CODE>, <CODE>gcc</CODE>, <CODE>clang</CODE></LI>
</UL>
<P>You will want the following.</P>
<UL>
<LI><B>Make utility</B> - <CODE>make</CODE></LI>
<LI>Compiler: <CODE>tcc</CODE>, <CODE>gcc</CODE>, <CODE>clang</CODE></LI>
<LI>Standard library headers: <CODE>musl-dev</CODE></LI>
<LI>Standard library documentation: <CODE>man-pages</CODE>, <CODE>man-pages-posix</CODE></LI>
</UL>
<P>Also see the <CODE>build-base</CODE> metapackage.</P>
<H3>LUKS</H3>
<P><CODE>cryptsetup</CODE> and <CODE>e2fsprogs</CODE>.</P>
<H3>Manual viewer</H3>
<P><CODE>mandoc</CODE></P>
<H3>Make</H3>
<P><CODE>make</CODE></P>
<H3>Login manager</H3>
<P><CODE>elogind</CODE></P>
<H3>Stream Pager</H3>
<P><CODE>less</CODE></P>
<H3>Task manager</H3>
<P><CODE>top(1)</CODE> comes with busybox; see its derivatives such as <CODE>htop</CODE> for curses-based alternatives.</P>
<H3>Text editing</H3>
<P>
<CODE>emacs</CODE> and <CODE>vim</CODE> come to mind.
A particularly shoddy attempt at <CODE>ed(1)</CODE> is provided by busybox but will please nobody.
busybox's <CODE>vi(1)</CODE> on the other hand is a very useable implementation of the original.
</P>
<H2>fstab</H2>
<P>See <CODE>fstab(5).</P>
<P>postmarketOS requires that the <CODE>localmount</CODE> OpenRC service be enabled for the system to read <CODE>fstab(5)</CODE>.
<H2>Mount LUKS encrypted partitions at boot</H2>
<H3>Sources</H3>
<UL>
<LI><A HREF="https://www.howtoforge.com/automatically-unlock-luks-encrypted-drives-with-a-keyfile/">Automatically Unlock LUKS Encrypted Drives With A Keyfile</A></LI>
<LI><A HREF="https://wiki.gentoo.org/wiki/Dm-crypt">Dm-crypt</A> (Gentoo Wiki)</LI>
<LI><A HREF="https://wiki.alpinelinux.org/wiki/LVM_on_LUKS">LVM on LUKS</A> (Alpine Wiki)</LI>
</UL>
<P>See <A HREF="/knowledge/cryptography#luks_partitioning">cryptography#LUKS partitioning</A> for how to make a LUKS partition.</P>
<P>
<CODE>cryptsetup-openrc</CODE> provides a <CODE>dmcrypt</CODE> service for OpenRC.
Make sure that service is added to runlevel boot and then configure <CODE>/etc/conf.d/dmcrypt</CODE>, and accordingly fstab.
<CODE>dmcrypt</CODE> will need the UUID of the <I>physical</I> block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper.
</P>
<H2>postmarketOS: Random MAC address generation on Wifi</H2>
<P>
By default, postmarketOS will generate a random software MAC address when connecting to a new WLAN network.
You can disable this by adding a NetworkManager rule.
In <CODE>/etc/NetworkManager/conf.d/</CODE> you can make a file with any name that has the following:
</P>
<P><CODE><PRE>
[device]
wifi.scan-rand-mac-address=no
</PRE></CODE></P>
<P>
On a live system you can then <CODE>rc-service networkmanager restart</CODE> to restart NetworkManager and have it load the new configuration.
</P>
</BODY>
</HTML>