royhenderson
Posts: 71
Joined: Sat Apr 09, 2016 1:56 pm
Location: Scotland

Hybrid (SD + SSD) boot 101?

Sat Oct 05, 2019 7:22 pm

Just to confirm my understanding of the hybrid boot process (meaning boot from SD and then switch to SSD) for either an RPi-3 or 4 with Buster:

The only partition needed on the SD card is the small FAT BOOT which simply holds enough to get the system started to the point of telling it to then look to the SSD for everything else?

In this configuration, does the SSD need a FAT BOOT partition or only the Linux partition?

Finally, I am assuming that the SD is practically read-only here and thus subject to very little write wear?

TIA

User avatar
rpdom
Posts: 17405
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Hybrid (SD + SSD) boot 101?

Sat Oct 05, 2019 7:48 pm

royhenderson wrote:
Sat Oct 05, 2019 7:22 pm
The only partition needed on the SD card is the small FAT BOOT which simply holds enough to get the system started to the point of telling it to then look to the SSD for everything else?
Yes. About 250MB on Buster.
In this configuration, does the SSD need a FAT BOOT partition or only the Linux partition?
Only the Linux partition. You have to make sure the cmdline.txt on the SD card and the /etc/fstab file on the SSD point to the correct devices/PARTUUIDs.
Finally, I am assuming that the SD is practically read-only here and thus subject to very little write wear?
Yes. It will only get written to during updates that affect the "firmware", kernel or other boot code.
Unreadable squiggle

royhenderson
Posts: 71
Joined: Sat Apr 09, 2016 1:56 pm
Location: Scotland

Re: Hybrid (SD + SSD) boot 101?

Sat Oct 05, 2019 7:58 pm

Excellent - thanks!

fbe
Posts: 644
Joined: Thu Aug 17, 2017 9:08 pm

Re: Hybrid (SD + SSD) boot 101?

Sat Oct 05, 2019 8:06 pm

Only the boot (FAT) partition is needed on the SD-Card, only the root (Linux) partition is needed on the SSD. Write access to the boot partition is needed for kernel/bootloader updates only and for configuration changes in config.txt or cmdline.txt
...
Format your drives accordingly and copy everything from a Raspbian boot partition to your SD-Card and from the root partition to the SSD.
Then you have to care for cmdline.txt on the boot partition (SD-card) and /etc/fstab on the root partition.

You can use:

Code: Select all

lsblk -o NAME,SIZE,TYPE,PARTTYPE,FSTYPE,MOUNTPOINT,PARTUUID
to figure out the partuuid that you have to use in these files.

If you didn't boot from your source Raspbian, there is a initial resizing call (init=/usr/lib/raspi-config/init_resize.sh) configured in cmdline.txt on the boot partition, that could be removed.

That's it.

RonR
Posts: 1382
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Hybrid (SD + SSD) boot 101?

Sun Oct 06, 2019 3:48 am

royhenderson wrote:
Sat Oct 05, 2019 7:22 pm
Just to confirm my understanding of the hybrid boot process (meaning boot from SD and then switch to SSD) for either an RPi-3 or 4 with Buster:

The only partition needed on the SD card is the small FAT BOOT which simply holds enough to get the system started to the point of telling it to then look to the SSD for everything else?

In this configuration, does the SSD need a FAT BOOT partition or only the Linux partition?

Finally, I am assuming that the SD is practically read-only here and thus subject to very little write wear?

TIA

I find it simpler and more flexible to use Etcher to put a standard Raspbian image on the SD card and leave it in its working state (except for changing the 'root=' portion of cmdline.txt. It's more work to make an SD card with just a FAT partition and then copy all the necessary files to it. If you ever get into trouble, you still have a working Raspbian system on the SD card to fall back on for trouble-shooting.

usb-boot at Running Raspbian from USB Devices : Made Easy will get you there in short order.

fbe
Posts: 644
Joined: Thu Aug 17, 2017 9:08 pm

Re: Hybrid (SD + SSD) boot 101?

Sun Oct 06, 2019 11:48 am

RonR wrote:
Sun Oct 06, 2019 3:48 am
If you ever get into trouble, you still have a working Raspbian system on the SD card to fall back on for trouble-shooting.

usb-boot at Running Raspbian from USB Devices : Made Easy will get you there in short order.
Did you ever boot a system where boot partition and root partition are out of sync? The boot partition on the SD card gets updated and the root partition not. I find it easier to have a second working SD card than to repair your mess if I get in trouble.

RonR
Posts: 1382
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Hybrid (SD + SSD) boot 101?

Sun Oct 06, 2019 5:22 pm

fbe wrote:
Sun Oct 06, 2019 11:48 am
RonR wrote:
Sun Oct 06, 2019 3:48 am
If you ever get into trouble, you still have a working Raspbian system on the SD card to fall back on for trouble-shooting.

usb-boot at Running Raspbian from USB Devices : Made Easy will get you there in short order.
Did you ever boot a system where boot partition and root partition are out of sync? The boot partition on the SD card gets updated and the root partition not. I find it easier to have a second working SD card than to repair your mess if I get in trouble.

There's no mess and no repair required. Simply run:

Code: Select all

apt-get update
apt-get upgrade

and all is well.

fbe
Posts: 644
Joined: Thu Aug 17, 2017 9:08 pm

Re: Hybrid (SD + SSD) boot 101?

Sun Oct 06, 2019 6:55 pm

Just did that. The thing even booted to the Desktop. Only my keyboard didn't work. :( Maybe because it's a wireless one. Needed a second machine to enable ssh and login remotely to run apt. No problem, if you are aware of that. You need it anyway to restore the old cmdline.txt

It's your choice.

Are you aware that you create a backup of the boot partition, that would work with your SD-card? It's on the USB drive. I know that, but who else of your users? Yes it's easy, if you know what partition is good for what.

RonR
Posts: 1382
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Hybrid (SD + SSD) boot 101?

Sun Oct 06, 2019 8:42 pm

fbe wrote:
Sun Oct 06, 2019 6:55 pm
Just did that. The thing even booted to the Desktop. Only my keyboard didn't work. :( Maybe because it's a wireless one. Needed a second machine to enable ssh and login remotely to run apt. No problem, if you are aware of that. You need it anyway to restore the old cmdline.txt

It's your choice.

If you had created a fully working SD card in the first place (ssh + wpa_supplicant.conf files in the boot partition), you wouldn't have needed to do anything except change the 'root=' in /boot/cmdline.txt to 'root=/dev/mmcblk0p2' and reboot.
fbe wrote:
Sun Oct 06, 2019 6:55 pm
Are you aware that you create a backup of the boot partition, that would work with your SD-card? It's on the USB drive. I know that, but who else of your users? Yes it's easy, if you know what partition is good for what.

When booting to a USB device via an SD card, the BOOT partition on the USB device is not used. The SD card's BOOT partition is mounted on /boot.

If you use image-backup from Image File Utilities, the backup image file created is suitable for writing to either an SD card or another USB device and running without any modifications (the image file contains the boot partition from the SD card, not the USB device).

Return to “Beginners”