<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sergio Guillen</title>
    <description>The latest articles on Forem by Sergio Guillen (@donkeysharp).</description>
    <link>https://forem.com/donkeysharp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3718382%2Fb4294944-68b3-44f3-9e12-4eaee79d918f.png</url>
      <title>Forem: Sergio Guillen</title>
      <link>https://forem.com/donkeysharp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/donkeysharp"/>
    <language>en</language>
    <item>
      <title>Booting Raspberry Pi 3 Model B from SSD</title>
      <dc:creator>Sergio Guillen</dc:creator>
      <pubDate>Sun, 18 Jan 2026 20:19:47 +0000</pubDate>
      <link>https://forem.com/donkeysharp/booting-raspberry-pi-3-model-b-from-ssd-5445</link>
      <guid>https://forem.com/donkeysharp/booting-raspberry-pi-3-model-b-from-ssd-5445</guid>
      <description>&lt;p&gt;This was originally posted on my personal blog: &lt;br&gt;
&lt;a href="https://blog.donkeysharp.xyz/boot-rpi-3-model-b-from-ssd/" rel="noopener noreferrer"&gt;https://blog.donkeysharp.xyz/boot-rpi-3-model-b-from-ssd/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey everyone! In this post I'm going to share my experience of USB booting the Raspberry Pi 3 Model B from an SSD. Although it is something I did almost one year ago, I wanted to share it... sorry for the 1 year delay xD!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Probably there might be something I missed on my solution, so any feedback is really appreciated!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before the pandemic started, a friend of mine sold me 4 Raspberry Pi 3 Model B and one Raspberry Pi 3 Model B+. I used them for an electronics + home automation project I no longer need anymore, so I decided to repurpose them to something new, a new project I started working on for which I will make another blog entry.&lt;/p&gt;

&lt;p&gt;This time, as I was not going to use the RPIs for electronics, instead something that will require more disk usage, I wanted to try something I personally hadn't tried before. I wanted to boot the RPIs from an SSD. Instead of spending money on new reliable, fast SD cards, I decided to use some spare SSDs I had instead. This is definitely something that was done before, but in my case there were some nuances that took me some days to realize how to fix them, and I wanted to share that experience with you.&lt;/p&gt;
&lt;h3&gt;
  
  
  What I used
&lt;/h3&gt;

&lt;p&gt;For this experiment I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4 RPI 3 Model B&lt;/li&gt;
&lt;li&gt;1 RPI 3 Model B+&lt;/li&gt;
&lt;li&gt;5 Power supplies with the proper voltage and amps&lt;/li&gt;
&lt;li&gt;5 Solid State Drives&lt;/li&gt;
&lt;li&gt;5 USB to Sata adapters&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Booting from SSD
&lt;/h2&gt;

&lt;p&gt;There are multiple blog posts, forum entries and now LLMs that explain how to boot a RPI from an SSD (I added references I used in the references section below). In summary the steps required for RPI 3 Model B to USB boot from SSD are the next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using an SD card with RaspberryPI OS installed, run a full upgrade:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt full-upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;The following command will give two possible results depending on whether USB boot is enabled or not:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  vcgencmd otp_dump | &lt;span class="nb"&gt;grep &lt;/span&gt;17
  17:1020000a &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&amp;lt; it means USB boot is disabled
  17:3020000a &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&amp;lt; it means USB boot is enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;In case it is disabled, the way to enable it is by adding the following lines to the &lt;code&gt;/boot/firmware/config.txt&lt;/code&gt;. Some tutorials mention the &lt;code&gt;/boot/config.txt&lt;/code&gt; but those are outdated.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;program_usb_boot_mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
  &lt;span class="nv"&gt;program_usb_boot_timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Finally, clone the content of the SD card that has RaspberryPI OS to the SSD, you can do that with dd:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="c"&gt;# /dev/mmcblk0 is the SD card in my case&lt;/span&gt;
  &lt;span class="c"&gt;# /dev/sdb is the SSD connected via USB&lt;/span&gt;
  &lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/mmcblk0 &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/sdb &lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;progress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Then remove the SD card from the RPI, connect the SSD via USB and reboot.&lt;/li&gt;
&lt;li&gt;Congrats! You booted your RPI from USB and an SSD. Now you can resize and stuff.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's the result I wished I had, but no, it didn't work for 4 of my 5 RaspberryPIs. Let me tell you how I fixed-ish it.&lt;/p&gt;
&lt;h2&gt;
  
  
  The difference between RPI3 model B and RPI3 model B+
&lt;/h2&gt;

&lt;p&gt;I executed the previous steps first (by coincidence on the RPI 3 &lt;strong&gt;Model B+&lt;/strong&gt;). And it worked like a charm. Then for the next RPIs 3 Model B (not B+) it didn't work, I tried all of the 4 RPIs with the same result. I made sure I added the &lt;code&gt;program_usb_boot_timeout=1&lt;/code&gt; setting to the &lt;code&gt;/boot/firmware/config.txt&lt;/code&gt; file to increase the wait for RPI to detect the disk, even with that verification it didn't work. No USB boot for the RPIs 3 Model B.&lt;/p&gt;

&lt;p&gt;At that point, I got to the conclusion that at least in terms of booting, the RPI 3 Model B and RPI 3 Model B+ have differences.&lt;/p&gt;
&lt;h3&gt;
  
  
  My Solution (a fluke)
&lt;/h3&gt;

&lt;p&gt;After trying multiple combinations that didn't work, it booted! I checked in the terminal and indeed, it booted from SSD. I executed some IO speed tests to make sure it was indeed using the SSD. It finally worked!&lt;/p&gt;

&lt;p&gt;The new problem was I didn't add any new configuration change xD, so I was very confused on why it worked. And I noticed that this time I forgot to remove the SD card. Both SD and USB SSD were connected.&lt;/p&gt;

&lt;p&gt;My hypothesis was that for RPI 3 Model B, an SD card is still required to boot, no matter if the operating system is installed on a USB SSD.&lt;/p&gt;

&lt;p&gt;To finally verify that hypothesis, I formatted the SD card and just copied the content of the &lt;code&gt;/boot/&lt;/code&gt; directory from the SSD, actually they &lt;strong&gt;must&lt;/strong&gt; be the same.&lt;/p&gt;

&lt;p&gt;Voila! It booted again!&lt;/p&gt;

&lt;p&gt;With that test, I was sure that the &lt;strong&gt;RPI 3 Model B requires an SD card to boot no matter where the OS is located&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I used the SD cards from my old project, formatted them and copied the content of &lt;code&gt;/boot/firmware&lt;/code&gt; from each SSD and it worked fine.&lt;/p&gt;

&lt;p&gt;It is important &lt;strong&gt;not&lt;/strong&gt; to copy the content of the &lt;code&gt;/boot/firmware&lt;/code&gt; directory from &lt;strong&gt;one SSD to all the SD cards&lt;/strong&gt;, as each SSD has a different UUID specified in the &lt;code&gt;/boot/firmware/cmdline.txt&lt;/code&gt; file. Copy from each SSD or make sure the &lt;code&gt;/boot/firmware/cmdline.txt&lt;/code&gt; has the proper values for the disk UUID.&lt;/p&gt;

&lt;p&gt;One example of the &lt;code&gt;cmdline.txt&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console=serial0,115200 console=tty1 root=PARTUUID=e000a75d-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=US cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Upgrading the operating system
&lt;/h3&gt;

&lt;p&gt;All the steps that I mentioned before happened when the latest RaspberryPI OS was based on Debian 12. Now the latest version of the RaspberryPI OS was released based on Debian 13, I decided that instead of formatting and doing the same process from scratch, I will follow the steps to do a RaspberryPI OS major upgrade.&lt;/p&gt;

&lt;p&gt;These are the steps I follow for this matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Edit &lt;code&gt;/etc/apt/sources.list&lt;/code&gt; and &lt;code&gt;/etc/apt/sources.list.d/raspi.list&lt;/code&gt; and change from &lt;code&gt;bookworm&lt;/code&gt; to &lt;code&gt;trixie&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;apt update&lt;/code&gt; to refresh the package indexes&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;apt install -y apt dpkg&lt;/code&gt; to install the latest version of the package manager.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;apt upgrade --without-new-pkgs&lt;/code&gt; to install latest version without installing new dependencies. Make sure everything is fine.&lt;/li&gt;
&lt;li&gt;Finally &lt;code&gt;apt full-upgrade&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reboot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That would be enough on any setup (it works on the &lt;strong&gt;RPI 3 Model B+&lt;/strong&gt;), but in this case as we boot from the SD card first and not the SSD, we will need to follow some extra steps.&lt;/p&gt;

&lt;p&gt;Let's recall some Linux theory: The Linux kernel image is located at the &lt;code&gt;/boot&lt;/code&gt; directory, but in our case the RPI boots from SD. We still have the boot content from the previous installation. After the upgrade when I rebooted, the kernel was still &lt;code&gt;6.1&lt;/code&gt; and not &lt;code&gt;6.12&lt;/code&gt; which is the one that comes with Debian 13.&lt;/p&gt;

&lt;p&gt;In order to have the upgrade 100% ready, I had to repeat the previous steps I did to make the RPI boot from SSD.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mount the SD card &lt;code&gt;mount /dev/mmcblk0p1 /mnt/sdboot/&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;/boot/firmware&lt;/code&gt; from SSD to the SD card: &lt;code&gt;cp -r /boot/firmware/* /mnt/sdboot/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reboot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After I followed those steps, I was able to have the upgrade 100% functional.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you want to use containers
&lt;/h3&gt;

&lt;p&gt;In case you want to use containers or a container orchestrator such as K3S, make sure that the fields &lt;code&gt;cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory&lt;/code&gt; are set in the &lt;code&gt;/boot/firmware/cmdline.txt&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://forums.raspberrypi.com/viewtopic.php?t=359795" rel="noopener noreferrer"&gt;https://forums.raspberrypi.com/viewtopic.php?t=359795&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.makeuseof.com/how-to-boot-raspberry-pi-ssd-permanent-storage/" rel="noopener noreferrer"&gt;https://www.makeuseof.com/how-to-boot-raspberry-pi-ssd-permanent-storage/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pysselilivet.blogspot.com/2020/10/raspberry-pi-1-2-3-4-usb-ssd-boot.html" rel="noopener noreferrer"&gt;https://pysselilivet.blogspot.com/2020/10/raspberry-pi-1-2-3-4-usb-ssd-boot.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rpi</category>
      <category>homelab</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
