Hi I am trying to boot Linux with the Freedom Unleashed 500 work-flow. I ran into some issues with formatting my SD card. I follow the steps found in the instructional PDF but when I try to write the table to the disk and exit it says:
“Warning! An error was reported when writing the partition table! This error MIGHT be harmless, or the disk might be damaged! Checking it is advisable.”
I cannon see it when typing sudo fdisk -l either, however I can see it in the /dev directory (it shows up as /dev/sdb). How would I check to see if the SD card is damaged, or how can I fix it such that it can still boot Linux? Any response would be greatly appreciated.
I just spent a few days debugging a similar problem that turned out to be due to a defective SD card. Here’s how I identified the problem.
Unplug your SD card, do a
ls /dev
reinsert your SD card, then look for a new device called /dev/sd<X>
, where <X>
== a,b,c,… For me, it appears as /dev/sdb
.
Next, check if there are any devices called /dev/sdb<N>
where <N>
== 1,2,…, you will need to unmount them before proceeding. Type
mount
and identify where /dev/sdb1
, /dev/sdb2
, etc., are mounted. For example, I see:
/dev/sdb1 on /media/knight/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
Then type
umount <path>
where <path>
is where the device is mounted; in my case, I used <path> == /media/knight/boot
.
Once all the sdb<N>
-es are unmounted — which you can verify by running
mount
again, check for “bad blocks” with
sudo badblocks -n -v /dev/sdb
This will take a while. If there is any output (besides the “Finished” message), then you have corrupted blocks, and you shouldn’t trust your SD card.
Internally at SiFive we’ve had better luck with SanDisk Ultra or SanDisk Extreme (the bicolor ones), but this is not an official endorsement.
Thank you for the suggestions. I was wondering if the PDF I linked previously is the recommended way to format a fresh SD card (just taken out of its packaging)?
We recently uploaded an updated version of the PDF to the website. The updated version adds this paragraph in Chapter 7:
This document, as well as the binaries shipped with the HiFive Unleashed (and available on the SiFive website), concern an older, Buildroot-based version of freedom-u-sdk, which lives on the v1_0 branch. This Buildroot version will be deprecated in the future. A new, OpenEmbedded-based version of freedom-u-sdk is available at:
GitHub - sifive/freedom-u-sdk: Freedom U Software Development Kit (FUSDK) (default branch)
To try the OpenEmbedded version, visit the freedom-u-sdk GitHub repo for instructions on building a disk image, installing it on a SD card, and booting it on your HiFive Unleashed. Note that some details in Chapters 4, 5, 6, and 7 of this document are specific to the Buildroot version.
Personally I’d recommend trying out the newer version — it’s what I use, and I think it’s a lot simpler.
@nick.knight Thank you again for your assistance. After following your suggestions it is clear now that the SD cards are all in good health and are fine. The issue was our SD card reader that we were utilizing.