# Raspberry Pi 3B boot partition filesystem

**URL:** <https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-3, sumo\
**Created:** [July 6, 2020, 9:40pm UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158 "2020-07-06T21:40:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![conker00](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@conker00](https://hub.mender.io/u/conker00)\
**Post date:** [July 6, 2020, 9:40pm UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158/1 "2020-07-06T21:40:44Z")

</div>

From what I have read, a raspberry pi 3b should be able to boot with the boot partition’s file system either FAT16 or FAT32.  
My issue is that some of my raspberry pis don’t boot unless I remake the filesystem as FAT32 and replace the files of the boot partition.  
This happens with my yocto build and also the mender raspberry pi demo images found here [https://docs.mender.io/2.1/getting-started/download-test-images](https://docs.mender.io/2.1/getting-started/download-test-images). I’ve also tried previous versions 1.6 and 1.7.

Is there a way to set the filesystem type to FAT32 for the boot partition instead of FAT16?  
Changing the mkfs call of the sdcard\_image-rpi within meta-raspberrypi doesn’t seem to work since rpi-sdimg is removed from IMAGE\_FSTYPES in conf/local.conf.

Where/when is the uboot.env populated with the boot partition files?  
Correct me if I’m wrong, with the raspberrypi, the boot partition is rawcopy from uboot.env within mender-part-image.bbclass.

All suggestions are greatly appreciated.  
My apologizes if there is a enforced forum format which I have not followed.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 7, 2020, 2:30pm UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158/2 "2020-07-07T14:30:20Z")

</div>

Hi @conker00, welcome to Mender hub.  
I think you should be able to set the “MENDER\_BOOT\_PART\_FSTYPE” bitbake variable to handle this.

Drew

---

<div class="post-metadata">

**Author:** ![conker00](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@conker00](https://hub.mender.io/u/conker00)\
**Post date:** [July 14, 2020, 1:51pm UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158/3 "2020-07-14T13:51:26Z")

</div>

Hi @drewmoseley  
Thank you for the suggestion. Unfortunately, changing the MENDER\_BOOT\_PART\_FSTYPE variable didn’t help. It appears to only change the entry within fstab.

I’ve done some more reading about my issue and it seems to be a rare occurrence on the cm3 as described in the troubleshooting section here

> **[Raspberry Pi Documentation - Compute Module hardware](https://www.raspberrypi.com/documentation/computers/compute-module.html)**
>
> The official documentation for Raspberry Pi computers and microcontrollers

which reads:

> For a small percentage of Raspberry Pi Compute Module 3s, booting problems have been reported. We have traced these back to the method used to create the FAT32 partition; we believe the problem is due to a difference in timing between the BCM2835/6/7 and the newer eMMC devices. The following method of creating the partition is a reliable solution in our hands.
> 
> $ sudo parted /dev/  
> (parted) mkpart primary fat32 4MiB 64MiB  
> (parted) q  
> $ sudo mkfs.vfat -F32 /dev/  
> $ sudo cp -r /\*

I have tried a build with MACHINE = “raspberrypi-cm3” with the same results.

My current workaround is to recreate the filesystem as described in the same troubleshooting section directly on the built image using loop devices.

```auto
$sudo fdisk -lu core-image-base.sdimg
$sudo losetup --offset $((<sector size> * <boot partition start>)) --sizelimit $((<sector size> * <sectors in boot partition>)) --show --find core-image-base.sdimg
$sudo mkdir -p /mnt/img
$sudo mount /dev/loopX /mnt/img # where loopX is the device from losetup
$mkdir backup
$sudo cp -r /mnt/img/* backup/
$sudo umount /mnt/img
$sudo mkfs.vfat -F32 /dev/loopX
$sudo mount /dev/loopX /mnt/img
$sudo cp -r backup/* /mnt/img/
$sudo umount /mnt/img
$sudo losetup -d /dev/loopX

```

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 20, 2020, 5:51pm UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158/4 "2020-07-20T17:51:13Z")

</div>

@conker00 is the only difference the forcing if 32-bit using “-F32” with mkfs.vfat?

I do see that mender-part-images.bbclass always uses type vfat instead of MENDER\_BOOT\_PART\_FSTYPE. @kacf is that intentional or should we update it to use MENDER\_BOOT\_PART\_FSTYPE there?

Although it sounds like in this case it wouldn’t help since it appears to be hardware-releated. The bbclass uses WIC to create the file so that logic would somehow need to force 32-bit if that is indeed the fix.

Drew

---

<div class="post-metadata">

**Author:** ![conker00](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@conker00](https://hub.mender.io/u/conker00)\
**Post date:** [July 20, 2020, 6:38pm UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158/5 "2020-07-20T18:38:10Z")

</div>

@drewmoseley

From my understanding, yes. Just forcing with mkfs.vfat -F32 fixes the issue. The partition was not altered.

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [July 21, 2020, 6:32am UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158/6 "2020-07-21T06:32:09Z")

</div>

> [@drewmoseley](#):
>
> I do see that mender-part-images.bbclass always uses type vfat instead of MENDER\_BOOT\_PART\_FSTYPE. @kacf is that intentional or should we update it to use MENDER\_BOOT\_PART\_FSTYPE there?

I believe that should be changed, yes. Be aware that `MENDER_BOOT_PART_FSTYPE` is often set to `auto` though, since it is primarily used in `/etc/fstab` at the moment. There is some similar handling for `MENDER_DATA_PART_FSTYPE`, which can be used for inspiration.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 21, 2020, 4:08pm UTC](https://hub.mender.io/t/raspberry-pi-3b-boot-partition-filesystem/2158/7 "2020-07-21T16:08:28Z")

</div>

Great. I created [Boot fs type by drewmoseley · Pull Request #1035 · mendersoftware/meta-mender · GitHub](https://github.com/mendersoftware/meta-mender/pull/1035) which should allow the boot partition type and options to be customized.

@conker00 once this is merged you can specify:

> MENDER\_BOOT\_PART\_FSOPTS\_append = " -F 32 "

to avoid the post processing step. If you have a chance to test it and confirm whether it works for you or not that would be most helpful.

Drew
