How to install grub into an .img file?
Posted
by Francesco Turco
on Super User
See other posts from Super User
or by Francesco Turco
Published on 2010-04-14T18:03:28Z
Indexed on
2010/04/14
18:13 UTC
Read the original article
Hit count: 411
I did the following:
- created an empty .img file with dd
- associated it to /dev/loop0 with losetup
- created a partition in it with fdisk
- formatted such partition with mke2fs
- copied a custom GNU/Linux system into that partition
Now I'd like to make the .img file bootable by installing grub into its MBR and /boot directory. My goal is to load the .img file with qemu. It would be better if grub2 is used instead of grub legacy.
Thanks.
© Super User or respective owner