X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com [209.85.217.66]) by lists.alpinelinux.org (Postfix) with ESMTP id 9E7C6F84D08 for ; Sun, 31 Mar 2019 10:47:07 +0000 (UTC) Received: by mail-vs1-f66.google.com with SMTP id e2so3109912vsc.13 for ; Sun, 31 Mar 2019 03:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=r9oAX1148PA4XzCHql9dybTo6/vLbfx09NrHCivOX80=; b=leE8cdUaWIaLdz52Y2g4Ibc11tgUWK0SCK9Rkl3sKrNybndxAs/lljCm+5piwPpMf9 3qhC/LCMT1V6+sTqu3b/sk+Ixv5mf38f4It3fsj9fkEl1JCrTyk813Z+ZZAD93eMWJHS a3SYkMzMk+vPGHT6Y5Sw2S9QF1TaGrPg4qu6g+PFa8CcXbkMdwdeFcgYisPbx99hKyjF nv7iEQpuqyYG2549MTK9qmDNi2QsLjWxqBAhxTDg/NEYcKvZrvHvYT4cl2H4gziul/UI JWBi9G1Ida3uwkXpE6OjsnnUr88Xqdh3mczsDqhnRffvGYvRrGI57O3g6ib9dPb90Rpz SIbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=r9oAX1148PA4XzCHql9dybTo6/vLbfx09NrHCivOX80=; b=HPjC/85LqSq1TIaDUbOo/qjnPW2yVc3zHKZXQaR6MLm3qPThE7evHblktP57xlgd7P ZCE7+OfrD2tdclku2bUU1XpuURJ1FU4Byc5tkW+Sm5BKMrphKFlXXDuJXAmgWplZIgm3 Lt8b7xxXfLQ/nAtLJUlW6l3AiTwuYvHN/YhGhDNA6mBXUxt7WEkf90ByNmT1sso4xP52 cqRxC0qvTbKM0ohy8AwDCshrZ6VpxI07HNZyMiTc3SjeWcEqCxTRCfJwuyRz2lw8c0pE vacJ4UAYr1PAwFBhjNw6Ff6l7hUiZLJWU5a451uDvq/UOPs4kmXY4nK47cLdwcVMrpC3 eTHQ== X-Gm-Message-State: APjAAAUSg51EKKTab5xdwMbaNIgrYG7+YK0sN/mOd+zfXgKMxdM+8wQt YuMc3P3aSwjqS5sm8fNolX9VSrg8dafZ5ygaC1OWXg== X-Google-Smtp-Source: APXvYqxAJC07FOqYcnwnyjif97QluHCnOr+WGx8bKoCg+NRUGdQ91cax9N7rdgwONtkWYkwBevqIGQBXjs/njH+DD6o= X-Received: by 2002:a67:7b52:: with SMTP id w79mr35490325vsc.200.1554029227306; Sun, 31 Mar 2019 03:47:07 -0700 (PDT) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 References: <20190329193404.4f816188@ncopa-desktop.copa.dup.pw> In-Reply-To: From: Magicloud Magiclouds Date: Sun, 31 Mar 2019 18:44:38 +0800 Message-ID: Subject: Re: [alpine-devel] Some questions about initramfs-init. To: Natanael Copa Cc: alpine-devel@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable And thinking about it, I am confused on why relocate_mount so many times. There are three calls. 1. if apkovl contains fstab; 2. else if stage1 contains fstab; 3. else if packages install a fstab. But consider that there is no umount call, and move mount only occurs before switch_root. I cannot see the point of relocating them during stage1. On Sun, Mar 31, 2019 at 6:16 PM Magicloud Magiclouds wrote: > > I think I get why overwriting $repofile, it is because of the > relocate_mount. But if that, "nlplug_findfs -b" call seems non-sense. > > Also, where is $ovl_unmount defined? > > On Sat, Mar 30, 2019 at 2:45 AM Magicloud Magiclouds > wrote: > > > > Thanks. I still do not get the arch part. Detail is after the question. > > > > On Sat, Mar 30, 2019 at 2:35 AM Natanael Copa w= rote: > > > > > > On Sat, 30 Mar 2019 02:17:09 +0800 > > > Magicloud Magiclouds wrote: > > > > > > > Hi, > > > > > > > > I'd like to propose a rewrite of the initrd `init` script. Because = I > > > > think it is quite mixed up of booting logic, and missing some > > > > customization possibilities. > > > > > > > > But before that, I need to get some questions clear. In following > > > > discussion, "stage 1" means the initrd system (before switch_root), > > > > "stage 2" means the actual system end user uses (after switch_root)= . > > > > > > > > 1. Why there is a keymap setup? I cannot see the necessity of it > > > > except for fallback/single shell. > > > > > > We have support for encrypted apkovls, for "disk less" installs. You > > > may need to type the password to decrypt the configuration. > > Ah, I forgot that requirement. > > > > > > > 2. Why networking is after nlplug-findfs? Can I bring up network (i= f > > > > needed) before nlplug-findfs? > > > > > > nlplug-findfs also serves as coldplug, and enumerates all the current > > > devices so all kernel modules gets loaded. Without this there is no > > > guarantee that the network driver is automatically detected and loade= d. > > I see. > > > > > > > 3. Since nlplug-findfs already output a repofile, why there is a > > > > find_boot_repositories soon after to overwrite repofile? > > > > > > I will have to consult the source code and git log. I don't remember. > > Just FYI, from line 520, if there is no network requirement, > > nlplug-findfs (in line 528) gets the option "-b $repofile". Then in > > line 667, $repofile is overwrite by find_boot_repositories. > > > > > > > 4. Since apk works without /etc/apk/arch, why overwrite it with `ap= k > > > > --print-arch`, instead of just removing it? > > > > > > Because it was an upgrade path from 32bit x86 to 64 bit diskless > > > installs. You can simply copy an apkovl from 32 bit install to a 64 b= it > > > boot USB and the entire install is 64 bit after that. Without the > > > --print-arch logic it would error because it wouldnt find the package= s. > > I do not think I followed. > > > > I can see the following case. Say my apkovl is 32bit, so > > $sysroot/etc/apk/arch is x86 (I guess, I do not have a 32bit env to > > check). So current logic overwrites it with x86_64, so following apk > > bootstrap uses 64bit packages. > > > > But if just removing the 32bit arch file, would not apk in new boot > > USB (which contains 64 bit system) using 64bit packages by default? > > > > > > > 5. The script contains two ways of using repofile. One is using it > > > > directly as "--repositories-file", the other is joining its content > > > > with "--repository". What is the difference? > > > > > > IIRC, --repositories-file will replace the > > > default /etc/apk/repositories, while --repository will append the > > > specified repo to whatever is listed in /etc/apk/repositories > > I see. > > > > > > > > > > > > > > > > > Thanks. > > > > > > > > > > > > > -- > > =E7=AB=B9=E5=AF=86=E5=B2=82=E5=A6=A8=E6=B5=81=E6=B0=B4=E8=BF=87 > > =E5=B1=B1=E9=AB=98=E5=93=AA=E9=98=BB=E9=87=8E=E4=BA=91=E9=A3=9E > > > > And for G+, please use magiclouds#gmail.com. > > > > -- > =E7=AB=B9=E5=AF=86=E5=B2=82=E5=A6=A8=E6=B5=81=E6=B0=B4=E8=BF=87 > =E5=B1=B1=E9=AB=98=E5=93=AA=E9=98=BB=E9=87=8E=E4=BA=91=E9=A3=9E > > And for G+, please use magiclouds#gmail.com. --=20 =E7=AB=B9=E5=AF=86=E5=B2=82=E5=A6=A8=E6=B5=81=E6=B0=B4=E8=BF=87 =E5=B1=B1=E9=AB=98=E5=93=AA=E9=98=BB=E9=87=8E=E4=BA=91=E9=A3=9E And for G+, please use magiclouds#gmail.com. --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---