RPi4: No boot from USB at this moment, so use the workaround for now.
I moved from a 32gb Sandisk Ultra SD card to a 240gb Crucial SSD on a Pi 3B+ and performance is very similar.
Im moved from SD Card on a RPi4 to SSD.
Speed is better. Less stress because SDCard wonāt fail anymore. Its only used to boot first part rest goes to SSD
Thanks for writing down these instructions, but unfortunately, you have some mistakes in your description, that you shouldnāt publish to other ānot-so-familiarā Rasbpian users.
- You donāt need to format your SSD in FAT. It doesnāt do any good (fortunately it doesnāt harm either, but thatās not the point, itās not necessary), otherwise you wouldnāt reformat it with the next step.
- You should never ever assume, that drives are always the same mount point in Linux.
/dev/sdXY
can be every usb drive. To know which mount is always correct, you should use aPARTUUID
from exactly this drive (your SSD). - the
rsync
command is doubled,-v
shows all activities regarding the sync, whereas--progress
shows only the status of the copying. Either one, not both. - In
cmdline.txt
itās like the above. Without knowing, which mount point is which, you shouldnāt assume. The correct handling would be to find the correct mount point andPARTUUID
withlsusb
andblkid
and set this. An example:
root=PARTUUID=abcdefg1234 rootfs_type=ext4
- Resize is an important part of the installation, otherwise you may end up with only a few GB of free space on your shiny, new SSD card (hint: the space, that your sd-card offers, so itās easy to make a 2TB SSD into a 64GB SSDā¦) On the other hand, if you donāt format your SSD, as said above, you wonāt have that problem, as your drive is already formatted with ext4ā¦
- You shouldnāt (and you donāt need to) use
sudo -i
. In this case itās even contra productive, as you install docker as root. Thatās not the way you should go, and itās not the way, Docker explicity states. You should run the docker install command as normal user, root isnotnever ever a good idea. - If you run the docker install as user, you do have the right permissions set, but you need to add the docker user to your usergroup.
sudo usermod -aG docker pi
These two points are working hand in hand: if you do install docker with incorrect user permissions, you will later run docker as root, which will compromise your system on day! - And last but not least, youāre using the wrong image for HomeAssistant. Itās either the RPi4 image, for this tutorial, or itās the RPi3 image, then this whole tut is uselessā¦
Tbh Iām impressed, that this image is running on a RPi4 without any errors. The forum is full of exactly this problem. Would be interesting to know, how yours is runningā¦
Again, thanks for writing this tutorial, itās always great, that others contribute, but next time please check the content more thoroughly before you post it. Especially the wrong use of permissions and the use of a not correct image will lead others to problems.
@paddy0174 Sorry for that. I posted because it worked for me. didnāt realise some things are not working for others. Beside some parts I found on the internet and used it.
For your last question: With this tut it works great on my RPi4! Rebooted many times because of adding new things in HA. No problems at allā¦
I initially migrated from an RPI 3B+ with SD card (32GB Sandisk Endurance) over to a Crucial BX500 120GB SSD but didnāt notice any performance improvements. The biggest improvement was moving to a 4GB RPI 4B with the same 32GB Sandisk Endurance card, where I noticed 3 day history graphs (of room temps, humidity etc) were loading up at least 50% faster.
Iām waiting for the Raspberry Pi Foundation to implement official USB boot support on the 4B before I switch back to the SSD to get the full benefits of USB 3 as well.
Just to let everyone know.
Most of the USB to SATA cases use simple chips (ASTMedia usually) that run around 25 to 50MB/Sec.
The only USB 2.5" cases I know of that do run fact are the Zalman ZM-VE500 that use ARM chip. This one is expensive (around $70) but it runs 300MB/Sec or so. I did not check the lower models.
I use these and only these USB SATA cases. I have tens of them and all are OK for few years now.
My mSATA with the x850 didnāt work. So got a sata drive with a cheap usb cable and now Iāve finally switched everything. Even got a 3d printed case, but might go caseless cuz noticed the cpu temps got higher.
Hi,
what RPi du you have? As far as I know itās not possible to boot from USB on a RPi4. Correct me, if Iām wrong.
Take a look here:
Yep, Pi4 is only bootable from USB, if you leave a microSD in it.
Well, I have a Raspberry pi 3.
I flashed a sd card with raspbian and added program_usb_boot_mode = 1 to the test file config.txt to boot from ssd.
but I have a problem, only sometimes it starts by ssd.
canāt always boot from ssd.
would appreciate help
Im using the suggested a3ssdā|--Kingston A400 120GB SSD (SA400S37)ā|--Startech USB3-SATA3 adapter (USB312SAT3CB)ā|--Yā|--Yā|--bootcode.binā|----|ā
And i am able to boot raspbian from my SSD just fine on my pi3, with an sd card with bootcode.bin on it.
However when I flash my hassos image, I just get nothing. Nothing on the IP address, and nothing on my monitor. Iāve waited for half an hour. Absolutely nothing.
Does anyone seems to know what I am doing wrong?
Check my post above: HASS.IO -> transfer from SD card to SSD or USB
I ended up purchasing a new SSD for 25ā¬ and Iām now a happy camper running off an SSD
@jelle2503, Iām not 100% sure what might be causing your problem, but that also happened to me the first time upgraded hassos when I converted to ssd. I think it was due to the new firmware that comes on new hassos installs. If your pi has older firmware (likely if you havenāt yet installed hassos >=3.4), the install process will involve a reboot after flashing firmware. Not sure, but I suspect that if you donāt have a newer firmware yet, the first flash to the new firmware may require an extra reboot or 2 before it runs properly (perhaps the hassos install isnāt handling the initial firmware upgrade properly, or thereās something in that firmware that requires a power off afterwards to setup properly).
All I know is Iāve updated hassos several times since with zero issues. At least 2 of those recent updates also included updated pi firmware. So if you have troubles at first, sometimes persisting to install again, or rebooting the pi when it appears to become unresponsive during install, may complete the firmware install after which it will work fine.
Just a noteā¦ it doesnāt actually flash anything. The firmware is in the āimageā it does not write to flash on the RPi itself. If you boot the Pi with an old SD-Card hey presto you are back to old firmware again.
Thanks for the insight; excellent info to know. Iām used to the world of arduino with āreal firmwareā, softbricking, etcā¦ so this is new to me. So then it must have been some other random problem that went away after a couple tries.
Someone is working on an automated solution for all this soon, in the meantime Iāve documented the manual steps (tested on RPi 4) here: https://github.com/home-assistant/operating-system/issues/164#issuecomment-602145682
I note that there is still no Raspberry Pi 4 option for direct boot to SSD, and it doesnāt look imminent either. You have to use an SD+SSD configuration. Raspberry Pi 3 can direct boot to USB, no SD card required: https://github.com/home-assistant/operating-system/blob/2e7e0398996c5fb39e566e9d6d72df2975ac9f39/Documentation/boards/raspberrypi.md
The last command:
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s--m raspberreypi3
returns:
bash: line 1: 404:: command not found.
If I go to the site, there are no files there. Can someone tell me what Iām doing wrong?
Thanks
Because you have the wrong link. You can find the correct link on the installation page.
The problem is, if the links get updated by home assistant, the tutorials mostly donāt get updated (understandable).
And you didnāt used the correct writing for raspberrypi
. So in the end, it should be:
curl -sL "https://raw.githubusercontent.com/home-assistant/installer/master/installer.sh" | bash -s -- -m raspberrypi3