Bug 1197407
| Summary: | libguestfs fails to find root | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | William Brown <william> | ||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.1 | CC: | ptoscano | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-03-02 09:15:43 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
William Brown
2015-03-01 01:38:36 UTC
/* Linux root? */
else if (is_dir_etc &&
(is_dir_bin ||
(guestfs_is_symlink (g, "/bin") > 0 &&
guestfs_is_dir (g, "/usr/bin") > 0)) &&
guestfs_is_file (g, "/etc/fstab") > 0) {
fs->is_root = 1;
fs->format = OS_FORMAT_INSTALLED;
if (guestfs___check_linux_root (g, fs) == -1)
return -1;
}
src/inspect-fs.c
Because /usr is seperate, /usr/bin is dir will never be satisfied.
Perhaps just check that /usr is a directory instead?
As a work around, you can boot a guest with rd.break rd.shell and run umount /sysroot/usr/ remount -o rw,remount /sysroot mkdir /sysroot/usr/bin sync remount -o ro,remount /sysroot reboot This is enough to pass the check for root_lv to pass as the root, then the tools will mount /usr anyway and everything works. This is the same as the problem that inspection doesn't work when /usr is on a separate partition. Therefore marking as duplicate. *** This bug has been marked as a duplicate of bug 1186935 *** |