gcb
gcb

Reputation: 376

Yocto boot partition vs boot rootfs directory

I need to mount my boot partition in order to perform software updates in my yocto built. I would expect to mount it in /boot but I see that there is a directory there already

I cant seem to find information about what this /boot directory is and why its needed. It contains the same .itb file that is in the boot partition

Do I need this boot directory? Who is it used by? Is there a way to tell yocto not to create it?

Upvotes: 2

Views: 1635

Answers (2)

gcb
gcb

Reputation: 376

Turns out that atmel dt overlay was putting overlay files in the /boot directory. These overlays aren't relevent for my machine so I removed the dt-overlay dependency

https://github.com/linux4sam/meta-atmel/blob/07867084ec52b5580e55eb67c861823eaab5e4c3/recipes-bsp/dt-overlay-at91/dt-overlay-at91_git.bb#L51

Upvotes: 0

LNiederha
LNiederha

Reputation: 948

In Short

The short answer is, normally, unless you've tempered with the etc/fstab file, the boot partition is mounted in /boot. Yo can check that it is indeed the boot partition that is mounted with the df command.

fstab

Now I'm a bit of a fstab noob myself but here is what I could get from it. In the fstab file is the file responsible for automatically mounting device. In general, by default yocto generates a fstab file looking like this:

/dev/mmcblk0p1  /boot   vfat    defaults    0   0

Meaning (from what I can get) that your first partition will be mounted in /boot automatically. (If there are any fstab wizard out here feel free to elaborate)

From my experience

This work as normally mounted folder. You can modify all you want in /boot and the changes will happen on the boot partition. Once your changes are done, reboot and you should be able to see your changes having taken effect.

As for your questions

I have a broad idea but I suspect this depends on your build and target. And I have no yocto build I can check that with atm. So here are my hints:

  • Do you need it? I don't think so... unless you have a module or a script that is supposed to automatically mess with the boot partition... and even so I don't think this is vital. I'd the fastest way to find out is to remove the line from /etc/fstab mounting the boot partition and see if somthing crashes
  • Who is it used by? I suspect no one. I think that it is just a handy way to access your boot partition buas I said, haven't had the opportunity to confirm that.
  • How do you prevent yocto from creating it? All you should need to do is tell yocto to write a fstab file without the line mounting /boot. Here is how to override a file installed by a parent layer. Know that fstab is installed by /poky/meta/recipes-core/basefiles/base-files_X.X.X.bb.

Note that overall I'm not a 100% certain what /boot this is used for but I wouldn't recommend getting rid of it. In my opinion there is no draw backs to having your boot partition mounted and it is a handy tool to check on your boot partition while investigating your build.

Upvotes: 0

Related Questions