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 95730F8320A for ; Sun, 31 Mar 2019 10:18:32 +0000 (UTC) Received: by mail-vs1-f66.google.com with SMTP id d8so2776720vsp.2 for ; Sun, 31 Mar 2019 03:18:32 -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=WLGCxMaTiU3v60cNbIT38GnrP0Qff1tjiT8kuannTCU=; b=F7UmUe4ZuZ9nI5slLwrLQVCrDuGGKoI8sMn3tJxSusC8sXjsG7wHvSfabREBq5YZOw K2EKMKFIOeDifaZxS6BB8cKwXNFxZp4kBAD1q8OM/KCJGPce6UOWfHEQDfLG1RKT+s43 ufnWvVraxM1oFff9qoT7ZLsnQTS6C3thK2RytX+CAJikg5XFtkD/jOsbKLOIdFRwNJgc 7FH2ZlwkdTTkQIDh3cLSKPUJEIhRpbWU2ngzgJweDCIv/Pqfi8Eeu2EeasEVRQBKYwYg fHzgjRtDRsg5vC6DNc3iXOuHrnUV1eMqD54qnKyLLwoR40rvAKCuiNK0qwTp/LMaeROm 4QVw== 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=WLGCxMaTiU3v60cNbIT38GnrP0Qff1tjiT8kuannTCU=; b=r0X9x2EhlV5vnsQJOSTEWYo2pwejXrqSIORnsKry/Q4l6b46HOWM7Ek+5GLwkVTxYK seo9mTpQbTHrmZzIa6DwGA7NYnxuYo7aZ/ArNF0+T/n88s2ImgIR1NLrv9TYsFOQ4Vty szzdkd25pFgOEIYVT6aAylHVBaKgWYIaUOqNNXZFNwl9s3eB/teo493Ixewlm8Lf5ZG0 i+z43rxuEtOhjbgCwHVXYKZAWTP7wpBz1+Qm98ecS2XAEt/k82ughZzPd/FC8plOcfzj Eh+gz6A5Qd2HV9qK++rx74O27dy018CTQX8NxuxgPd3mDkPg45XRztNSzWd+UuYaB2sq vW3A== X-Gm-Message-State: APjAAAVj3sbigLgckTZ2YF7e6I9b/SyGRrVmZ0UVq2mmy0bqs+AM5dor efQVGrZLOxCxPgwW4QjZjlEu8Vf3EFS90wRp1STL2g== X-Google-Smtp-Source: APXvYqxxuK5DMjhDCtM2FwctDztwVgXHlV0IXk8RgqSXqQFlsyFKEBeT+T2rR3dSIrBv6Z5zCbuVSQOPeAR33+3K1yU= X-Received: by 2002:a67:8c42:: with SMTP id o63mr2482561vsd.160.1554027512115; Sun, 31 Mar 2019 03:18:32 -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:16:03 +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 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 wro= te: > > > > 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 (if > > > 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 loaded. > 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 `apk > > > --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 bit > > boot USB and the entire install is 64 bit after that. Without the > > --print-arch logic it would error because it wouldnt find the packages. > 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. --=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 ---