Location of the kernel binary (when not in /boot)?

23,455

Solution 1

/boot is the standard location for the kernel in desktop/server distributions, but embedded systems vary greatly. Where the kernel is stored entirely depends on your bootloader, and it may not be a file as embedded bootloaders are often not capable of reading Linux filesystems.

For example, with U-Boot (a popular embedded bootloader), you create an image with mkimage, which may then be written to a separate FAT partition or written in some other system-specific format. If the kernel image is on a FAT partition, that partition is often not mounted under Linux, since Linux never needs to access it (except during upgrades, but most embedded systems don't upgrade their kernel separately from the bootloader).

The upshot is that you have to look for it. If you need help, you need to describe your system very precisely, and even then we may or may not be able to help depending on how popular your embedded system is. If you can't find it on your own, consider asking for support from the providers of the embedded system.

Solution 2

If your embedded device uses U-boot, the kernel image might be written on a particular partition on a NAND flash. See this! If this is the case i think you can locate the binary by looking at your U-boot source code if you have access to it. You can also check the environment variable for clues. This will vary greatly depending on your system so I can't give specifics.

Solution 3

Yes. It will be possible to have kernel on different partition

To find the kernel location,

1. see the grub.cfg OR grub.conf file 
2. Examine the output of `cat > /proc/cmdline`
Share:
23,455

Related videos on Youtube

TheMeaningfulEngineer
Author by

TheMeaningfulEngineer

I like to think of myself as a Hardware/Software guy who will gladly discuss referential transparency during a code review and the next moment take a circular saw to build a casing for a self made power supply. My main interest can be summarized into Linux related software development, low power electronics and general DIY projects.

Updated on September 18, 2022

Comments

  • TheMeaningfulEngineer
    TheMeaningfulEngineer almost 2 years

    I failed to find the kernel binary in the standard location in /boot. I've also searched the whole file system for vmlinux or bzimage

    find / -iname vmlin*
    find / -iname bzimage
    

    However, this is an embedded device not a standard desktop. Is it possible that the kernel binary is located on a different storage location which isn't mounted.

    Example:

    / is mounted on the SD card and the kernel is written on flash?

    If not, what are the options for locating the kernel binary?

    • Admin
      Admin over 10 years
      By the way, you may be interested in the embedded systems site proposal.
    • Admin
      Admin over 10 years
      Find out how the device boots, if possible. Conceivably it doesn't have a local kernel at all and gets it from a tftp server.
    • Admin
      Admin over 8 years
      There is no /boot folder on chromebooks, either.
  • arcomber
    arcomber about 3 years
    Embedded systems usually don't use grub. Instead they often use uboot.