1

I have a 1 Gbyte image of installed Debian 7 which I have made it myself by copying all the needed files to it. There is only one partition in it named hda0. I have mounted it to loop0p1. I had installed grub2 on it by the following command for grub2:

grub-install --boot-directory=/home/user1/project/img1G.img/mnt/boot --modules="ext2 part_msdos" --no-floppy /dev/loop0

And it works fine. Because of some reason, I need to downgrade Grub2 to grub-legacy. There is an excellent procedure in HowTo: Revert from grub2 to Legacy Grub, but it is for cases where one needs to downgrade the grub in the host OS itself. But in my case my OS is an image which at most can be mounted as a disk. And also it can be run under KVM. Also note that there is little space and it is not suitable to have all the packages such as apt-get installed on it. Also note that I have installed all the packages by just copying the needed files. In the procedure mentioned in the above link, there was an error after running the command for grub-legacy:

grub-install --root-directory=/home/user1/project/img1G.img/mnt --no-floppy /dev/loop0

error is:

The file /home/user1/project/img1G.img/mnt/boot/grub/stage1 not read correctly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.