LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 10-20-2010, 02:57 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
how to find where is grub installed for a vm on lvm using kvm


I had created a few virtual machines on different LVM's using virt-manager and KVM.
While upgrading one of my Ubuntu VM from 10.04 to 10.10 it asked in the mid of installation process to give the location where I should install grub.
This location I had forgotten how can I find this out?
Or what should I have done?
 
Old 10-28-2010, 10:52 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,261
Blog Entries: 54

Rep: Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841
There's probably more elegant methods or tools but if you
Code:
awk '/d/ {print $NF}' /proc/partitions | while read part; do dd bs=512 count=1 if=/dev/${part} 2>/dev/null | od -txz -w60 | grep -q -m1 GRUB && echo $part; done
from inside the running VM guest as root user you should see it return the disk or partition name.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating LVM based guest in KVM vzxen Linux - Virtualization and Cloud 5 10-13-2010 05:07 AM
how to restore backup from an LVM Guest OS on KVM Lucid tkmsr Linux - Virtualization and Cloud 2 09-29-2010 06:12 AM
How to find all bootable OS'es to be installed on a MBR with GRUB Mimux Linux - Software 0 02-05-2009 04:15 AM
Fedora8 installed on Software Raid+lvm will not start (GRUB Hard Disk Error) nikaudio Fedora - Installation 1 07-08-2008 08:50 AM
Is there a script to auto find installed distros & edit Grub clintbrot Linux - Software 3 06-16-2005 10:15 PM


All times are GMT -5. The time now is 04:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration