alpine alt
boot from iso
bring up ethernet
- ifconfig eth0 up
- udhcpc eth0
set up repos
- get stock repos
- setup-apkrepos
- vi /etc/apk/repositories
- uncomment edge repos
- add @hjports http://hjports.sciops.net/alpine/v3.13/packages/
- delete cdrom shit
- wget https://hjports.sciops.net/alpine/hjports%40sciops.rsa.pub
- move that file to /etc/apk/keys/hjports@sciops.rsa.pub
- get stock repos
install some shit
- apk add gptfdisk cryptsetup e2fsprogs util-linux dosfstools
use gptfdisk to make three partitions:
- 1: EFI system partition (EF00) 512MB
- 2: boot partition (8300) ext2 1024MB
- 3: other partition (8300) rest of disk
setup encrypted root
- cryptsetup luksFormat /dev/sda3
- cryptsetup luksOpen /dev/sda3 cryptroot
- mkfs.ext4 /dev/mapper/cryptroot
- mkdir /mnt/root
- mount /dev/mapper/cryptroot /mnt/root
add boot shits
- mkfs.ext2 /dev/sda2
- mkdir -p /mnt/root/boot
- mount /dev/sda2 /mnt/root/boot
- mkfs.vfat /dev/sda1
- mkdir -p /mnt/root/boot/efi
- mount /dev/sda1 /mnt/root/boot/efi
drop a system on it
- setup-disk -m sys /mnt/root
copy the running modules in
- cp -a /lib/modules/* /mnt/root/lib/modules/
chroot in to clean up
- mount -t proc /proc /mnt/root/proc
- mount --rbind /dev /mnt/root/dev
- mount --make-rslave /mnt/root/dev
- mount --rbind /sys /mnt/root/sys
chroot /mnt/root
install some shit
- apk add efibootmgr syslinux
configure a bootloader
- mkdir -p /boot/efi/syslinux
- cp /usr/share/syslinux/efi64* /boot/efi/syslinux/
- vi /etc/update-extlinux.conf
- add ",ext2,cryptsetup" to modules= line
- add "cryptdevice=/dev/sda3:cryptroot" to defaultkernelopts= line
- run update-extlinux
- cp /boot/extlinux.conf /boot/efi/syslinux/syslinux.cfg
- efibootmgr --create --disk /dev/sda --part 1 --loader /syslinux/syslinux.efi --label syslinux --verbose
- bootorder= should automatically have the new shit first, even if it's the last entry in the list below
feed it a kernel and initfs
- vi /etc/mkinitfs/mkinitfs.conf
- add "ext2 cryptsetup" to features line
- apk add linux-lts
- mkinitfs
- cp /boot/vmlinuz-lts /boot/initramfs-lts /boot/efi/syslinux
- vi /etc/mkinitfs/mkinitfs.conf
at this point it should work but it does not; it never prompts for the luks passphrase. patches welcome