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 D25B0F81633 for ; Fri, 29 Mar 2019 18:47:54 +0000 (UTC) Received: by mail-vs1-f66.google.com with SMTP id f22so1900922vso.7 for ; Fri, 29 Mar 2019 11:47:54 -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=RoCrG9SvHk2ug0tVlSLNqwp42O1ZHEikqavKaGcug4Y=; b=sCG5PYWqh8lsAENp2MS+aRya+w3iTxMRlW2w/EEt106ugvPs4bstJflGvSJU1Xdryu dqSHjVWPbC0N3cL1qTmiPSh/X1YsNFgHDzKBkCUHL9RjHTpAq3v52MnE1Kp8gq6TZB/G GvBQYa+WiUYBSL+M/Puyxm64QopEIpafs4Xhpz6hm6+hwljsEBO43vLN3u7bknoH3IhL /ea0JdCAqAbPYGQSepEWNjXxTvWXI/z8HzYb+WiwEFSVODW4j3s591LnWIC1fU4F6dJr CXGNjiwZrJpeC4icSn3mZl5HLSS8blyXhGBaByGRZOkEv5d2vK8ejSwNSveD3bE0kOJI IzlQ== 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=RoCrG9SvHk2ug0tVlSLNqwp42O1ZHEikqavKaGcug4Y=; b=e5kLsmYOYbInqqQQXlk57FmzPCS1jXxQpcfGEbJzRZ1T+GIOt6w5ePAHzf2Q3VIwnO 9G1bYjq5a4YBsIYg/pj5H3lU3xZYyBj0th+VNcdWFWZw//2yqZ1Czs58/9+h8WWp7Dmq eMN5Q3iOZmN8fozMg2G3zpYbNnUq5TloTna95uueWNsO1hPTPHoxvsd+I2W6DDj1XpI7 WVm9cmLbxPTrSd4kyhfWdx0SNq7t6ochxNW7H/DbCUv0gbhHxkyTtOIu62OJSlGYrPeu fqaF1X1f0NIIPuHYjrMbAvPkg8DW9eFKfX8Q8IGlGsdQhl1PV2OIIwrwXadLve3Xgyn5 WICA== X-Gm-Message-State: APjAAAUk8MsT0GfD6pi+6TG4V+n2Zoa+LLQKFETBwXhBQA035SexThkT OpWFPvXyhMr9hRYJbYiBhTBIBdL5Ss9vEvEhDIQ+ng== X-Google-Smtp-Source: APXvYqx+dqAEDytAk8cfd0ZcRQ4pg2brTeReaFZNz90b5enHMIbYym/SvxePgyXIUY4Isi573ik6iBLEt/AgfpJzvwg= X-Received: by 2002:a67:8e06:: with SMTP id q6mr31039418vsd.199.1553885274261; Fri, 29 Mar 2019 11:47:54 -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: <20190329193404.4f816188@ncopa-desktop.copa.dup.pw> From: Magicloud Magiclouds Date: Sat, 30 Mar 2019 02:45:27 +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 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 wrote= : > > 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. > > > --=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 ---