I am using poky at warrior branch to generate root images. Yocto can generate the final image in various formats. One of them is .hddimg, which looks like this when extracted:


Following this link: http://embeddedguruji.blogspot.com/2018/11/run-your-intels-yocto-hddimg-in-virtual.html, I convert the .hddimg file to .vmdk file. When I use 7zip to view the contents of the .vmdk file, it is same as above. I was curious to know how the boot process works, and how the kernel is loaded. And how I can switch default kernels when multiple kernels are installed in rootfs.

I base this question from my previous unanswered question: https://stackoverflow.com/questions/57611557/switch-kernel-in-yocto-root-image


Both .hddimg and .vmdk are disk images, so they boot exactly like ordinary (physical) HDDs. That is, they don't just contain a root filesystem but a whole partitioned disk layout.

(Note that 7zip will only show the first partition it recognizes.)

Like real disks, these images have a boot sector (for BIOS) and/or an EFI system partition (for UEFI), and there is a bootloader installed (in your case that's syslinux). The virtual machine software emulates a full BIOS, which starts syslinux from the virtual disk, which then reads its menu configuration (syslinux.cfg) and starts the kernel configured in that file.

| improve this answer | |
  • so does this mean that I can not modify the bootprocess or specify another kernel by modifying files from root-filesystem? The /boot directory also contains boot specific files, but this directory does not seem to be in use when I use virtualbox. Is there a different mechanism that uses /boot directory to perform kernel loading. Or does /boot directory exist solely for backup purpose? – Ankit Koirala Aug 26 '19 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.