Received: from lime.acoby.com (lime.acoby.com [88.80.190.103]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 05BB67818F8 for <~alpine/users@lists.alpinelinux.org>; Fri, 19 Jun 2020 02:50:48 +0000 (UTC) Received: from [192.168.50.214] (104-244-25-79.PUBLIC.monkeybrains.net [104.244.25.79]) by lime.acoby.com (Postfix) with ESMTPSA id B27523165A for <~alpine/users@lists.alpinelinux.org>; Fri, 19 Jun 2020 02:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=acoby.com; s=mail2015-12-25; t=1592535047; bh=qacCB8pqDrBSx5fv7LMHWayWFvciAQyFUI1ksu9WB0M=; h=Subject:To:References:From:Date:In-Reply-To:From; b=PlnqYpxsYPtG1gHI2fG9c6dA/Q4DTmAftlSSjjqraTmV0pQ9Mhhp9mPs5PMS/ezSR P6Iyf76EMTTeqFusS5elGcOjLQqfMAsfgrjaivc2ZTE/DdkOE3bn7/k38J5glHRPNM UNdT6OYCxsM2dap5z2ftsOGVq6tDBpPtxyu4vVJ0= Subject: Re: Re: Installing package with kernel module fails on diskless mode? (wireguard-rpi) To: ~alpine/users@lists.alpinelinux.org References: From: Allan Riordan Boll Message-ID: <0de994ba-75be-14bb-5bae-2808a142ea5b@acoby.com> Date: Thu, 18 Jun 2020 19:50:44 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Had this problem too, and came up with a (hacky) solution. Hopefully, now that Wireguard is officially part of the kernel since a few months ago, this will not be needed in the future. But for now, the following does the trick: # Remount kernel module dir /.modloop as an overlay, to allow writing modprobe overlay mkdir -p /.modloop.lower /.modloop.upper /.modloop.workdir mount /dev/loop0 /.modloop.lower umount /.modloop/ mount -t overlay -o lowerdir=/.modloop.lower,upperdir=/.modloop.upper,workdir=/.modloop.workdir none /.modloop lbu include /.modloop.upper lbu commit -d # Manually get the Wireguard kernel module to avoid installing # the wireguard-rpi2 which does not work with diskless systems cd /tmp pkgname=$(apk list | grep wireguard-rpi2 | cut -d " " -f 1) wget http://dl-cdn.alpinelinux.org/alpine/v3.12/community/armhf/$pkgname.apk mkdir /tmp/$pkgname tar -xzf $pkgname.apk -C /tmp/$pkgname mkdir -p /lib/modules/$(uname -r)/extra/ cp /tmp/$pkgname/lib/modules/$(uname -r)/extra/wireguard.ko \ /lib/modules/$(uname -r)/extra/ rm -fr /tmp/$pkgname /tmp/$pkgname.apk depmod # Create an init script to remount the /.modloop overlay on next boot cat > /etc/init.d/modloopoverlay < I'm having the same problems and I have tested so far with > > - PXE Booted Alpine (using > https://blog.haschek.at/2019/build-your-own-datacenter-with-pxe-and-alpine.html > ) > - RasPi 3 and 4 (using > https://wiki.alpinelinux.org/wiki/Raspberry_Pi#Installation) > - USB booted (using > https://wiki.alpinelinux.org/wiki/Create_a_Bootable_USB) > - Full disk install on a Server > > Only the last method allowed me to install the wireguard packages. I > went to the IRC a few days ago and someone said they're preparing a > method that will allow diskless setups to install these modules but I > didn't get a hold of the guy in charge. > > Does anyone have any updates on this matter? > > > Am Montag, den 10.02.2020, 10:44 +0100 schrieb Davy Landman: >> I'm loving alpine, but I'm running into a problem that I do not know >> how to solve, and no amount of googling has helped me. >> >> I'm on v3.11.3 on a rpi1, just downloaded the release and unpacked it >> onto a fresh fat32 sd card. It boots-up and stuff just works. Regular >> package installation works, but when I wanted to add wireguard, it >> fails and I think I understand what is happening, but I cannot seem >> to figure out to solve it. >> >> Here is the full log: >> >> (1/1) Installing wireguard-rpi (5.4.12-r0) >> ERROR: Failed to create lib/modules/5.4.12-0-rpi/extra/wireguard.ko: >> No such file or directory >> ERROR: wireguard-rpi-5.4.12-r0: failed to rename lib/modules/5.4.12- >> 0-rpi/extra/.apk.6b9f5d1b725356e84556fbab4f1ce19495578693bf92d01e to >> lib/modules/5.4.12-0-rpi/extra/wireguard.ko. >> Executing busybox-1.31.1-r9.trigger >> Executing kmod-26-r0.trigger >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.dep.2636.32472.1581276993, 301, 644): Read-only file system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.dep.bin.2636.32472.1581276993, 301, 644): Read-only file >> system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.alias.2636.32472.1581276993, 301, 644): Read-only file system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.alias.bin.2636.32472.1581276993, 301, 644): Read-only file >> system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.softdep.2636.32472.1581276993, 301, 644): Read-only file >> system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.symbols.2636.32472.1581276993, 301, 644): Read-only file >> system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.symbols.bin.2636.32472.1581276993, 301, 644): Read-only file >> system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.builtin.bin.2636.32472.1581276993, 301, 644): Read-only file >> system >> depmod: ERROR: openat(/lib/modules/5.4.12-0-rpi, >> modules.devname.2636.32472.1581276993, 301, 644): Read-only file >> system >> 1 error; 135 MiB in 57 packages >> >> >> if I understand correctly, it wants to add a kernel module but fails >> since the kernel is on a read-only side of the system. I've tried >> remounting the whole disk as rw, but that didn't solve it. >> >> I'm hoping someone can help me or maybe there is a wiki page I >> missed, but it looks like this should work, is the plain alpine-rpi >> install and the plain precompiled wireguard-rpi package. >> >> Thanks, >> Davy