I'm trying to build a linux-based embedded OS using buildroot framework. After compilation I extracted contents of root filesystem on micro SD card. Now I need to install GRUB. I have stage 1 and stage 2 files. trying to write them on first sectors of /dev/sdb (using a memory reader) destroys partition table:
dd if=stage1 of=/dev/sdb bs=512 count=1 dd if=stage2 of=/dev/sdb bs=512 seek=1
Also installation on a partition (/dev/sdb1) causes damage on it.
How do I install GRUB?