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 9D66B138825 for ; Wed, 12 Nov 2014 01:03:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 914B6E094B; Wed, 12 Nov 2014 01:03:12 +0000 (UTC) Received: from mail.wraeth.id.au (wraeth.id.au [106.187.101.125]) by pigeon.gentoo.org (Postfix) with ESMTP id 45963E0941 for ; Wed, 12 Nov 2014 01:03:11 +0000 (UTC) Received: from localhost (mail.wraeth.id.au [127.0.0.1]) by mail.wraeth.id.au (Postfix) with ESMTP id 70C1C14004B for ; Wed, 12 Nov 2014 12:05:40 +1100 (AEDT) X-Virus-Scanned: amavisd-new at wraeth.id.au Received: from mail.wraeth.id.au ([127.0.0.1]) by localhost (mail.wraeth.id.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id C6_aVt3bK8HH for ; Wed, 12 Nov 2014 12:05:39 +1100 (AEDT) Received: from nemesis (unknown [103.6.188.139]) by mail.wraeth.id.au (Postfix) with ESMTPSA id 7091A140034 for ; Wed, 12 Nov 2014 12:05:38 +1100 (AEDT) Date: Wed, 12 Nov 2014 12:03:04 +1100 From: wraeth@wraeth.id.au To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] difficulties with lvm2+systemd+grub2 Message-ID: <20141112010303.GA14293@nemesis> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <20141111205608.GA7473@asterix> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <20141111205608.GA7473@asterix> User-Agent: Mutt/1.5.23 (2014-03-12) X-Archives-Salt: 0d7bf6a8-25d7-4d57-85a0-723cd52ae628 X-Archives-Hash: b4de7b7db1bdb5a199cb6d4a59eb97d0 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 11, 2014 at 09:56:09PM +0100, Michael Mair-Keimberger wrote: > Today I've started to play around with systemd but so far I couldn't get > it to boot. I've followed the how to from the gentoo wiki [1], but I > stuck somehow. I found systemd to be rather tricky to implement on some of my systems, but this was a while ago and was in a more complex configuration that you're using (though as most people are suggesting, I used dracut to generate my initrd). I would also suggest to use either dracut or genkernel-next to generate an initramfs if you wanted to go down that path. Note that sys-kernel/genkernel (as opposed to sys-kernel/genkernel-next) can have issues with systemd (the last time I tried it it complained about systemd and suggested using genkernel-next). If you would prefer a hand-rolled one, I can't offer much, but as I think has already been suggested, one key point is to call the correct binary. The systemd binary itself is /usr/lib/systemd/systemd, though calling /sbin/init may work if that's configured in such a way as to launch systemd. The other point I might add is that my system, which uses dracut, has systemd launched with some specific arguments: ps -fp 1 UID PID PPID C STIME TTY TIME CMD root 1 0 0 11:31 ? 00:00:00 /usr/lib/systemd/systemd --switched-root --system --deserialize 18 This may be relevant when creating your own initramfs. > First of all, with systemd installed I can't install lvm2 with the > static use flag anymore, which is mandatory for being able using it for > a initramfs. Why isn't that possible? How can I use the lvm binaries for > my initramfs? Again, as I think has been mentioned, the 'static' use flag is typically a shortcut for easily building an initrd. Provided you include all the dependencies of a given binary (as seen with `ldd /path/to/binary`) you don't need static binaries. > This lead me to my second question. At the wiki, the only way to create > an initramfs for systemd was with genkernel (genkernel --udev --lvm). > While the command itself is pretty useless (it's `genkernel --udev --lvm > initramfs` if you want to create the initramfs -> is this a bug??) i > also would like to use my own initramfs. I'm not sure what you mean by the command is useless and is a bug. Genkernel has multiple potential targets - 'all' for building the kernel and initrams, 'kernel' for the kernel binary and modules, 'initramfs' for just the initramfs image, etc. This command should generate an initramfs with the required components for systemd, udev and lvm. Hopefully some of this will help clear things up a little. Cheers. --=20 wraeth GnuPG Key: B2D9F759 --9amGYk9869ThD9tj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAlRisccACgkQXcRKerLZ91mQigD+M81HFLegwCc7Z72MabupldBd JYsRFraT9nwioLVx7ccA/0bKspew8ibwhr3b+R8pFutu4nK9f9FWSwAyxbaADky7 =qz66 -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--