void-linux-pbp-installer/README.md

108 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

2024-03-28 15:05:46 +00:00
# UNMAINTAINED
I no longer use void linux, excellent distribution that it is.
2021-02-08 14:50:20 +00:00
# Install Scripts for Void Linux on Pinebook Pro
2024-03-28 15:05:46 +00:00
2021-02-08 14:50:20 +00:00
Before using either of the scripts in this repository, read through them to
clearly understand what they do. They are very opinionated and specifically
2024-03-28 15:05:46 +00:00
written to cater to my own needs (for example the use of `sudo`, other people
2021-02-08 14:50:20 +00:00
might have different setups). It is, however, easy to change things around.
2024-03-28 15:05:46 +00:00
By default, the `bootstrap` script creates a minimal installation on the emmc
storage, with full disk encryption (with an unencrypted boot partition) via lvm
on luks. Two volumes `swap` and `root` are created, the latter is formatted with
an xfs filesystem. Additionally one user is created (with access to sudo via the
wheel group) and keymap, hostname and timezone get set.
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
This gets you to a booting system, going on from there is out of scope here as
there are many ways to do that (for myself, I use `stow` to set up everything).
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
An important thing to keep in mind is that not all commands in the `bootstrap`
script are idempotent, that makes it all the more important to understand what
they do and to be sure to backup all important data.
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
Pre-built images can be downloaded from the
[releases](https://code.vanwa.ch/sebastian/void-linux-installer/-/releases) page
2021-02-08 15:04:09 +00:00
(those might be outdated though).
2024-03-28 15:05:46 +00:00
User and password for the live image are the standard void linux ones
(`root/voidlinux`).
2021-02-08 15:54:06 +00:00
2021-02-08 14:50:20 +00:00
# Scripts
2024-03-28 15:05:46 +00:00
2021-02-08 14:50:20 +00:00
## mk_pbp_img
2024-03-28 15:05:46 +00:00
Create a live image to boot void linux on the pinebook pro. Needs to be run on
an existing void linux system (docker might be possible with a working buildx
and some adaptions with the mounting of filesystems).
2021-02-08 14:50:20 +00:00
A copy of the [void-mklive](https://github.com/void-linux/void-mklive.git)
repository is downloaded next to the script into `.void-mklive` and used for
2024-03-28 15:05:46 +00:00
building the image.
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
The script assumes it is running on an `x86_64` architecture, if that is not the
case, it needs to be changed (this applies to the use of `qemu-aarch64-static`
to get a chroot).
2021-02-08 14:50:20 +00:00
The following tools need to be accessible in `PATH`:
- git
- make
- qemu-aarch64-static
- sudo
- xz
2024-03-28 15:05:46 +00:00
If there is an argument provided to the script, it is treated as the folder to
where the compressed image is written, if no argument is given, the current
working directory is used.
After a successful build, the finished image can be found in the directory
described above with a filename of `void-pbp.img.xz`
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
Write it to a microSD card as such:
2021-02-08 14:50:20 +00:00
- `xz -d < void-pbp.img.xz | sudo dd of=/dev/mmcblk0 bs=4M status=progress`
- `sudo sync`
2024-03-28 15:05:46 +00:00
Be **_very_** careful to get the parameter for `of` right, otherwise you can
destroy your system.
MicroSD cards can be fickle, it sometimes is helpful to not take them out
immediately, even after running `sync`. If booting from the card hangs, write
the image again onto it or use a different card.
2021-02-08 14:50:20 +00:00
## bootstrap
2024-03-28 15:05:46 +00:00
Install void linux to the internal mmc storage of the pinebook pro or use it for
some maintenance task.
Be aware that the time needs to be set in **\*UTC**, otherwise package
installation might not work.
2021-02-08 15:48:09 +00:00
2024-03-28 15:05:46 +00:00
If running on a pinebook pro with an ISO keyboard, run `loadkeys uk` to load the
correct keymap.
2021-02-08 15:48:09 +00:00
2021-02-08 14:50:20 +00:00
Run it in either of two ways:
### non-interactive
2024-03-28 15:05:46 +00:00
2021-02-08 14:50:20 +00:00
`bootstrap full`
Run a full installation, this will overwrite all data on the storage.
Runs the `full_install` command internally.
### interactive
2024-03-28 15:05:46 +00:00
`bootstrap`
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
Run `help` to get a list of commands you can run and quit interactive mode with
typing `exit`.
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
A useful thing to do here is the `repair` command. It sets up all the needed
filesystems and opens a chroot.
2021-02-08 14:50:20 +00:00
2024-03-28 15:05:46 +00:00
Again, it is highly recommended to read what the respective commands do and to
adapt them to your own needs.