bug-grub
[Top][All Lists]
Advanced

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

Re: Unable to install grub on an image


From: kashyap garimella
Subject: Re: Unable to install grub on an image
Date: Wed, 8 Dec 2010 00:47:21 +0530

Hey,

2010/12/8 Vladimir 'ö-coder/phcoder' Serbinenko <address@hidden>
On 12/07/2010 07:31 PM, kashyap garimella wrote:
> Hello everybody,
>
> I want to install grub on an image. I created an image and formatted
> it using fdisk(to create partition table) and mkfs.ext3 to create an
> ext3 partition. I followed the instructions from this wiki page:
> http://wiki.osdev.org/Loopback_Device
> Then I installed grub.
>
> Following are the list of commands:
> $dd if=/dev/zero of=floppy.img bs=516096c count=1000
> $fdisk -u -C1000 -S63 -H16 floppy.img # And create a partition table,
> following the link http://wiki.osdev.org/Loopback_Device
> $losetup /dev/loop0 floppy.img -o0
> $losetup /dev/loop1 floppy.img -o32256 # the ext3 partition starts
> from 63 sector(32256=63*512)
> $mkfs.ext3 /dev/loop1
> $mkdir mnt; mount /dev/loop1 mnt/
> $mkdir -p mnt/boot/grub
> $echo "(hd0) /dev/loop0" > mnt/boot/grub/device.map
> $grub-install --root-directory=mnt /dev/loop0
> Installation finished. No error reported.
>
In such config GRUB is unable to detect partitions. Either add
--modules=part_msdos or use experimental and kpartx

Thanks a lot. It is working now. Can you please explain how the config is different from the normal one, where we install directly like this:
grub-install /dev/sda --boot-directory=<..>

Thanks,
Kashyap

reply via email to

[Prev in Thread] Current Thread [Next in Thread]