touch up alpine bootstrapping process

This commit is contained in:
dtb 2022-11-24 22:04:46 -05:00
parent 9c44119441
commit 31eed40cd5
2 changed files with 34 additions and 23 deletions

View File

@ -3,17 +3,44 @@ _header(`Alpine')
Alpine Linux is a small Linux distribution based on musl libc.
Its main purpose is to serve as a server distribution, however many have found use for it as a desktop distribution.
</P>
_subheader(`apk(8)')
_bibliography(`
_bentr(`_link(`Alpine Package Keeper', `https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper') (Alpine Wiki)')
_bentr(`<A HREF="https://pkgs.alpinelinux.org/contents">Alpine repositories content search</A>')
')
_subheader(`_code(`WARNING: Ignoring [_italic(`path')]: UNTRUSTED signature')')
_subsubheader(`Repositories')
<P>
See _man(`apk-repositories(5)').
</P>
<P>
Most Internet repositories use the URL scheme of _code(`https://[_italic(`server')]/alpine/[_italic(`release branch')]/[_italic(`repository branch')]').
For example, the _italic(`main') repository branch on the _italic(`edge') release branch on the server _italic(`dl-cdn.alpinelinux.org') is _code(`http://dl-cdn.alpinelinux.org/alpine/edge/main').
A repositories file could look like the following:
</P>
<PRE>
http://dl-cdn.alpinelinux.org/alpine/edge/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
http://dl-cdn.alpinelinux.org/alpine/edge/testing
</PRE>
<P>
Local directories like _file(`/media/cdrom/apks'), an example from the Alpine Wiki, are valid as well.
</P>
_subsubheader(`_code(`WARNING: Ignoring [_italic(`path')]: UNTRUSTED signature')')
_bibliography(`
_bentr(_link(`ERROR: http://dl-4.alpinelinux.org/alpine/edge/testing: UNTRUSTED signature', `https://stackoverflow.com/questions/73374745/error-http-dl-4-alpinelinux-org-alpine-edge-testing-untrusted-signature')')
_bentr(`_link(`ERROR: http://dl-4.alpinelinux.org/alpine/edge/testing: UNTRUSTED signature', `https://stackoverflow.com/questions/73374745/error-http-dl-4-alpinelinux-org-alpine-edge-testing-untrusted-signature')')
')
<P>
If you are absolutely sure what you're doing is fine, _command(`apk [_italic(`command')] _em(`--allow-untrusted')').
This ignores the error and allows the operation to proceed.
</P>
_subheader(`Always install manual pages')
<P>
Alpine doesn't include man pages in program packages to save on space, instead keeping them in _code(`[<I>package</I>]-doc') sibling packages.
To always install doc packages with program packages, _code(`apk add docs').
</P>
_subheader(`Bootstrapping')
<P>
Alpine's bootstrapping procedure is quite manual; you should probably use _program(`setup-alpine').
@ -22,13 +49,7 @@ However, it is possible and quite easy to perform the steps manually.
<OL>
<LI>Copy over the contents of _file(`/etc/apk/keys') to _file(`/mnt/etc/apk/keys')</LI>
<LI>
Add newline-delimited mirrors to _file(`/mnt/etc/apk/repositories'), such as these if you wish to use the _code(`edge') branch:
<PRE>
http://dl-cdn.alpinelinux.org/alpine/edge/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
http://dl-cdn.alpinelinux.org/alpine/edge/testing
</PRE>
_code(`edge') may be replaced with a stable branch, the latest being _code(`v3.17') as of writing.
Fill out _man(`apk-repositories(5)') on the mount.
</LI>
<LI>
Run _command(`apk --root /mnt add --initdb alpine-base').
@ -36,18 +57,9 @@ This is an ordinary _man(`apk-add(8)') call; you may wish to install necessities
</LI>
</OL>
<P>
Alpine does not have a _man(`chroot(1)') helper; you must manually do that with a one-liner such as
_code(`for i in dev proc sys; do mount -o bind "/$i" "/mnt/$i"; done; cp /etc/resolv.conf /mnt/etc/resolv.conf')
which you can chroot into.
</P>
<P>
After chrooting in, you must configure basics such as users, passwords, _man(`fstab(5)'), and the bootloader yourself.
</P>
_subheader(`Always install manual pages')
<P>
Alpine doesn't include man pages in program packages to save on space, instead keeping them in _code(`[<I>package</I>]-doc') sibling packages.
To always install doc packages with program packages, _code(`apk add docs').
Make sure to bind mount (_command(`mount -o bind')) _file(`/dev/'), _file(`/proc/'), and _file(`/sys/') to the corresponding locations on the bootstrap prefix
and copy _file(`/etc/resolv.conf') over before _ref(`#posix#chroot(1)')ing into the bootstrap directory and finalizing setup.
Remember to set up users, _ref(`#fstab(5)'), and the bootloader if necessary.
</P>
_subheader(`postmarketOS')

View File

@ -1,4 +1,3 @@
_header(`fstab')
<P>See _man(`fstab(5)').</P>
_header(`fstab(5)')
<P>postmarketOS requires that the _code(`localmount') OpenRC service be enabled for the system to read _man(`fstab(5)').
<P>Arch and Artix have fstab generators at _man(`genfstab(8)') and _man(`fstabgen(8)') respectively in their installation scripts.</P>