public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Mair-Keimberger <m.mairkeimberger@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] difficulties with lvm2+systemd+grub2
Date: Wed, 12 Nov 2014 10:42:28 +0100	[thread overview]
Message-ID: <20141112094228.GD25089@getafix> (raw)
In-Reply-To: <20141112010303.GA14293@nemesis>

[-- Attachment #1: Type: text/plain, Size: 4134 bytes --]

On Wed, Nov 12, 2014 at 12:03:04PM +1100, wraeth@wraeth.id.au wrote:
> 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.
> 
Thanks for the detailed explanation.
I wasn't specific enough on the genkernel part. I already used
genkernel-next for generating the initramfs (which doesn't boot).
However i'll give dracut a try, I guess if it works i still can extract
dracut's initramfs and see what exaclty it does in order to boot with
systemd. Maybe i could adopt that to my custom one as well.


> 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.

Thanks, thats something i could try as well :)

> 
> > 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.

Yeah, now i was digging a bit further into static binaries. If I insert the
relevant libaries it should work too. :)
However i was wondering why lvm2 shouldn't be able to build with the
static flag on systemd. However that's not important any more, i'm just
curious :)
> 
> > 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.

Well, at the wiki it's written you should run:
genkernel --udev --lvm
in order to generate the initramfs. But, you already mentioned it, you
need a target in order generate anything, but it isn't mentioned at the
wiki.
As i'm not familar with genkernel i was a bit confused about the
command. I would suggest following for example:
genkernel --udev --lvm [target]
> 
> Hopefully some of this will help clear things up a little.

Yes, of course. Many thanks :)
> 
> Cheers.
> -- 
> wraeth <wraeth@wraeth.id.au>
> GnuPG Key: B2D9F759

-- 
greetings
Michael Mair-Keimberger

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-11-12  9:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 20:56 [gentoo-user] difficulties with lvm2+systemd+grub2 Michael Mair-Keimberger
2014-11-11 21:44 ` Stefan G. Weichinger
2014-11-12  8:22   ` Michael Mair-Keimberger
2014-11-11 21:47 ` Jc García
2014-11-12  8:25   ` Michael Mair-Keimberger
2014-11-11 22:13 ` covici
2014-11-12  9:47   ` Michael Mair-Keimberger
2014-11-12 10:19     ` Stefan G. Weichinger
2014-11-12 11:44     ` covici
2014-11-12  1:03 ` wraeth
2014-11-12  9:42   ` Michael Mair-Keimberger [this message]
2014-11-12 10:07     ` Sam Jorna
2014-11-12 10:20       ` Stefan G. Weichinger
2014-11-14 18:43         ` Michael Mair-Keimberger
2014-11-16  1:21           ` wraeth
2014-11-17 20:39             ` Michael Mair-Keimberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141112094228.GD25089@getafix \
    --to=m.mairkeimberger@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox