The installer downloads the latest packages to install the base installation. In this step you will install Alpine Linux in the /mnt/ directory, which contains the mounted file system structure. Create /mnt/boot/ directory and mount the /dev/sda1 partition in this directory:.# zfs create -o mountpoint=/var/log tank/LOGĬreating the /boot filesystem # mkfs.ext4 /dev/sda1 # zfs create -o mountpoint=/ tank/ROOT/alpineĬreating optional datasets (feel free to add your own) # zfs create -o mountpoint=/home tank/HOME The path to the block device ZFS will use.Īfter completing this, confirm that the pool has been created:Ĭreating the required datasets # zfs create -o mountpoint=none -o canmount=off tank/ROOT tank will be used in throughout this guide. It's like a temporary mountpoint for the pool. No mountpoint, as we'll handle this later. This reduces writes to disk, but might cause issues with mailers, like mutt. Set the default Unicode (UTF-8) normalization to 'formD'ĭisabling updates to file access time. # cryptsetup open -type luks /dev/sda2 cryptĬreating the ZFS pool # zpool create -o ashift=12 -O normalization=formD -O atime=off -m none -R /mnt -O compression=lz4 tank /dev/mapper/crypt # cryptsetup -v -c aes-xts-plain64 -s 256 -hash sha256 -iter-time 2000 -use-urandom luksFormat /dev/sda2 To encrypt the partition using individual settings, enter, for example:.If you prefer setting an individual hashing algorithm and hashing schema: If you changed the keyboard map in the temporary environment, the password you enter during encrypting the partition in this step, may not match the password you will enter during the system boots. Note: Alpine Linux uses the en-us keyboard mapping when prompting for the password to encrypt the partition at boot time. Optionally, fill the LUKS partition with random values:.The output should look similar to this:ĭevice Boot Start End Sectors Size Id Type Alternatively, press Enter to set the maximum available size. For example, 512m for 512 MB or 5g for 5 GB. Press Enter to select the default start cylinder. Enter n → p → 2 to start creating the next partition.Enter n → p → 1 → 1 → 100m to create a new 100 MB primary partition.Start the fdisk utility to set up partitions:.You can assign the remaining space for the encrypted ZFS pool. Linux requires an unencrypted /boot/ partition to boot. # apk add cryptsetup e2fsprogs syslinux zfs zfs-$(uname -r | rev | cut -d'-' -f1 | rev) Install the following packages required to set up ZFS and LUKS:.The installation requires several manual steps you must run in the Alpine Linux Live CD environment.īefore you begin to install Alpine Linux on the medium you intend to boot from, prepare the installation you already have: To install Alpine Linux in a ZFS pool on top of a LUKS encrypted partition, you cannot use the official installation procedure. Setting up Alpine Linux Using ZFS on Top of a LUKS Partition If your environment uses a different device name for your hard disk, use the corresponding device name in the examples. The following documentation uses the /dev/sda device as the installation destination. Note: We can't use the live environment from the installation isos, because we'll install the ZFS kernel module and that isn't possible with a read-only /boot (as provided by the iso).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |