Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail when probing root fs with btrfs #193

Open
dorileo opened this issue Nov 15, 2019 · 1 comment
Open

fail when probing root fs with btrfs #193

dorileo opened this issue Nov 15, 2019 · 1 comment

Comments

@dorileo
Copy link
Contributor

dorileo commented Nov 15, 2019

When the root fs is a btrfs volume c-b-m will fail to probe it.

cbm_probe_path() will call cbm_devnode_to_devpath(), there we assert the major number and assume it should be greater than 0, but in the case of btrfs the major will be always 0 (due its pseudo-fs nature). We must implement an alternate case when we realize we're dealing with btrfs.

@dorileo
Copy link
Contributor Author

dorileo commented Jan 31, 2020

Potentially duplicated with #61

silkeh added a commit to silkeh/clr-boot-manager that referenced this issue Jul 4, 2020
Calling stat() on some filesystems, like Btrfs,
results in a dev_t with no relation to the backing device(s),
and subsequent failure to detect the root fs.

Add support such filesystems by retrieving the block device from
`/proc/self/mounts` and working on from there.

Resolves clearlinux#61, clearlinux#182 and clearlinux#193.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant