X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by lists.alpinelinux.org (Postfix) with ESMTP id DAE52F816AF for ; Fri, 29 Mar 2019 18:34:59 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 6BF159E28DC; Fri, 29 Mar 2019 18:34:59 +0000 (UTC) Received: from ncopa-desktop.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 96E759E1EEE; Fri, 29 Mar 2019 18:34:58 +0000 (UTC) Date: Fri, 29 Mar 2019 19:34:53 +0100 From: Natanael Copa To: Magicloud Magiclouds Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] Some questions about initramfs-init. Message-ID: <20190329193404.4f816188@ncopa-desktop.copa.dup.pw> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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. > 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. > 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. > 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. > 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 > > Thanks. > --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---