I'm building a new Pi 4b system using the downloaded image of OpenHAB 2.5.3 for a Raspberry Pi on a 64 GB MicroSD card. I'm also going to be using a ridiculously large 500 GB SSD. What I would like to do is to set up separate partitions on the SSD for the main directories, as well as a good size swap file for the 4 GB RAM, and reserve space at the end of the SSD for over-provisioning.

While I have a little Linux experience it's not much. Just enough to be dangerous I guess. LOL.

I was thinking that maybe I start the system using the SD card and let it do it's initial setup and expand the filesystem to fill the SD card. Then use something like "parted" to create various partitions on the SSD, so I could then copy things like /boot, /home, /usr, /opt, /var, etc to their own partitions, as well as creating a swap partition. I seemed to recall from years back that it was a good idea to create separate partitions for various directories. This may not be the case for Debian or an SSD but I don't know if that's true or not.

Once the system is running off the SD card, I would then "somehow" copy those directories or whichever ones someone suggests as being a good layout for a Debian system from the SD card to the SSD.

Since it's a Pi 4b, if I understand this correctly, unlike my Pi 3B's the Pi 4B isn't currently able to boot from the SSD and I would need to have an SD card with the /boot partition to boot from and then switch over to the SSD.

I would also like to keep the very end of the SSD as an unallocated partition for over-provisioning, x GB's or roughly 10% of the SSD.

In addition to OpenHAB, I'm also thinking about doing a webserver on that system as well, somewhere down the road.

I'm at the point where it's like "and then some magic happens" since I don't know how to get the system from the SD card to the SSD and the various directories into partitions on the SSD. I'm very open to suggestions for relative partition sizes on the 500 GB SSD, which directories make sense to have their own partition.

I'm aware of "dd" and I saw something called "rpi-clone" but I don't know if that would be able to copy single directories to an SSD partition. I've also heard of Amanda, for back up and restore, and I'm thinking maybe that's the way to go, once I figure out how to do it. I'm hoping someone can point me in the right direction.

Does anyone have any suggestions on how to do this or is it not worth it?

Thanks, Mark

| improve this question | | | | |

(https://www.tomshardware.com/news/boot-raspberry-pi-from-usb,39782.html) This article here shows you how to boot from an ssd. In a nutshell, you basically make the boot directory point to the ssd and from there it just uses the ssd as a boot drive. Hope this helps.

| improve this answer | | | | |
  • It would be helpful if you could quote a bit more substantially from your source, and explain it in more detail. – user96931 Mar 30 at 16:19
  • Thanks for your reply. I can boot a Pi 3B from USB. I just need to do more research on what to do. From my use of AIX/UNIX systems years ago, the system disk had multiple partitions for certain dirs. So some dirs like /usr, /home, etc had their own partitions.plus one or more for swap. I'm looking for std or "typical" layouts, how big to make the swap part for 4GB RAM. Then what is the most reliable way to copy dirs which are all in /dev/mmcblk1 to their own partitions on SSD. I s/b able to put system to copy on SD card USB reader, boot Pi from another SD Card and then copy things to SSD. – SDMark Mar 31 at 7:52
  • I gave up on multiple slices for the filesystem. It looks like the swap space is pretty small, around 100MB even for 4 GB of memory, and almost none of it is currently used. As yet. I was thinking separate partitions for parts of the file system might speed it up, but I realized with an SSD that's negligible. I've researched how to list and change partition PARTUUIDs. I had been been using root=/dev/sda2, but using the PARTUUID works better. I'm just going with 3 partitions. 1 for /boot, 1 for /, and a 3rd one at the end for overprovisioning. – SDMark Apr 21 at 4:05

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.