LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Installing Grub on Disk Image (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/installing-grub-on-disk-image-866348/)

Wafic01 03-03-2011 09:31 PM

Installing Grub on Disk Image
 
Hello
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 laptop.my 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

unSpawn 03-08-2011 05:02 PM

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?

Wafic01 03-09-2011 02:54 AM

The didn't work part
 
Thank you for your reply
This how i launched qemu:
Code:

kvm -hda ./Desktop/disk_0.img -cdrom ubuntu-10.04.1-desktop-i386.iso  -boot d -m 256
When i run
Code:

sudo fdisk -l
inside the virtual Ubuntu
I get the following output:

Code:

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 :
Code:

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 ?


All times are GMT -5. The time now is 04:34 AM.