[Libguestfs] libguestfs question - multiple partitions in the guest

Shawn Kennedy Shawn.Kennedy at alcatel-lucent.com
Wed Aug 1 20:38:51 UTC 2012


> -----Original Message-----
> From: libguestfs-bounces at redhat.com [mailto:libguestfs-bounces at redhat.com] On Behalf Of Shawn Kennedy
> Sent: Wednesday, August 01, 2012 3:34 PM
> To: libguestfs at redhat.com
> Cc: 'Smudde, Mark Alan (Mark)'; 'Tockstein, James E (Jim)'
> Subject: Re: [Libguestfs] libguestfs question - multiple partitions in the guest
> 
> > On Wed, Aug 01, 2012 at 08:54:01PM +0100, Richard W.M. Jones wrote:
> > > (1) You could look at tell-tale signs to see which root device has
> > > most recently been mounted.  Probably the simplest thing is to look at
> > > the date of /var/log/messages in each potential root, and choose the
> > > most recent one (since /var/log/messages is reliably and frequently
> > > updated when a guest boots and runs).
> >
> > As in the attached program.
> 
> Neat!!  I just looked at it - very nice!!  We will give it a try
> and report our findings!  If it does work, we will have to convert
> it to Python (preferred).


Success!!

# ./mostrecent.pl /storage/images/guest.img
Youngest root filesystem is: /dev/VG1/LV0002.root

With that knowledge, we can then mount (ro) the right mount point
and inspect further!  

Thank you again!
Shawn




More information about the Libguestfs mailing list