A stateless system has a tmpfs as root file system. That obviously
does not have any block device associated with it. So try falling back
to the device of the /usr filesystem if the root filesystem fails.
if (r < 0)
return log_error_errno(r, "Failed to determine block device of root file system: %m");
else if (r == 0) {
- log_debug("Root file system not on a (single) block device.");
- return 0;
+ r = get_block_device("/usr", &devno);
+ if (r < 0)
+ return log_error_errno(r, "Failed to determine block device of /usr file system: %m");
+ else if (r == 0) {
+ log_debug("Neither root nor /usr file system are on a (single) block device.");
+ return 0;
+ }
}
return enumerate_partitions(devno);