[Libguestfs] [PATCH] inspect: use /etc/hosts for detecting Linux root (RHBZ#1203898)

Roman Kagan rkagan at virtuozzo.com
Wed Feb 24 17:05:35 UTC 2016


On Wed, Feb 24, 2016 at 03:43:40PM +0100, Pino Toscano wrote:
> Use /etc/hosts instead of /etc/fstab to detect whether a partition
> represents the root of a Linux installation; the latter might not exist
> in smaller/special installations like Docker images.

IMHO /etc/hosts is just as unreliable as /etc/fstab.

I'd rather test for /bin/sh being present and being an ELF executable or
shared object.

Roman.




More information about the Libguestfs mailing list