1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

3 Commits

Author SHA1 Message Date
Yu Watanabe
c19f1cc9a5 test: add regression tests for find_esp() and friend 2023-04-19 04:04:57 +09:00
Lennart Poettering
c56be2c294 bootctl: add new --print-root-device option
We already have this nice code in system that determines the block
device backing the root file system, but it's only used internally in
systemd-gpt-generator. Let's make this more accessible and expose it
directly in bootctl.

It doesn't fit immediately into the topic of bootctl, but I think it's
close enough and behaves very similar to the existing "bootctl
--print-boot-path" and "--print-esp-path" tools.

If --print-root-device (or -R) is specified once, will show the block device
backing the root fs, and if specified twice (probably easier: -RR) it
will show the whole block device that block device belongs to in case it
is a partition block device.

Suggested use:

        # cfdisk `bootctl -RR`

To get access to the partition table, behind the OS install, for
whatever it might be.
2023-02-21 18:19:38 +01:00
Zbigniew Jędrzejewski-Szmek
50f2c32cd5 tests: add a simple test that bootctl output is valid json
python's json.tool module is used because it does validation. jq is more forgiving.
Also, json is in the stdlib, so it should be always available.
2022-12-01 18:01:00 +01:00