Existing Alpine installation
WARNING: This process is not supported and might leave your device in a weird state. Here be dragons. |
To turn Alpine into postmarketOS:
- Install Alpine Linux
- Enable the community repository
- Add one of these mirrors to the top of
/etc/apk/repositories
, Change master to the correct release for your alpine version (see releases):
For Alpine Edge:
https://mirror.postmarketos.org/postmarketos/master
For Alpine 3.16:
https://mirror.postmarketos.org/postmarketos/v22.06
It should look somethign like this:
http://mirror.postmarketos.org/postmarketos/master
http://dl-cdn.alpinelinux.org/alpine/edge/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
http://dl-cdn.alpinelinux.org/alpine/edge/testing
- Add this key into
/etc/apk/keys/build.postmarketos.org.rsa.pub
or
- Add postmarketOS public key with apk:
# apk add -u --allow-untrusted postmarketos-keys
- Use your device package kernel for your device: (skip this if installing onto a desktop\laptop computer)
# apk add -u postmarketos-base device-nokia-n900
- Install the packages for the UI you want, for example:
# apk add -u postmarketos-ui-xfce4
or
# apk add -u postmarketos-ui-weston
(Use device-qemu-amd64
for a x86_64 virtual machine installation, but this will also install a kernel -- maybe it makes sense to introduce a new "docker device" without any kernel, you could experiment with that if you want.)
If you want to use the postmarketOS initramfs, make sure that you adjust the partition labels accordingly.
Note that alpine users start at 1000 and postmarketos users start at 10000. Some files provided by postmarketos-base may not match the existing system. eg: /etc/conf.d/tinydm
Alpine in a container
1. Check Alpine version:
cat /etc/apk/repositories
2. Add repositories:
For Alpine Edge:
sudo tee /etc/apk/repositories <<EOF
http://mirror.postmarketos.org/postmarketos/master
http://dl-cdn.alpinelinux.org/alpine/edge/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
http://dl-cdn.alpinelinux.org/alpine/edge/testing
EOF
3. Add PostmarketOS signing key:
apk add -u --allow-untrusted postmarketos-keys
4. Update package lists and upgrade system:
apk update
apk upgrade
5. Install PostmarketOS base system:
apk add postmarketos-base
See also
- pmaports#106 Turning an existing x86_64 Alpine Linux installation into a postmarketOS one fails
- pmaports#66 troubleshooting the first installation which was done this way