how to install grub into .img file?
I do the following setups:
mount /dev/hda2 /mnt/hda2
cd /mnt/hda2
dd of=jakux.img bs=1024 seek=500000 count=0
mount /mnt/hda2/jakux.img /mnt/hda7 -o loop
then I cp a simple rootfs (created by buildroot) to /mnt/hda7 and add the kernel:
ls /mnt/hda7
bin boot dev etc home lib linuxrc mnt opt proc root sbin tmp usr var
at last ,I try to install grub like this:
grub-install /mnt/hda2/jakux.img
Format of install_device not recognized.
or:
grub-install /mnt/hda7
Format of install_device not recognized.
how could I install grub at the beginning of /mnt/hda2/jakux.img and then boot from it?
|