Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id E9BCF2231D1 for <~alpine/users@lists.alpinelinux.org>; Tue, 17 Jan 2023 05:44:51 +0000 (UTC) Received: by mail-vs1-xe2b.google.com with SMTP id k6so22232467vsk.1 for <~alpine/users@lists.alpinelinux.org>; Mon, 16 Jan 2023 21:44:51 -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=04JQKMuZVm/KmLtMNA+DvXPfz7xJd3FIVjB0t7XmmM4=; b=XeGOqQDUmGnk3YAVIqZXKpbsvkFaqVYFIyh5js6sAfva5nrt391ae57z3ZNDHHLbsy bju0LLtYTlFX2x4OXPDtJVhVSNKSxCC/JZ6yEyFTJvcBUv++Mxa+u+RFDNgbA8Wntl7Z GZi9DW+ft3DPBkPi+JNL4I+/Ym/lWb52TZ36rbssjznYxpYvnnT8rq87dwjCkk5UN8XU nENxEqpWZt3zEm0NDu5ddZHPXfcvniazyFr5bT7kXIkrXsJyTpNt+OtlcsCzCCy5iDN9 m78XsUHMdosB3sTdPZ8GXsdeODx/gn8xpfymQL6jSbkDfCzDwdeVS2YB88FVySabZFMQ CS8g== 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=04JQKMuZVm/KmLtMNA+DvXPfz7xJd3FIVjB0t7XmmM4=; b=1+NpEjy0PTAFJ/9GCuYxacVG1+H2vxIFI0mB16H/u6nePZKiHsPgkgUKuKnWFiqtk6 N8fsIRByDvBlHDU4A6OVs6pBZblGYgtzf+nVztB3A5ZLjFvXEHfQ19H/Q2q77q2ZNPwl ktxNA7tKzWiSsyF8v7GzeYGFfKf/tjrxGWA7yfak3EoNVzcZfm9RG9PsuTWhsVcspimc woFgns1dcmpz0VcJUjdx78V4KwuVP2YVaUGLvGYTrfvajigTYArP+to3ovw02D7JfQJE 2xngQzFdCSEOQdHLrwVXK1MdmFEeVHeYDksstj0jlDntkdyN8w5cb35MZuCcHvE7Lj1a YnHw== X-Gm-Message-State: AFqh2kpKtrNHbCmTYTEaRevXzJlQskRS+VS6WaMiATwEadKgH0v2HY66 HMuhbM1jpQItpPHfyqxKpN4CwQMpzF1JuYzWLk9b/6SkgLQ= X-Google-Smtp-Source: AMrXdXtgnBecpHNNOl4K1JKZcQQnsG8npMV1532uhhUusIrz6GaVeHDhin9cdVEqk67l+BSA2ReQCd/VbDk5vj+6VlM= X-Received: by 2002:a67:17c7:0:b0:3d3:ef73:b726 with SMTP id 190-20020a6717c7000000b003d3ef73b726mr237923vsx.22.1673934288140; Mon, 16 Jan 2023 21:44:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Konstantin Kulikov Date: Tue, 17 Jan 2023 08:44:37 +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 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-findfs.= 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 apkovl wi= th my ARM SBC, but I am confused by a few things here. > Firstly, the "apkovl" kernel cmdline option is quite poorly documented, a= t least I could only find one somewhat complete documentation in the wiki, = in the PXE boot article [0]. However I do not seem to be able to get one of= the mentioned formats to work. > > A bit of background: I have the generic ARM archive extracted to mmcblk0p= 1, so it boots from that partition. I then tried to save/load the apkovl fi= le from the second partition, mmcblk0p2. I was able to achieve this with th= e following kernel cmdline option: > apkovl=3D/media/mmcblk0p2/myhostname.apkovl.tar.gz > > I assume that this only works because the partition is automatically moun= ted there at boot. If somebody can also explain what determines which parti= tions get automatically mounted, please enlighten me, because this is alrea= dy quite confusing to me. :) > > Now I tried to save/load the apkovl from an external USB stick on the sda= 1 partition. I noticed that this partition does NOT get automatically mount= ed in /media/, so the previous solution does not work. However the other fo= rmats 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 not. > > 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 that fi= le. So either the wiki is wrong here, or this is already handled by somethi= ng else before the $KOPT_apkovl variable gets used by the script. > > I would really appreciate advice on how the automatic mounting of partiti= ons in /media/ actually works and how the apkovl option is correctly used. = 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/initramf= s-init.in#L42