Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 08374223615 for <~alpine/users@lists.alpinelinux.org>; Sat, 8 Feb 2025 09:02:23 +0000 (UTC) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-307de8f18d6so20989541fa.1 for <~alpine/users@lists.alpinelinux.org>; Sat, 08 Feb 2025 01:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739005341; x=1739610141; darn=lists.alpinelinux.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gDg4lOI9gcg4Lgjeby4ln1QaH/w7fhD6SoooKLEyzXM=; b=Ioa8kxxeYwY58uCsZvqiXeukbNESOGyQe0qrKcOsCzImW1oI3HTWNSWWopt3b83L43 U/4br1noFcqH5vOrXcSn/Uov4s8xylUp0xmUNiU86uTR2I3rDNEHqHYv8M6gyoVKHo6/ 6pD1quxoFh/3Q3sO4lfCu5mkZ/W+QxKv4WeRPMuZ7fpyArvYVh4JIEJDSbF7OORWh7pP 7oif2WWIPmJqcqIgsLmkycChgCt0T9Y7p7kzovxikIX41EVgi86uMAly+pvCqwlpPIY8 WZT/9bNBPrjexHR7exacqoTVehzP7ax/GfVJRZGCIEyoxaNJg99zp5xpG/JAA85wWarx 8PQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739005341; x=1739610141; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gDg4lOI9gcg4Lgjeby4ln1QaH/w7fhD6SoooKLEyzXM=; b=Ige4BaFs2a8c1KEKPMx6J5a51JxopSyi1SWTs4BvLXDdfBPfOoqO+mUHTpR4JLMxh9 aqi9/pqgUBdo8lEZGXmce8x0UJ246B7DZjbqOguonUuVao1qJD9frJwDKyMc54lew4gS cDqtJ7prRYtPSDlWxDRVKqZQ1c69JvX9zY5X8jbNFTx2EkFol1GOeAsvlhdvMCVu+i7s zjPMoKdrQByK7vuvMbCO7H1fiVhfhwv/mV6tJdMiMuaQIW36z+S1PoLb5XRl4RfrvO0P LSrLnlmLehQ23S36wKN3jSaTmxTT5N5zbr02n/biNV7mrTR66GSNI/gvy9c4MFoYNGdo 8UqQ== X-Gm-Message-State: AOJu0YzZwqHw91k7YY38uAEGIgBuQRUCm/HIogWBikquGafEGALC6G0H fywcJPi2EJ8qNbj0/DmHQf58VoihTXxQc+PdJk42EuH1q9yeC2j6mLwh+ZEMwcmic2WfHs1sjKV fszJ9Vnpxmgey8PPz/oVwJ/8apAQ= X-Gm-Gg: ASbGnctrbn/djgMjT0rzLN7a/mCKuba5H0HY614UCn4xTerOHDLSLn63oHdHCccwkIw lE9mkS2OzD+0+NNXFVUdSHtxauXwhUY4fQQe1HnBF2N14Y4qMWVzdI9DnxOmQW31HIrOkYuRVSQ == X-Google-Smtp-Source: AGHT+IEviJHBmpsH7U5SQx0rv9ePwAqGsq2Vr1JitokhUjfELVJrE9zAE862S2f7/4cQK9Xt0Qg6LcgQ205CmDzV1UI= X-Received: by 2002:a05:651c:546:b0:300:3a15:8f19 with SMTP id 38308e7fff4ca-307e5a851f6mr21311961fa.32.1739005341223; Sat, 08 Feb 2025 01:02:21 -0800 (PST) MIME-Version: 1.0 References: <9410103.CDJkKcVGEf@ntb-norbert> <2408933.iZASKD2KPV@ntb-norbert> <23824424.6Emhk5qWAg@ntb-norbert> In-Reply-To: <23824424.6Emhk5qWAg@ntb-norbert> From: Prabu Anand Kalivaradhan Date: Sat, 8 Feb 2025 14:31:44 +0530 X-Gm-Features: AWEUYZntKm0QrHsUNQ_of5aDlepTusGJZxEKukYcCi3zYJTi5Cko0_5ze023sOQ Message-ID: Subject: Re: Diskless systems do not boot with latest apk versions from cache To: MBB Cc: "~alpine/users@lists.alpinelinux.org" <~alpine/users@lists.alpinelinux.org>, Sertonix , Kevin Garman Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi MBB, Please confirm if the steps given in the page https://wiki.alpinelinux.org/wiki/Diskless_Mode#Upgrading_a_Diskless_System is complete. If something is missing, please highlight here or in the wiki. Most of the content on the above page has been consolidated from other parts of wiki. Since i don't use diskless i'm not 100% sure about the correctness of the content. I am still hesitating to touch those wiki pages related to Raspberry. Anyone willing to offering to help test content changes, please reply me here in the list or personally. Regards, Prabu On Sat, 8 Feb 2025 at 13:56, MBB wrote: > > Am Montag, 3. Februar 2025, 16:07:18 Mitteleurop=C3=A4ische Normalzeit sc= hrieb Kevin Garman: > > > I have long been struggling with similar issues on my diskless installs= . I run.. > > > > > > apk cache -v sync > > > > > > ...and sometimes it breaks my system(s) and sometimes it doesn't. I've= read where cache sync should be used with care, but I believe I'm using it= as intended. It seems like it should be straight forward as all it's supp= ose to do (as I understand it) is make the cache match what the system need= s during boot. It seems like running cache sync should be the solution to = problem it's causing! > > > > > > I've been working to figure out a simple/repeatable set of steps to rep= roduce the problem, but so far I haven't been able to get there. > > > > > > > > > > > > > > > ________________________________ > > > From: ~alpine/users <~alpine/users@lists.alpinelinux.org> on behalf of = MBB > > > Sent: Sunday, February 2, 2025 09:16 > > > To: ~alpine/users@lists.alpinelinux.org <~alpine/users@lists.alpinelinu= x.org>; Sertonix > > > Subject: Re: Diskless systems do not boot with latest apk versions from= cache > > > > > > > > > Am Sonntag, 2. Februar 2025, 09:11:22 Mitteleurop=C3=A4ische Normalzeit= schrieb MBB: > > > > Am Samstag, 1. Februar 2025, 14:39:34 Mitteleurop=C3=A4ische Normalze= it schrieb MBB: > > > > > Am Samstag, 1. Februar 2025, 13:12:29 Mitteleurop=C3=A4ische Normal= zeit schrieb Sertonix: > > > > > > On Sat Feb 1, 2025 at 9:24 AM CET, MBB wrote: > > > > > > > Hi all! > > > > > > > > > > > > > > I have 3 Raspberry Pis, different PI versions and different Alp= ine versions (3.18.9, 3.19.1, 3.19.4). > > > > > > > > > > > > > > All have the same issue. > > > > > > > > > > > > > > I'm doing: > > > > > > > apk update; apk upgrade > > > > > > > > > > > > > > Checking the version of an upgraded binary before reboot, e.g. = named, looks ok. > > > > > > > > > > > > > > After reboot, it loads an old version even though a newer packa= ge is available in cache. > > > > > > > > > > > > > > gate [/etc/apk]$ ls -al cache > > > > > > > lrwxrwxrwx 1 root root 22 Feb 1 08:50 cache = -> /media/mmcblk0p1/cache > > > > > > > > > > > > > > gate [/etc/apk/cache]$ ls -altr bind-9* > > > > > > > -rwxr-xr-x 1 root root 207297 Mar 15 2024 bind-9= .18.24-r1.5aca84cc.apk > > > > > > > -rwxr-xr-x 1 root root 208996 Dec 17 16:37 bind-9= .18.32-r0.1254446d.apk > > > > > > > -rwxr-xr-x 1 root root 209078 Jan 29 19:44 bind-9= .18.33-r0.b6697cb2.apk > > > > > > > > > > > > > > gate [/etc/apk/cache]$ named -V > > > > > > > BIND 9.18.32 (Extended Support Version) > > > > > > > running on Linux armv7l 6.6.14-0-rpi #1-Alpine SMP Fri Jan 26 1= 3:40:47 UTC 2024 > > > > > > > > > > > > > > Is there something I'm doing wrong? > > > > > > > > > > > > It looks correct what you are doing. Could you try if running thi= s > > > > > > commands returns any error? > > > > > > > > > > > > $ apk --simulate add bind=3D9.18.33-r0 --no-network > > > > > > > > > > No errors with this command. > > > > > > > > > > *gate [*~*]$ *doas apk --simulate add bind=3D9.18.33-r0 --no-networ= k > > > > > doas (norbert@gate) password: > > > > > (1/5) Upgrading bind-libs (9.18.32-r0 -> 9.18.33-r0) > > > > > (2/5) Upgrading bind-tools (9.18.32-r0 -> 9.18.33-r0) > > > > > (3/5) Upgrading bind-dnssec-root (9.18.32-r0 -> 9.18.33-r0) > > > > > (4/5) Upgrading bind (9.18.32-r0 -> 9.18.33-r0) > > > > > (5/5) Upgrading bind-openrc (9.18.32-r0 -> 9.18.33-r0) > > > > > OK: 157 MiB in 215 packages > > > > > > > > I removed all outdated bind packages from the cache with the result, = that bind is no longer available after reboot. > > > > After moving the bind*9.18.32-r0*.apk files back into the cache direc= tory, the service gets restored and starts up without issues after reboot. > > > > > > > > It seems that something's pointing to a specific version. > > > > > > > > > > `apk cache sync` breaks the entire system. > > > > > > This cleans the cache from outdated APKINDEX* and *.apk files. > > > But after reboot nothing is loaded and the boot process ends with a `(n= one) local:` prompt. > > > > > > Restoring the old cache directory, brings the system to life again. > > > > > > Same issue when I manually delete only the APKINDEX* files, and update = the local DB with `apk update` to download fresh APKINDEX. > > > > > > Restoring the old APKINDEX* files from a backup fixes this. > > > > > > I fixed it for all 3 of my systems. > > Key is to update the /media/mmcblk0p1/boot/initramfs-rpi > > > I created a new one following this guide: https://wiki.alpinelinux.org/wi= ki/Initramfs_init > > I activated these features to get an initramfs which matches the original > > > features=3D"base dhcp keymap kms mmc squashfs usb" > > > > When I compared the old an new initramfs, only these binaries showed diff= erences: > > > Files initramfs/bin/busybox and mkinitfs/bin/busybox differ > Files initramfs/lib/libapk.so.2.14.0 and mkinitfs/lib/libapk.so.2.14.0 di= ffer > Files initramfs/lib/libcrypto.so.3 and mkinitfs/lib/libcrypto.so.3 differ > Files initramfs/lib/libssl.so.3 and mkinitfs/lib/libssl.so.3 differ > Files initramfs/sbin/apk and mkinitfs/sbin/apk differ > > > > Because creating a new initramfs is part of the update-kernel script, upd= ating the kernel fixes the issue as well. > > https://wiki.alpinelinux.org/wiki/Diskless_Mode#Upgrading_a_Diskless_Syst= em > > > > > > > > > > > > > > BR > > > > > > > Norbert > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >