From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4BF8F59CAF for ; Sun, 10 Apr 2016 11:32:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 274E821C082; Sun, 10 Apr 2016 11:32:18 +0000 (UTC) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3B46D21C062 for ; Sun, 10 Apr 2016 11:32:17 +0000 (UTC) Received: by mail-io0-f177.google.com with SMTP id g185so178277486ioa.2 for ; Sun, 10 Apr 2016 04:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to; bh=9ogeP/f0sWSXBLFCXYRxz/9LFAiP0tPzlqIayF03TpQ=; b=YUoJknmSD2a+mtsV2YQOaQGGRODGTzgMm8htkn0Rvft+lm1nPSBt9yc5TPz+ZkeVqn 2S94jJe7gfBjD5LuYmJmgKCI4PSf6tsyqUNI/TcFPSRfrpaQcPylFvQ6ytrmgRUoIGXz 2dRJantNs58JhOOijol9UXNA9C4vgRB3eTUyfgXu1vyR12/3pILgMc561TjaUg7wW22Z aSay4970QZ2jb8cyKn44Z0lRvEKTE1L2JJxo+kPkhNUvRdjNsePC28zuh0uOHqDgs2os HCmXRI68h22voAdq7vDQJIveRsqO3pD+ZUrj0tCSbPuWMmlin0o8fLD8feVmbDT3+Vcj Bm/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to; bh=9ogeP/f0sWSXBLFCXYRxz/9LFAiP0tPzlqIayF03TpQ=; b=AP3CsQoCxQIRKpmsPUzJRwZFasmGFUQSkfm825z6ZHBoDG3DP6R6RWL66pgB+1Lj1o hMRszuTNbu7JJPt1ldhXjxhpBJZhn/h9+ckXU+AZ1h/zcE/ovXBvSG9jnlefqgqA/TTc 7aeebB2RBcIjgYt+s0wuUKvAy148rcFsEt55rW9ePt8qx8shg75OycxkN4QTgEi4TTIo jZFTVfL38m+yg1KT516J+xi6uMjdvseLGIxXbAm/G9/F80txlGqgBDmqq+VjIaV71GCi pofrqSbyynpNq37CXO0HepFuuzdyJFBFe+OkVWA2pYhBImaGZGRKgT562qyBRkNB6oiC mNJA== X-Gm-Message-State: AD7BkJIGF4XNzzSKaKgaiH+4wSlE75OniQgyC5sV/C4nBsIvFE6Iph28OyASCXefDt2dQjmk9yvuEoAimSZh8w== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.107.186.137 with SMTP id k131mr18121103iof.136.1460287936375; Sun, 10 Apr 2016 04:32:16 -0700 (PDT) Sender: freemanrich@gmail.com Received: by 10.64.52.72 with HTTP; Sun, 10 Apr 2016 04:32:16 -0700 (PDT) In-Reply-To: References: <57087E0D.3090502@gmail.com> <20160409160938.GA17530@waltdnes.org> <20160409171508.72be3c6e@symphony.aura-online.co.uk> <2350167.InRMqS5M8c@andromeda> Date: Sun, 10 Apr 2016 07:32:16 -0400 X-Google-Sender-Auth: H-WMcMF49hy_sm_UIX6ejNs1Hbc Message-ID: Subject: Re: [gentoo-dev] Re: usr merge From: Rich Freeman To: gentoo-dev Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: fe8f307a-e0fc-4198-88d8-0e0f852befc6 X-Archives-Hash: 23e23042aa123f59c6bc74a7f5a4db87 On Sun, Apr 10, 2016 at 5:37 AM, Duncan <1i5t5.duncan@cox.net> wrote: > > Tho with the initr*, I did go the dracut route myself. But I'm still not > entirely convinced that I wouldn't have been better off rolling my own, > as I'm still not entirely comfortable with the level to which I > understand, or more accurately don't understand, dracut. Tho I do > understand it well enough to have cut it down to the modules I need, > only, but I still don't understand the scripts at the level I know I > would had I created them myself... > Well, by this logic you ought to be writing your own kernel as well. How else are you going to deal with a kernel panic? :) Dracut is pretty straightforward though and fairly well-documented. It runs through a series of stages like detecting devices, mounting filesystems, and so on. Plugins can run at any stage, and they also can add files to the initramfs at time of creation. The advantage of using something standard is that somebody else has probably already thought of all the edge cases already, and they'll fix the bugs as well. If you contribute your plugin upstream they'll take care of it for you as well. So, you can just put one line in a config file to add /usr/bin/btrfs to your initramfs and the built-in code will figure out that you'll need /usr/lib64/liblzo2.so.2 installed there as well. Of course, that is just an example as somebody else has already written the btrfs module. I was running into some kind of strange md-raid behavior ages ago and worked around it by writing a quick module: https://rich0gentoo.wordpress.com/2012/01/21/a-quick-dracut-module/ That one is a bit of a hack - I suspect there was some underlying bug in udev or something preventing the raid from being set up by the normal module. I suspect that module would no longer be needed (I've since moved on to btrfs). However, it demonstrated how dracut plugins work - you just define hooks that get run at the appropriate phase. -- Rich