I have some Raspberries (3B/3B+/4) that I want to boot from SSD, but I also want to attach an HDD to them (the classic SSD for OS and HDD for data)

The thing is that this setup has give me a lot of headaches in the past and nowadays too. When the raspberry boots up, if it finds the SSD first, then everything works correctly. But, if for some reason it finds the HDD first, it won't boot up at all.

As long as the SSD is detected first no problem, but on power outages or reboots it can happen that it won't boot because it found the HDD first which is not bootable.

I couldn't fix that after a lot of tinkering so I was wondering if it could be a viable option to set only the boot partition on the SD card then have the rest of the OS on the SSD and the data in the HDD.

I think some people have managed to do this, but I couldn't find much literature/tutorials on how to do it.

How can I do this?

Thanks in advance

1 Answer 1


Here's one way

create a file, lets call it sd.txt, with the following content

label: dos
device: /dev/mmcblk0

/dev/mmcblk0p1 : start=        8192, size=      524288, type=c

Now, insert your SD card, and run

sudo sfdisk /dev/mmcblk0 < sd.txt

Now run


Look for the line that starts with /dev/mmcblk0p1 - should look something like this (with different values for the UUID/PARTUUID of course)

/dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="0123-4567" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b000b135-01"

and take note of the PARTUUID

Edit (as root) /etc/fstab and find the line that looks like

PARTUUID=deadbeef-01  /boot           vfat    defaults,flush    0       2

and replace the PARTUUID (deadbeef-01 in the example) with the PARTUUID you found before (b000b135-01 in this example) - note, do NOT include any quotes (") i.e. in this example it'll change to

PARTUUID=b000b135-01  /boot           vfat    defaults,flush    0       2

Now copy the boot partition from the SSD to the SD card

sudo dd if=/dev/sda1 of=/dev/mmcblk0p1

Reboot and enjoy

  • I have a couple questions: (1) All these steps should be done with a raspberry that already boots up with an SSD right? (2) After this, shouldn't I configure the raspberry to look for the boot partition on the SD card? IIRC some models have a setting you have to turn on/off to enable booting up from USB or SD card (3) In your first code block, are the numbers after start and size already always that size or that's your guess? Should I look for the numbers on my specific case? Thanks in advance
    – RabidTunes
    Dec 11, 2022 at 10:05
  • Have you set your pi 3b/3b+/4b to boot from usb first? You never mentioned that @RabidTunes I would recommend you set your pi 3b/3b+/4b to boot from sd card first if you want to boot from sd card as you stated in your request for assistance Dec 11, 2022 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.