Received: from mail-ua1-x931.google.com (mail-ua1-x931.google.com [IPv6:2607:f8b0:4864:20::931]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id CA0AF2236C1 for <~alpine/users@lists.alpinelinux.org>; Tue, 17 Jan 2023 14:23:16 +0000 (UTC) Received: by mail-ua1-x931.google.com with SMTP id f26so7529092uab.2 for <~alpine/users@lists.alpinelinux.org>; Tue, 17 Jan 2023 06:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=ZZIpR3mOIw9/oFdN/PIn6Yt/UOOTG794x93LxXilEX0=; b=AYQF+H3aDhcT010TXRAq+ICnJbp33mMIW4ELcu7umicMWWYkhMr+pWOIc3/7W1QuTJ K0EakiA1Cw/2K7YTalhhtoc5vCmi6SHpGr4gZbjLHKE4Szu7EVbHwk5wioyXQoLFTfxy 94+BJCRFpy+oc6BFlr2eK2Q0hTjPC2Uzvi6MMpYLTBhQXbKvgb2ZfG3Tr0NKiYfRfBt5 +8H4RxVhfvUxlndzmn35PrMR4TogAnfdvfth2HTkuqSCVx4ip7UfhtoTsponlh77UlQd FN+k9euwc3HeuCabj3IFVZW9WSMxot4fvsPosd8VNWUOmCbV58rh5SPA+VCFqYRFc3Xy DwaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ZZIpR3mOIw9/oFdN/PIn6Yt/UOOTG794x93LxXilEX0=; b=hUomP58Ua1OYz3dXYipZk4xgCfXLRvRjn7egrRmBulF2b5o9JQiQSXF7aZI2+1OXpv RTWerGz4BYpGFcxfgbJ6JbFu0jIEUpTxy6QLuelqgpMihYZT7rMiTEhgEJ7ahX6Z5XIf 5Q68lhcWljc/JGnIkUiYm2srq1yFfpYDV9kcR4I8BVm3w9qendO2iv4Cp/0Hb/e4NOCk MgonzkpfCzKPDiC4ZsXHMmDIyX2qOk8LW2dODKJcfe+jw1CSSY7/t67djOa9/IufC5NC /5kV04m8uV5gOBECgpvvBMic+YVIZTmMxjoBCdMCohb4CulEX8IBeIwrx6Qc0KnaFEqU WSZw== X-Gm-Message-State: AFqh2kqSxsui7N5nG6O8z8y2cy5wweQe+GsUHJmRqXYUACOLdnEwa9K3 nSLNXZCHF+V0OTiSTE0ou9YbC1WKTo7hjjxXGTc= X-Google-Smtp-Source: AMrXdXur5wJhdA2I4cGKiRZ4YcDJoTN7+V5KQnE8iEmx7fOR53ij9/BeCLrw/LUnLGGHamw2e07e2LT7z4J2peJ34gk= X-Received: by 2002:ab0:7499:0:b0:578:6e51:4c9b with SMTP id n25-20020ab07499000000b005786e514c9bmr337985uap.64.1673965394522; Tue, 17 Jan 2023 06:23:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Konstantin Kulikov Date: Tue, 17 Jan 2023 17:23:02 +0300 Message-ID: Subject: Re: loading an apkovl from an external USB stick To: Unicorn Cc: ~alpine/users@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable nlplug-findfs: found apkovl /media/mmcblk0p1/alpine.apkovl.tar.gz nlplug-findfs: FOUND! setting timeout to 0 ... nlplug-findfs: exit due to timeout (0) Try removing apkovl from mmc and increasing timeout "usbdelay=3D10" On Tue, Jan 17, 2023 at 1:40 PM Unicorn wrote: > > Thank you Konstantin for these pointers! > > The code is indeed too hard for me to understand at a glance, so I > examined the debug output first. The first thing that I noticed is that > there is absolutely no mention of the sda or sda1 device in the entire > process, so I assume that the device either does not get recognized or > it gets ignored for some reason. > > I looked for anything related to USB and found that nlplug-findfs does > look for USB devices in /sys/bus/usb/devices: > > "nlplug-findfs: trigger_thread: scanning /sys/bus/usb/devices" > > However while other things like the microSD card mmcblk0, the internal > eMMC mmcblk1 and the SPI flash are found, the sda device never appears. > Could this be a driver issue perhaps? > > Here is the full boot output for anybody interested to help: > https://paste.debian.net/hidden/04716725/ > > Best, > Edin > > On Tue Jan 17, 2023 at 6:44 AM CET, Konstantin Kulikov wrote: > > initramfs-init calls nlplugfs[0] which finds apkovls on disks. Its > > code[1] is a bit hard to understand, but it has many debug statements > > so try to add "debug_init=3D1" to kernel cmdline and continue from > > there. > > > > [0]: https://git.alpinelinux.org/mkinitfs/tree/initramfs-init.in#n581 > > [1]: https://git.alpinelinux.org/mkinitfs/tree/nlplug-findfs/nlplug-fin= dfs.c > > > > On Sun, Jan 15, 2023 at 11:21 PM Unicorn wrote: > > > > > > Hello, > > > > > > I am trying to learn to make proper use of the power of lbu and apkov= l with my ARM SBC, but I am confused by a few things here. > > > Firstly, the "apkovl" kernel cmdline option is quite poorly documente= d, at least I could only find one somewhat complete documentation in the wi= ki, in the PXE boot article [0]. However I do not seem to be able to get on= e of the mentioned formats to work. > > > > > > A bit of background: I have the generic ARM archive extracted to mmcb= lk0p1, so it boots from that partition. I then tried to save/load the apkov= l file from the second partition, mmcblk0p2. I was able to achieve this wit= h the following kernel cmdline option: > > > apkovl=3D/media/mmcblk0p2/myhostname.apkovl.tar.gz > > > > > > I assume that this only works because the partition is automatically = mounted there at boot. If somebody can also explain what determines which p= artitions get automatically mounted, please enlighten me, because this is a= lready quite confusing to me. :) > > > > > > Now I tried to save/load the apkovl from an external USB stick on the= sda1 partition. I noticed that this partition does NOT get automatically m= ounted in /media/, so the previous solution does not work. However the othe= r formats that are mentioned in the abovementioned article [0] also do not = work. I tried the following: > > > apkovl=3Dsda1 > > > apkovl=3Dsda1:vfat:/myhostname.apkovl.tar.gz > > > apkovl=3Dsda1:vfat:myhostname.apkovl.tar.gz > > > apkovl=3Dsda1:myhostname.apkovl.tar.gz > > > > > > These should work according to the explanation on that page, but do n= ot. > > > > > > I asked on IRC and ikke linked the code of the initramfs-init.in file= of mkinitfs to me [1], however I do not see support for this syntax in tha= t file. So either the wiki is wrong here, or this is already handled by som= ething else before the $KOPT_apkovl variable gets used by the script. > > > > > > I would really appreciate advice on how the automatic mounting of par= titions in /media/ actually works and how the apkovl option is correctly us= ed. I'll happily contribute my learnings back to the wiki. :) > > > > > > Thanks, > > > Edin > > > > > > [0] https://wiki.alpinelinux.org/wiki/PXE_boot > > > [1] https://gitlab.alpinelinux.org/alpine/mkinitfs/-/blob/master/init= ramfs-init.in#L42 >