From: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] lvm2 seems to require systemd
Date: Mon, 22 Jul 2024 09:58:08 +0200 [thread overview]
Message-ID: <53a5f1f2-515b-41a0-97e8-64ada35a8d17@mind.be> (raw)
In-Reply-To: <trinity-6ec563fa-da3b-425d-9184-a34393e6d9b5-1721504982908@3c-app-gmx-bs02>
Hi Frank,
On 20/07/2024 21:49, Frank Wunderlich via buildroot wrote:
> Hi
>
> in the meantime i tried to add systemd (which i want to avoid due to size and complexity)
>
> BR2_PACKAGE_SYSTEMD=y
> BR2_INIT_SYSTEMD=y
>
> but hang on this:
>
> Found CMake: /media/data_ext/git/buildroot/output/per-package/systemd/host/bin/cmake (3.28.3)
> Run-time dependency libbpf found: NO (tried pkgconfig and cmake)
> Run-time dependency mount found: NO (tried pkgconfig and cmake)
>
> output/build/systemd-254.13/meson.build:1188:11: ERROR: Dependency "mount" not found, tried pkgconfig and cmake
This smells like you changed the config and didn't do a clean rebuild. systemd
selects some sub-options of util-linux, and in your first build, those weren't
enabled. You can probably fix it with 'make util-linux-dirclean; make'. But just
to be safe, 'make clean; make' is better.
> tried installing libmount-dev pkgconf-bin libbpf-dev on my building-machine without success
>
> also tried without BR2_INIT_SYSTEMD, which compiles good, but the error below is on running bootup (before login)
> so i guess i need systemd as init, but maybe i'm wrong
>
> regards Frank
>
>
>> Gesendet: Samstag, 20. Juli 2024 um 14:34 Uhr
>> Von: "Frank Wunderlich" <frank-w@public-files.de>
>> An: buildroot@buildroot.org
>> Betreff: lvm2 seems to require systemd
>>
>> Hi,
>>
>> i try to build a buildroot (2024.05) initrd with lvm2 support
>>
>> so basicly added these options:
>>
>> #to select BR2_PACKAGE_HAS_UDEV
>> BR2_PACKAGE_EUDEV=y
>> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
>> BR2_PACKAGE_LIBBLOCKDEV=y
>> BR2_PACKAGE_LVM2=y
>>
>> build is fine, but i see this while bootup:
>>
>> [ 3.665010] udevd[1520]: failed to execute '/usr/bin/systemd-run' '/usr/bin/systemd-run --no-block --property DefaultDependencies=
>> no --unit lvm-activate-vg-nvme /usr/sbin/lvm vgchange -aay --autoactivation event vg-nvme': No such file or directory
I guess the udev rule for lvm2 is systemd-specific... You will have to either
re-write the udev rule, or write an init script, to do the equivalent if systemd
is not enabled. Look in the lvm-activate-vg-nvme systemd unit and rewrite that
logic in a shell script.
You can add these udev rules and scripts to the lvm2 package and install them
with the LVM2_INSTALL_INIT_SYSV variable [1].
Regards,
Arnout
[1] https://buildroot.org/downloads/manual/manual.html#generic-package-reference
>> done
>>
>> i see the physical volume, but logical volumes are disabled
>>
>> # pvscan
>> PV /dev/nvme0n1p5 VG vg-nvme lvm2 [<1.79 TiB / <1.78 TiB free]
>> Total: 1 [<1.79 TiB] / in use: 1 [<1.79 TiB] / in no VG: 0 [0 ]
>> # vgscan
>> Found volume group "vg-nvme" using metadata type lvm2
>> # lvscan
>> inactive '/dev/vg-nvme/var' [10.00 GiB] inherit
>>
>> and so i cannot mount the logical volume
>>
>> # mount /dev/vg-nvme/var /mnt
>> [ 281.006375] /dev/vg-nvme/var: Can't lookup blockdev
>> [ 281.011279] /dev/vg-nvme/var: Can't lookup blockdev
>> [ 281.016202] /dev/vg-nvme/var: Can't lookup blockdev
>> [ 281.021080] /dev/vg-nvme/var: Can't lookup blockdev
>> mount: mounting /dev/vg-nvme/var on /mnt failed: No such file or directory
>>
>> any ideas?
>>
>> regards Frank
>>
>>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-07-22 7:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 12:34 [Buildroot] lvm2 seems to require systemd Frank Wunderlich via buildroot
2024-07-20 19:49 ` Frank Wunderlich via buildroot
2024-07-22 7:58 ` Arnout Vandecappelle via buildroot [this message]
[not found] <mailman.12142.1721505316.24059.buildroot@buildroot.org>
2024-07-21 9:17 ` Andreas Ziegler
2024-07-21 9:54 ` Frank Wunderlich via buildroot
2024-07-21 10:16 ` Andreas Ziegler
2024-07-21 15:50 ` Frank Wunderlich via buildroot
2024-07-21 17:58 ` Andreas Ziegler
2024-07-21 19:37 ` Frank Wunderlich via buildroot
2024-07-22 5:15 ` Andreas Ziegler
2024-07-30 9:50 ` Frank Wunderlich via buildroot
2024-07-30 11:39 ` Andreas Ziegler
2024-07-30 15:49 ` Frank Wunderlich via buildroot
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=53a5f1f2-515b-41a0-97e8-64ada35a8d17@mind.be \
--to=buildroot@buildroot.org \
--cc=arnout@mind.be \
--cc=frank-w@public-files.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.