GithubHelp home page GithubHelp logo

alpinebox's Introduction

Features

This is an installer for Alpine linux with ZFS as root filesystem, and ZFSBootMenu to boot into different environments.

Since installing Alpine with ZFS and ZfsBootmenu needs a whole tutorial with many steps, we've created this easy installer.

  • Fastest and easiest way to install Alpine on ZFS
  • Uses the excellent ZFS filesystem.
  • ZFSBootMenu as bootloader, which allows you to rollback in case of failed upgrades.
  • After installing it can boot both in BIOS mode and UEFI mode.
  • Perfect for running docker.
  • Also easy to install at VPS providers that do not provide an Alpine installer.
  • Install time is about 1 minute.

image

Why Alpine Linux?

Alpine is one of the best and cleanest Linux distros out there, for running Docker and various other stuff. Packages like the Linux kernel, ZFS support and Docker are very up to date but also very stable.

Its super small, fast and simple. Its not the most versatile distribution, but what it does, it does very well.

Also upgrading to newer releases is quick and painless, in contrast to other distro's. And since we use snapshots before upgrading, its easy to roll back should there be a problem.

For this reason all our boxes run Alpine and just auto-upgrade and reboot every week without problems.

Installing

Installation by just writing the official image to the disk is the easiest way:

  • Boot any Linux distro via CD, USB. Or use a rescue-boot if you use some kind of VPS hosting provider. (example screenshot below)
  • Download the imager:
# wget https://boot.datux.nl/image

NOTE: This is just a redirect to https://raw.githubusercontent.com/psy0rz/alpinebox/master/install/installimage.sh

  • Start the imager and specify your harddisk:
# sh image /dev/sda

This should download and reboot, and you're basically done :)

VPS provider tips:

Here are some specific VPS provider tips on how to get into an environment to start the installer:

Once you've entered the rescue environment, you can use the Alpinebox installer mentioned above.

Note: Some provider require a powercycle or reset, after the installer. (normal reboot doesnt work)

Login

There is no root-password for console logins. However, for ssh you will need to add your keys.

Growing the disk

Since it's an image, you will need to grow the partition and zfs disk: image

Just run grow-disks script in /root/alpinebox, and it should be handled automaticly without a reboot even.

Do this as soon as possible, since its a somewhat risky operation

Adding a disk

To add a disk to the zpool as a mirror, just run the add-disk script in /root/alpinebox

This will also make sure that the disk has the correction partitioning, MBR/UEFI and ZfsBootmenu stuff. So that if the first disk completely fails, you can still boot from this one.

Make sure you remove any non-ONLINE disks from the pool first.

Backups

To make backups via ZFS replication, check out my other project: https://pypi.org/project/zfs-autobackup/

Safe updates

Now everytime you need to do a bunch of Alpine upgrade, just run something like: zfs snapshot rpool/ROOT@upgrades1

If the upgrade fails you can rollback via the ZfsBootmenu.

Installing via official Alpine installer

If you dont like the imaging method above, you can also use the official Alpine ISO and our install scripts:

1. Boot Alpine installer

Get and boot a matching Alpine version: https://alpinelinux.org/downloads/

Note: Should be the extended edition, since that one has ZFS support.

2. Configure network

Get you network configured with:

setup-interfaces -r

3. Run this quick installer

wget https://boot.datux.nl/install
sh install /dev/sda

This will partition/format/install and reboot.

Creating you own image

Look in the devtools directory. With createimage.sh you can create your own image. Run it from an Alpine ISO or installation. You might need to install some dependencies first if something fails.

Install docker with zfs-volume support

See https://github.com/csachs/docker-zfs-plugin

More info

Based on this excellent tutorial: https://docs.zfsbootmenu.org/en/v2.3.x/guides/alpine/uefi.html

alpinebox's People

Contributors

psy0rz avatar

Stargazers

 avatar  avatar Fabian avatar Oleg avatar  avatar Fred Turkington avatar  avatar Grzegorz Doleczek avatar  avatar Seji avatar Felix Heindorf avatar  avatar ʞ-uɐʇsıɹʇ avatar  avatar Sebastian Beyer avatar Danny Navarro avatar Eduardo Mínguez avatar Ken Crandall avatar Wesley Moore avatar Petr Hercík avatar Brando avatar Michel Recondo avatar Tara Stella avatar raffaele messuti avatar Vladyslav V. Prodan avatar  avatar Zach Dykstra avatar

Watchers

 avatar  avatar

alpinebox's Issues

blacklist some video drivers

I encountered a problem with no console output on older hardware:

[    8.379605] radeon 0000:01:05.0: vgaarb: deactivate vga console

After blacklisting it (And mkinitfs) it was fixed, so we should probably blacklist them all be default:

# Blacklist common GPU drivers
blacklist radeon
blacklist amdgpu
blacklist nouveau
blacklist nvidia
blacklist nvidiafb
blacklist rivafb
blacklist i915
blacklist intel_agp
blacklist drm
blacklist drm_kms_helper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.