depends on BR2_i386 || BR2_x86_64
GNU GRUB is a Multiboot boot loader. It was derived from
GRUB, the GRand Unified Bootloader, which was originally
designed and implemented by Erich Stefan Boleyn. GRUB 2 has
replaced what was formerly known as GRUB (i.e. version
0.9x), which has, in turn, become GRUB Legacy.
Amongst others, GRUB2 offers EFI support, which GRUB Legacy
Notes on using Grub2 for BIOS-based platforms
=============================================
dd if=/dev/zero of=disk.img bs=1M count=32
2. Partition it (either legacy or GPT style partitions work)
- Create one partition, type Linux, for the root
filesystem. The only constraint is to make sure there
is enough free space *before* the first partition to
store Grub2. Leaving 1 MB of free space is safe.
3. Setup loop device and loop partitions
4. Prepare the root partition
sudo mkfs.ext3 -L root /dev/loop0p1
sudo mount /dev/loop0p1 /mnt
sudo tar -C /mnt -xf output/images/rootfs.tar
sudo ./output/host/usr/sbin/grub-bios-setup \
-b ./output/host/usr/lib/grub/i386-pc/boot.img \
-c ./output/images/grub.img -d . /dev/loop0
sudo losetup -d /dev/loop0
7. Your disk.img is ready!
If you use genimage to generate your complete image,
installing Grub can be tricky. Here is how to achieve Grub's
installation with genimage:
in-partition-table = "no"
image = "path_to_boot.img"
in-partition-table = "no"
image = "path_to_grub.img"
The result is not byte to byte identical to what
grub-bios-setup does but it works anyway.