Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
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.


  Search this Thread
Old 03-03-2011, 09:31 PM   #1
LQ Newbie
Registered: Mar 2009
Posts: 8

Rep: Reputation: Disabled
Installing Grub on Disk Image

I was following the LFS (Linux From Scratch) Project 6.7,and i was able to finish up with a booting kernel.i did most of the compilation on my old Toshiba problem resides is that i got tired of working on this very old pc , So i did a disk dump of the partition on which LFS is built on in order to use it on my newer laptop and run it using qemu .On my older system i used grub of the host system in order to load the kernel.My question is : can i install grub on the new disk image ? i tried loading it as a second hard drive with Ubuntu live-cd from qemu but it didn't work .Any suggestions ? i'm running Ubuntu 10.10 for x86_64 m kernel version :2.6.35-25-generic
Thank you
Old 03-08-2011, 05:02 PM   #2
Registered: May 2001
Posts: 29,273
Blog Entries: 55

Rep: Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513Reputation: 3513
If you can you boot the QEmu guest with a Live or installer CD or minimal floppy image you should be able to install GRUB. Definitely the easiest way. So maybe start by explaining the "didn't work" part?
Old 03-09-2011, 02:54 AM   #3
LQ Newbie
Registered: Mar 2009
Posts: 8

Original Poster
Rep: Reputation: Disabled
The didn't work part

Thank you for your reply
This how i launched qemu:
kvm -hda ./Desktop/disk_0.img -cdrom ubuntu-10.04.1-desktop-i386.iso  -boot d -m 256
When i run
sudo fdisk -l
inside the virtual Ubuntu
I get the following output:

Disk /dev/sda :516 MB ,516096000 bytes
4 heads , 32 sectors/track , 7875 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Sector size (logical/physical): 513 bytes / 512 bytes
I/O size (minimum/optimum): 512 bytes /512 bytes 
Disk identifier: 0x00c545c
   DEvice Boot      Start     End     Blocks   Id System
/dev/sda1               1       7875    503968  83  Linux
When i run :
sudo grub-install /dev/sda1
I get the Following error :
/usr/sbin/grub/grub-probe : error : cannot find a device for /boot/grub (is /dev mounted?)
No path or device is specified
Auto Detection of file system module failed

Even when i try with --modules=ext2 it get :
you attempted a cross disk install , but the file system containing /boot/grub does not support UUIDS .

any ideas ?


grub2, kernel, kvm, lfs

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
Installing GRUB in another disk problem, GRUB Hangs in boot caosxxi Linux - General 7 08-26-2009 01:55 PM
Installing Ubuntu onto a hard disk image DJ747 Linux - Desktop 0 11-07-2006 04:52 AM
installing image of windows installation onto linux while keeping grub lupusyonderboy1 Linux - Newbie 1 10-26-2006 06:29 AM
Installing GRUB to a floppy disk obnascar Linux - Newbie 1 08-25-2005 02:36 PM
problems installing grub on sata disk atharh Linux - Hardware 3 09-19-2004 07:22 AM

All times are GMT -5. The time now is 03:52 PM.

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