overhaul bootstrapping sections

This commit is contained in:
dtb 2022-12-04 23:50:53 -05:00
parent 5794c0ebbb
commit 53eb33023a
5 changed files with 75 additions and 39 deletions

View File

@ -10,7 +10,7 @@ _bentr(`_link(`Alpine Package Keeper', `https://wiki.alpinelinux.org/wiki/Alpine
_bentr(`<A HREF="https://pkgs.alpinelinux.org/contents">Alpine repositories content search</A>')
')
_subsubheader(`Adding software')
_man(`apk_add(8)')
_man(`apk-add(8)')
_subsubheader(`Repositories')
<P>
See _man(`apk-repositories(5)').
@ -45,22 +45,20 @@ To always install doc packages with program packages, _code(`apk add docs').
_subheader(`Bootstrapping')
<P>
Alpine's bootstrapping procedure is quite manual; you should probably use _program(`setup-alpine').
However, it is possible and quite easy to perform the steps manually.
_program(`setup-alpine') exists to automate installation.
</P>
_passage(`Eunakria on the Alpine Linux Discord server',
`<P><CODE>setup-alpine</CODE> is jank.</P>')
<P>
To bootstrap _man(`apk(8)') do the following:
</P>
<OL>
<LI>Copy over the contents of _file(`/etc/apk/keys') to _file(`/mnt/etc/apk/keys')</LI>
<LI>
Fill out _man(`apk-repositories(5)') on the mount.
</LI>
<LI>
Run _command(`apk --root /mnt add --initdb alpine-base').
</LI>
<LI>Copy _man(`apk-keys(5)') to the analogous location on the mounted volume.</LI>
<LI>Fill out _man(`apk-repositories(5)') on the mount.</LI>
<LI>Use _man(`apk-add(8)') to initialize the package database on the mount (_command(`apk --root [<I>mount</I>] add --initdb alpine-base').</LI>
</OL>
<P>
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)'), the kernel, device management, and the bootloader if necessary.
Copy _file(`/etc/resolv.conf') over (and bind _file(`/dev/'), _file(`/proc/'), and _file(`/sys/')) before _ref(`#posix#chroot(1)')ing.
</P>
_subheader(`postmarketOS')

View File

@ -2,33 +2,32 @@ _header(`Arch')
<P>
Arch is known for using the latest versions of programs, which has given it an undeserved reputation of instability.
</P>
_subheader(`AUR')
<P>
You will need _package(`base-devel').
</P>
_subheader(`Bootstrapping')
<P>
Use _man(`pacstrap(8)').
See _ref(`#linux#bootstrapping').
Use _man(`pacstrap(8)') on Arch and _man(`basestrap(8)') on Artix.
</P>
<P>
At a minimum you need the _code(`base') package.
Select a kernel and install the corresponding package; _code(`linux'), _code(`linux-lts'), or another Linux configuration or fork.
The Arch wiki says you need to install _code(`linux-firmware'), this isn't strictly necessary but it is recommended.
Arch's base package is _package(`base').
Additionally, a kernel such as _package(`linux') or _package(`linux-lts') will be necessary.
The Arch wiki says _package(`linux-firmware') is necessary; it's not on many hardware configurations but it's recommended.
Install _code(`base-devel') if you plan on using the AUR or if you don't know what the AUR is yet.
On Artix you also need to select the _ref(`#linux#initialization') system: _package(`66'), _package(`dinit'), _package(`openrc'), _package(`runit'), or _package(`s6-base').
The Artix wiki says the initialization-specific _ref(`#linux#logind') package is necessary; it's not but it's recommended.
</P>
<P>
It's also a good idea to install any utilities you'll need on the bootstrapped system.
Text editors, network managers or utilities, and other administration tools, for example.
Manual utilities such as _code(`man-db') and others would also be useful.
On the bootstrapped system, after chrooting in, uncomment a local mirror in _file(`/etc/pacman.d/mirrorlist-arch').
Then configure _file(`/etc/pacman.conf') to use that mirror list.
</P>
<H5>Ubiquitous packages missing</H5>
<P>From the annals of my notes, 2021-06-04:</P>
_passage(`Config block conveyed to Leyla by an Arch package maintainer, shared to the Tebibyte Media Discord server 2021-06-04T1746+0500',
`
<PRE>
Had an issue with pacman missing some ubiquitous packages (esr's 'ascii', xorg-xev, etc).
This fixed it. I don't really know why - maybe some issues with my repos?
This was cleanly installed artix-openrc.
[5:46 PM] Bassman Leyla: So what I did is I went into /etc/pacman.d/mirrorlist-arch and uncommented a local mirror
[5:46 PM] Bassman Leyla: Then I appended a config block a package maintainer gave me onto /etc/pacman.conf
[5:46 PM] Bassman Leyla: I'll paste it in
[5:47 PM] Bassman Leyla:
'''
#
# ARCHLINUX
#
@ -50,8 +49,8 @@ Include = /etc/pacman.d/mirrorlist-arch
#[multilib]
#Include = /etc/pacman.d/mirrorlist-arch
'''
</PRE>
')
_subheader(`Artix')
_bibliography(`
@ -61,10 +60,3 @@ _bentr(`<A HREF="https://en.wikipedia.org/wiki/Artix_Linux">Artix Linux</A> (Wik
<P>
Artix is a Linux software distribution based on Arch that doesn't mandate SystemD as its initialization system.
</P>
_subsubheader(`Bootstrapping')
<P>
This process differs from Arch's bootstrapping process.
Artix uses _man(`basestrap(8)') rather than _man(`pacstrap(8)');
you need to select the initialization you want to use: _code(`66'), _code(`dinit'), _code(`openrc'), _code(`runit'), or _code(`s6-base'), as a package separate from _code(`base');
and Artix's official wiki says you need to install the appropriate _link(`#logind', `_code(`elogind')') package (_code(`elogind-[<I>initialization system</I>]') e.g. _code(`elogind-66')) but like _code(`linux-firmware') though it is helpful it isn't strictly necessary.
</P>

1
wiki/unix/bootloader.m4 Normal file
View File

@ -0,0 +1 @@
_header(`Bootloader')

View File

@ -15,6 +15,8 @@ include(`arch.m4')
include(`archives.m4')
include(`bootloader.m4')
include(`C.m4')
include(`culture.m4')

View File

@ -25,6 +25,11 @@ _bentr(`_link(`acpid', `https://sourceforge.net/projects/acpid2/')')
_man(`acpid(8)') is a daemon that can automatically manage ACPI events on Linux.
</P>
_subheader(`a.out')
_bibliography(`
_bentr(`_link(`Re: [PATCH] x86: Remove a.out support', `https://lwn.net/ml/linux-kernel/202203161523.857B469@keescook/')')
')
_subheader(`Audio')
<P>
Most audio servers recommend that they be run in userspace with user privileges, with PulseAudio going so far as to exiting when run as root without additional configuration.
@ -74,6 +79,38 @@ On Alpine you'll need the _program(`pulseaudio'), _program(`pulseaudio-alsa'), a
Start _man(`pulseaudio(1)') when you want audio, ideally in your _file(`.xinitrc').
</P>
_subheader(`Bootstrapping')
<P>
Usually the first program a computer will run is the _ref(`#bootloader'),
which loads the kernel and usually the _ref(`#linux#initramfs') which will handle mounting the system storage.
Then the _ref(`#linux#initialization') system is started, which handles daemons, some of which will handle login.
</P>
<P>
Bootstrapping Linux involves booting an operating system, usually off a temporary storage medium, mounting the intended system storage,
and installing the operating system on the intended storage.
Sometimes distributions come with software that mostly automates this.
</P>
_passage(`veronika on the Alpine Linux Discord server, 2022-12-04T1111+0400',`
<P>bootstrapping things is only useful for rare cases where you actually don`'t want to use the base packages that the installer gets for you automatically, and the installer doesn`'t get in your way of making your own system, instead it suggests you install certain packages, and asks what packages you want installed. If you`'re installing a desktop environment, it will probably ask you which meta package you want (or at least that`'s how I remember it working).</P>
<P>If you have an installer to do the same things with less steps for you, you should use it. Automation is progress, automation is the whole point of all this computer stuff. If you can automate it or make it easier, you probably should, unless you want some control over the process. For example, instead of checking the charge and running a command to put your laptop into battery saver mode, you make a program do it for you. Convenience is key to happy and painless computing</P>
')
<P>
If running very thin installation media, for example, a _ref(`#debian') network install CD, or just need the most up-to-date software possible,
the first step will be to connect to the Internet.
</P>
<P>
Next, if your chosen Linux distribution has a package manager, configure it, use it to initialize the file system on the intended system storage,
and install the necessary system packages to the storage.
Usually distributions have a single <EM>base</EM> package, like _ref(`#arch')'s _package(`base') or _ref(`#alpine')'s _package(`alpine-base').
If it doesn't include any of them, install separately a kernel, initialization system, and userland.
</P>
<P>
Bind mount (_command(`mount -o bind')) _file(`/dev/'), _file(`/proc/'), and _file(`/sys/') to the corresponding locations on the volume to bootstrap
(_code(`for d in dev proc sys; do mount -o bind /$d /[<I>mount</I>]/$d; done')),
then _ref(`#posix#chroot(1)') in and complete the system setup.
Set up additional configuration necessary to boot (including _ref(`#fstab(5)'), _man(`hostname(5)'), _man(`hosts(5)'), and anything necessary for the kernel or initialization).
</P>
_subheader(`Device Management')
_bibliography(`
_bentr(`_link(`udev', `https://en.wikipedia.org/wiki/Udev') (Wikipedia)')
@ -88,6 +125,12 @@ _subsubheader(_ref(`#alpine'))
_subsubheader(_ref(`#arch'))
_subsubheader(_ref(`#debian'))
_subheader(`Initialization')
_subsubheader(`OpenRC')
_subsubheader(`Runit')
_subsubheader(`S6')
_subsubheader(`Systemd')
_subheader(`initramfs')
_bibliography(`
_bentr(`_link(`Initial ramdisk', `https://en.wikipedia.org/wiki/Initial_ramdisk') (Wikipedia)')