6

I have run bitbake core-image-minimal-dev properly configured for a genericx86 machine. BitBake generates a bootia32.efi, a bzImage--<stuff>.bin, an .hddimg, an .iso, a .rootfs.ext3, a .rootfs.ext4, a .rootfs.tar.bz2, and a core-image-initramfs-<stuff>.rootfs.cpio.gz. I'm interested in a method of how to dd one or more of these onto the hard disk of my target machine and boot from that hard disk.

karobar
  • 1,250
  • 8
  • 30
  • 61

1 Answers1

6
dd if=path/to/imagefile/imagename.hddimg of=/dev/usbdevicename

You'll find the correct usb device name e.g. by plugging in the usb disk and looking at dmesg|tail output -- do not guess as mistakes will be fatal to your hard disk. A practical example from my build machine:

sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-sato-intel-corei7-64.hddimg \
        of=/dev/sdb \
        bs=4096

Note that you probably want to use intel-corei7-64 as the machine unless you know that genericx86 is correct for your hardware: despite the name former is the common Intel BSP for anything that's not ancient (that includes big Cores, Xeons, Atoms ...).

How to boot the image depends on your target device: you may need to go to BIOS settings to select "boot from USB".

Jussi Kukkonen
  • 13,857
  • 1
  • 37
  • 54
  • Thank you for the response, but my question was specifically about booting from a hard disk, not booting from usb. Before asking my question I had dd'd the .hddimg onto a usb, then dd'd from that usb to a partition on my target machine's hard disk, removed the usb, and then attempted a boot. During the boot it would hang indefinitely while searching for the rootfs image on a usb drive. – karobar Oct 28 '15 at 13:26
  • aha, missed that. When you boot the USB image, you should see a GRUB boot loader menu with options "boot" and "install". The latter option will give you a very basic installer. Whether it supports your requirements I cannot say as I've not really used it. – Jussi Kukkonen Oct 28 '15 at 13:40