Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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...
You can load any version of grub onto your build host. It doesn't mean it will install a bootloader on the boot disk, or anywhere else. We all recognize grub as the bootlaoder that runs when your system boots, however it is really also a tool much like any other tool on your system. grub, the tool, is what you use to install grub, the bootloader, onto some media (your SD flash card). This is a concept that seems under-explained.
You can load any version of grub onto your build host. It doesn't mean it will install a bootloader on the boot disk, or anywhere else. We all recognize grub as the bootlaoder that runs when your system boots, however it is really also a tool much like any other tool on your system. grub, the tool, is what you use to install grub, the bootloader, onto some media (your SD flash card). This is a concept that seems under-explained.
--- rod.
Trying to install legacy grub on my system by Arch packages, causes a disaster. The geub package will install a bootloader on host machine, which is not what I want. So I compiled legacy grub on my system, and not installed it. Using interactive shell do the trick:
Code:
grub > device (hd0) /dev/sdb # My microSD card on memory reader
grub > root (hd0,0)
grub > setup (hd0)
Above code failed to install grub on microSD card. The error said no space left on device. Searching around I found that there is no boot sector (MBR) in my device. (BTW can't see how do distros install themselves without problem!) Fortunately there is a small tool for managing MBR on devices. I installed the 'install-mbr' package from AUR and
Trying to install legacy grub on my system by Arch packages, causes a disaster. The geub package will install a bootloader on host machine, which is not what I want. So I compiled legacy grub on my system, and not installed it. Using interactive shell do the trick:
Yeah, I was worried that might happen. I consider that to be a broken installer. Still, I should have suggested
that possibility up front. Glad you were able to work through it.
--- rod.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.