Installing legacy GRUB on micro SD memory card
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:
Code:
dd if=stage1 of=/dev/sdb bs=512 count=1 How do I install GRUB? |
stage2 & stage2 are files, which grub tries to read from a filesystem. You need to copy (cp) those files to a mounted filesystem on the flash drive. Using dd to write them to a partition makes the partition into something that is not a filesystem any more.
A pretty good recipe to solve your problem is at How to put Grub into floppy, pen drive, hard disk or CD/DVD. --- rod. |
Thanks for reply. I read your link. Unfortunately I donn't have legacy GRUB installed on my system, and the GRUB of embedded system is 0.97...
|
I'm just wondering. Why are you using grub? Can you consider lilo or any other boot loader?
|
Quote:
|
Quote:
--- rod. |
I think I'd be inclined to use Das U-Boot.
|
Quote:
Code:
grub > device (hd0) /dev/sdb # My microSD card on memory reader Code:
sudo install-mbr /dev/sdb |
Quote:
that possibility up front. Glad you were able to work through it. --- rod. |
All times are GMT -5. The time now is 11:27 PM. |