X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from ncopa-desktop.nor.wtbts.net (3.203.202.84.customer.cdi.no [84.202.203.3]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nc@alpinelinux.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id 5AE27DC19A1; Mon, 5 Mar 2012 08:45:57 +0000 (UTC) Date: Mon, 5 Mar 2012 09:45:54 +0100 From: Natanael Copa To: lists+alpine-devel@jimpryor.net Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] Understanding alpine-setup Message-ID: <20120305094554.23727d3c@ncopa-desktop.nor.wtbts.net> In-Reply-To: <1330852060.31716.140661044540177@webmail.messagingengine.com> References: <1330852060.31716.140661044540177@webmail.messagingengine.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; x86_64-unknown-linux-gnu) 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 Sun, 04 Mar 2012 04:07:40 -0500 lists+alpine-devel@jimpryor.net wrote: > Hi, I recently discovered Alpine, and it looks great! --- like most of > what I'd been hankering for when dissatisfied with Arch or FreeBSD. > I've tried it out on a test system and am eager to start using it in > earnest. > > I'm trying to do a somewhat custom install (onto a pre-partitioned > LVM-over-luks drive), and thought I should read through the setup > scripts to see what's going on. There's only the thinnest of > information available on the Wiki. (Only for LVM, not for luks, and > not for LVM during installation.) The setup-disk script does the install-to-disk part. It was meant as a quick way to install the system on disk. It does not yet give all the flexibility you would expect from a modern distro. It does allow you create the partitions manually though. Run setup-alpine and on quesion on disk you selece "none"/"no" etc. Create the raid,LVM devices you want and mount up the dir structure on some temp dir. For example /myroot. Finally you run setup-disk with the mounted root as arg. For example: setup-disk /myroot It should be able to figure out raid and lvm. How it handles luks i don't know. > But it looks like the installation scripts are either using some very > subtle tricks or are very much works in progress. I thought I had > better start asking questions. The scripts grew out from "let-me-get this sytem run from ram quickly" and have organically grown out from there. > > In setup-alpine: > > 1. The "-q" option is parsed but not documented in usage. > Intentionally? No. I have always wanted it to give me a minimal running system asap rather than ask about all kinds of different things the user might or might not want. People sent patches to setup-alpine that asked lots more questions so I added the -q option. I just forgot add it the the usage output. This is now fixed. (in bb0ceedbbc533e87ae9832ca107065186ad9fae1) > 2. The "-a" option is bewildering. If I supply it, we > create a directory under /tmp and save its name in ROOT. However we > set a trap on exit to remove this directory, and never cancel the > trap. From what I've seen so far, that ROOT directory is never copied > anywhere else, right? So this functionality doesn't yet work? Also, > the ROOT variable isn't exported, so I don't see how the subroutine > scripts like setup-{hostname,interfaces,keymap} expect to have it > populated. Is all of this just under construction? heh... I look at the commits. from 2006... The idea was that you could run setup-alpine on any box and spit out a configuration file (.apkovl.tar.gz) that you used other places. Seems like I never completed that to work fully and, actually nobody has ever asked for that functionality. I wonder if we can just remove that since I think it will never be used anyways? > 3. And if I don't supply the "-a" option, then setup-alpine sets > PKGADD="apk add"; but then so far as I can see, PKGADD is never again > referenced in any of the setup-* scripts. I wonder if the PKGADD variable has its origins from the time when we didn't even have decided what package manager we would land on. I think the idea was that we could test different package managers. This is something that could go away. > That's what puzzles me so far. Still reading... Thanks for your feedback! I have been thinking of rewriting the setup-* scripts in lua. There have been need for unattended installs and better setup-disk script. There was some unattended patches that i let in but I'm not 100% happy with that implementation (and have personally neer used it). The idea is that you could provide a file with all or parts of the info and only get prompted of the missing stuff. I even had a proof of concept for ACF at some point but ACF development took other direction. Currently it appears clumsy to use ACF backend as its heavily web centric. Anyways... The reason that I haven't put more effort in cleaning up the setup-* scripts is that I think the long time solution is to make something in Lua. I just have not had the time to actually implement it yet. -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---