# RPi3B+ U-Boot Saveenv fails



## Jollyrogue (Apr 8, 2022)

Short story...

My RPi3+ fails to save my edited u-boot environment.


```
U-Boot> editenv usb_pgood_delay
edit: 10000
U-Boot> saveenv
Saving Environment to FAT... Failed (1)
U-Boot>
```

Any suggestions about what I should look at?

Long story...

I'm trying to get my RPi 3B+ to mount home on an external USB HD, but the external HD spins down just as the filesystems are being checked. The home dir on the HD isn't found, and FreeBSD drops down to single user mode. The HD is found about 3 seconds later, and I can exit single user mode to finish booting.

Weirdly, the swap partition on the HD is found and works without problem.

I switched to an external SSD, and that works fine. home and the swap are found and mounted without any problems.

I started working throught Bob Prohaska's notes as linked in the FreeBSD Arm wiki, and that's when I got to the u-boot saveenv problem.


```
% uname -a
FreeBSD gopher 13.0-RELEASE-p11 FreeBSD 13.0-RELEASE-p11 #0: Tue Apr  5 18:58:59 UTC 2022     root@arm64-builder.daemonology.net:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC  arm64
```


----------



## mark_j (Apr 8, 2022)

Just a +1 but I remember this issue about 2 years ago on an RPI2B. Naughty me forgot to log a PR about it, so perhaps you could?


----------



## Jollyrogue (Apr 8, 2022)

mark_j said:


> Just a +1 but I remember this issue about 2 years ago on an RPI2B. Naughty me forgot to log a PR about it, so perhaps you could?


I can do that. Do you a link to instructions somewhere about how to do that handy?


----------



## mark_j (Apr 8, 2022)

Go to bugs.freebsd.org, sign up, enter PR with what you've written above. If you make a  mistake one of the triagers will amend it so don't worry about that. Just give as much relevant information as you did above and hopefully someone will look at it quickly and ask you to test/confirm etc.


----------



## jrushford (Dec 13, 2022)

What's the PR?  I'm running into this issue with the FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img image.  I try to set bootdelay to 0 but saveenv fails with "Saving Environment to FAT... Failed (1)"


----------



## George (Dec 14, 2022)

This happened to me, too. I thought savenv fails because it possibly wants to save the environment in the wrong location/device.

 I would either write a bug report for the  sysutils/u-boot-rpi3 port, or search the arm-mailing list for the keywords "rpi3" and "saveenv" (or write to the arm-mailing list).


----------

