summaryrefslogtreecommitdiffstats
path: root/boot/grub/Config.in
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-11-11 17:47:34 +0100
committerPeter Korsgaard <peter@korsgaard.com>2013-12-01 23:45:07 +0100
commit62a84ded2fd779b1be0e917aa6845114b4272b11 (patch)
treeebd3a021b2b352949a3d2d3406acb56cba58d5cc /boot/grub/Config.in
parent1cece2813bf635ae29e9a8287322439b9c5992f7 (diff)
downloadbuildroot-62a84ded2fd779b1be0e917aa6845114b4272b11.tar.gz
buildroot-62a84ded2fd779b1be0e917aa6845114b4272b11.zip
grub: improve help text with detailed instructions to install grub
These instructions should probaby go in the Buildroot manual, but at this point, it's not clear in which section they should go. So in order to not loose those notes, add them to the Grub help text. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'boot/grub/Config.in')
-rw-r--r--boot/grub/Config.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/boot/grub/Config.in b/boot/grub/Config.in
index 65b95e1aa0..c90770fe39 100644
--- a/boot/grub/Config.in
+++ b/boot/grub/Config.in
@@ -5,6 +5,36 @@ config BR2_TARGET_GRUB
help
The GRand Unified Bootloader for x86 systems.
+ Some notes on creating a disk image with Grub installed:
+ 1. Create an empty disk image
+ dd if=/dev/zero of=disk.img bs=1M count=32
+ 2. Create one primary partition
+ cfdisk -h 16 -s 63 disk.img
+ 3. Set up a loop device
+ sudo losetup -f disk.img
+ 4. Set up loop devices per partitions
+ sudo partx -a /dev/loop0
+ 5. Create the ext2 filesystem
+ sudo mkfs.ext2 -L root /dev/loop0p1
+ 6. Mount the filesystem
+ mount /dev/loop0p1 /mnt
+ 7. Extract the root filesystem
+ sudo tar -C /mnt -xf output/images/rootfs.tar
+ 8. Unmount the filesystem, clean up loop device
+ sudo umount /mnt
+ sudo partx -d /dev/loop0
+ sudo losetup -d /dev/loop0
+ 9. Install grub
+ output/host/sbin/grub --device-map=/dev/null
+ and in the grub shell, enter:
+ device (hd0) disk.img
+ geometry (hd0) <cylinders> 16 63
+ root (hd0,0)
+ setup (hd0)
+ 10. Image is ready
+ Can be tested in Qemu, with:
+ qemu-system-{i386,x86-64} -hda disk.img
+
if BR2_TARGET_GRUB
config BR2_TARGET_GRUB_SPLASH
OpenPOWER on IntegriCloud