Skip to content

Instantly share code, notes, and snippets.

Last active April 12, 2021 21:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Boot Alpine Linux via PXE using `pixiecore`

Boot Alpine Linux via PXE using pixiecore

Running without nix

You can change the SHEBANG to #!/usr/bin/env bash if you don't have nix installed. Just be sure to have pixiecore in your $PATH. To simplify this even more, we've already included the ordinary SHEBANG in line 3. Simply skip the first two lines when copy pasting, and you should be good to go!

No disks found during Installation?

You'll likely have to install linux-lts via

apk add linux-lts

and load the ahci kernel module via

modprobe ahci

for ATA/SATA disks to be detected during the installation. To save yourself from hassle, check the existence of your storage device before starting setup-alpine.

What!? No https in the mirror url?

pixiecore will download via https anyways due to HSTS (if not, something fishy is going on!). Alpine doesn't seem to support https on the kernel command line, therefore we use http. AFAIK apk packages are still signed, so the use of http should be okay-ish here.

#!/usr/bin/env nix-shell
#!nix-shell -i bash --packages pixiecore
#!/usr/bin/env bash
set -e
BOOT_CMD="ip=dhcp alpine_repo=${MIRROR}/alpine/v${VERSION}/main/"
sudo --validate
echo "starting pixiecore"
sudo pixiecore boot "$KERNEL" "$INITRAMFS" --cmdline "${BOOT_CMD}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment