[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] libguestfs question - multiple partitions in the guest



> -----Original Message-----
> From: Richard W.M. Jones [mailto:rjones redhat com]
> Sent: Wednesday, August 01, 2012 5:09 PM
> To: Shawn Kennedy
> Cc: libguestfs redhat com; 'Smudde, Mark Alan (Mark)'; 'Tockstein, James E (Jim)'
> Subject: Re: [Libguestfs] libguestfs question - multiple partitions in the guest
> 
> On Wed, Aug 01, 2012 at 05:02:28PM -0500, Shawn Kennedy wrote:
> > > -----Original Message-----
> > > From: Richard W.M. Jones [mailto:rjones redhat com]
> > > Sent: Wednesday, August 01, 2012 4:22 PM
> > > To: Shawn Kennedy
> > > Cc: libguestfs redhat com; 'Smudde, Mark Alan (Mark)'; 'Tockstein, James E (Jim)'
> > > Subject: Re: [Libguestfs] libguestfs question - multiple partitions in the guest
> > >
> > > On Wed, Aug 01, 2012 at 03:31:19PM -0500, Shawn Kennedy wrote:
> > > > I wonder - maybe an new tool (virt-grub) to dump out the grub
> > > > content of the guest image (if linux)!! :-) :-) :-)
> > >
> > > It's actually pretty simple to script this.  See attached
> > > (requires a grub1 guest).
> >
> > Luckily, we still are grub1 .....
> >
> > # grub --version
> > grub (GNU GRUB 0.97)
> >
> > So I ran it and it tells me I have 2 OSs ...
> >
> > 	root: /dev/VG1/LV0001.root
> > 	root: /dev/VG1/LV0002.root
> >
> > I thought it might dump the running grub, [...]
> 
> I thought it would do too.  One problem with Augeas is that it relies
> on the exact location of the configuration file.
> 
> You can try changing:
> 
>   display ("/files/etc/grub.conf")
> 
> to:
> 
>   display ("/files")
> 
> and see if the grub config shows up anywhere in the (likely to be
> huge) output.

You are right /files is a very big list and after 10+ minutes
of running, it wasn't done.  I narrowed it down (/files/boot)
to see if I could find the files in /boot (after all, 
/boot/grub/grub.com is where it really is) and alas,
it doesn't find it, just found this:

root: /dev/VG1/LV0001.root
/files/boot/grub/device.map/hd0   /dev/vda
root: /dev/VG1/LV0002.root
/files/boot/grub/device.map/hd0   /dev/vda

Thanks,
Shawn






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]