Installing Alpine Linux on Linx1010B
Bay Trail 32bit EFI 64bit CPU
I've got Alpine installed and networking survives reboot. Not yet tried getting a GUI set up or testing battery sensors, audio etc. yet. I'm planning on testing Paper DE, which is a promising lightweight Wayland desktop environment using Wayfire as window manager and Qt for some lightweight, consistently-themed apps. This will mean switching to the edge version of Alpine, but there is also an apk of the DE on edge so may not need to build myself.
Create bootable USB
- Download Ventoy, and both x86_64 & i386 Alpine Linux ISOs.
- Create a Ventoy USB with GPT format and ~3GB unused.
alpine-extended-VERSIONNUMBER-x86_64.isoto 'Ventoy' partion.
- Create a FAT or FAT32 partition using remaining space. This is where all handy stuff will be placed.
alpine-extended-VERSIONNUMBER-i386.isoin 7zip or similar.
- Extract folder
/apks/x86/grub-efi-VERSIONNUMBER.apk/grub-efi-VERSIONNUMBER.tar/usr/lib/grub/i386-efiand its contents to the 'stuff' partition created earlier.
Setup Alpine Extended x86_64
Rotate the framebuffer console! Your neck will thank you.
echo 1 | tee /sys/class/graphics/fbcon/rotate
Login as root, no password.
Add the needed packages:
apk add grub-efi efibootmgr tzdata
I add some other packages I want to use:
apk add bash nano doas
then I set bash as the shell:
exit then login as root again.
(you could use chsh here)
Start step-by-step setup.
setup-keymap gb gb && setup-hostname alpine && rc-service hostname restart
I couldn't set the on-board WiFi at wlan0 UP in the live environment.
You can skip this section if you like, as the on-board WiFi will work after installation is complete.
I used a USB dongle at wlan1, but you can install Alpine Extended without internet access.
setup-interfaces didn't work for this dongle. I haven't tested others.
wpas=wpa_supplicant && wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' >> /etc/$wpas/$wpas.conf
$wpas -i wlan1 -c /etc/$wpas/$wpas.conf
ctrl+c then type:
$wpas -B -i wlan1 -c /etc/$wpas/$wpas.conf nano /etc/network/interfaces
add these lines:
auto wlan1 iface wlan1 inet dhcp
save, then type:
udhcpc -i wlan1 setup-dns
(can leave domain blank)
rc-update add $wpas boot rc-update add networking boot
Continue with Setup
export TZ='Europe/London' install -Dm 0644 /usr/share/zoneinfo/$TZ /etc/zoneinfo/$TZ echo "export TZ='$TZ'" >> /etc/profile.d/timezone.sh
Create user account:
adduser -g "<username>" <username> && adduser <username> wheel nano /etc/doas.d/doas.conf
permit persist :wheel,
passwd setup-sshd setup-ntp setup-disk -m sys
setup-apkrepos script deletes the reference to the install media repo, and the WiFi is janky at this point.
Skip this section if you have no working WiFI. You can do this after installation.
Instead, I edited
/etc/apk/repositories, commenting out the install media repo, and adding local mirrors:
Can then update packages:
apk update apk add --upgrade apk-utils apk upgrade --available
On reboot, the on-board WiFi is slow to respond, causing dhcpcd to wait and then timeout. To avoid this:
background to the end of the file, and save.
Do not reboot yet!
root=/dev/mmcblk1p3 && tmpmnt=/mnt/tmpmnt
Mount the installed OS and chroot in:
mkdir -p $tmpmnt mount $root $tmpmnt for i in dev dev/pts sys proc run ; do mount --bind /$i $tmpmnt/$i; done chroot $tmpmnt /bin/bash
Now we're in the installed OS.
APK is clever and only installs for the architecture it detects, so we have to bypass it by mounting our 'stuff' partition i386-efi folder from earlier and copying over the files we need:
tmpmnt=/mnt/tmpmnt mkdir -p $tmpmnt mount /dev/sda3 $tmpmnt cp -r $tmpmnt/i386-efi /usr/lib/grub/i386-efi
Then install grub and, if all is well, umount 'stuff'.
grub-install --target=i386-efi --removable --no-nvram /dev/mmcblk1p1 umount $tmpmnt
Modify the boot loader configuration for the sake of our necks:
save, update grub, then exit chroot:
grub-mkconfig -o /boot/grub/grub.cfg exit
Now we have left the chroot, we can unmount everything:
for i in dev/pts dev sys proc run boot/efi "" ; do umount $tmpmnt/$i; done
Check we've not missed any umounts - should return blank:
mount | grep $tmpmnt
Restart the tablet without the Live USB inserted, and hopefully you'll boot into Alpine!
You may need to set up WiFi again (I did).
setup-interfaces should work now, so just use that :)
Many thanks to Ian Renton and his commenters, as well as all the other posts/articles/guides I've found over the last few days!