Hi,
I have done quite a lot of searching and can only find information to run the boot loader off a SD card and then run the OS off of the SSD.
I am interested in stability, not speed.
This is why I would like to know if it is possible to remove the need for a SD card, and run the Pi Zero completely off a SSD connected via SATA-USB2.0 cable.
From my understanding the Pi Zero doesn't have USB boot like the Pi 4 has. I used the 'sudo rpi-eeprom-update -d -a' method previously to run the Pi4 from SSD, but when I use the command on the Pi Zero it states it is a command only compatible with Pi 4.
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: Pi Zero Boot from SSD
nikoee wrote: ↑Thu Jun 03, 2021 10:21 amHi,
I have done quite a lot of searching and can only find information to run the boot loader off a SD card and then run the OS off of the SSD.
I am interested in stability, not speed.
This is why I would like to know if it is possible to remove the need for a SD card, and run the Pi Zero completely off a SSD connected via SATA-USB2.0 cable.
From my understanding the Pi Zero doesn't have USB boot like the Pi 4 has. I used the 'sudo rpi-eeprom-update -d -a' method previously to run the Pi4 from SSD, but when I use the command on the Pi Zero it states it is a command only compatible with Pi 4.
https://www.raspberrypi.org/documentati ... /README.md
Take what I advise as advice not the utopian holy grail, and it is gratis !!
Re: Pi Zero Boot from SSD
Hi - thank you very much.fruitoftheloom wrote: ↑Thu Jun 03, 2021 11:48 amnikoee wrote: ↑Thu Jun 03, 2021 10:21 amHi,
I have done quite a lot of searching and can only find information to run the boot loader off a SD card and then run the OS off of the SSD.
I am interested in stability, not speed.
This is why I would like to know if it is possible to remove the need for a SD card, and run the Pi Zero completely off a SSD connected via SATA-USB2.0 cable.
From my understanding the Pi Zero doesn't have USB boot like the Pi 4 has. I used the 'sudo rpi-eeprom-update -d -a' method previously to run the Pi4 from SSD, but when I use the command on the Pi Zero it states it is a command only compatible with Pi 4.
https://www.raspberrypi.org/documentati ... /README.md
I have worked my way into https://github.com/raspberrypi/usbboot
I followed the instructions:
git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
sudo apt install libusb-1.0-0-dev
make
sudo ./rpiboot
Then all it says is rpiboot stuck on waiting for BCM2835/6/7/2711
Is usbboot correct for my application? Using SSD as boot drive?
Sorry I am not that experienced with this stuff.
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: Pi Zero Boot from SSD
nikoee wrote: ↑Thu Jun 03, 2021 12:48 pmHi - thank you very much.fruitoftheloom wrote: ↑Thu Jun 03, 2021 11:48 amnikoee wrote: ↑Thu Jun 03, 2021 10:21 amHi,
I have done quite a lot of searching and can only find information to run the boot loader off a SD card and then run the OS off of the SSD.
I am interested in stability, not speed.
This is why I would like to know if it is possible to remove the need for a SD card, and run the Pi Zero completely off a SSD connected via SATA-USB2.0 cable.
From my understanding the Pi Zero doesn't have USB boot like the Pi 4 has. I used the 'sudo rpi-eeprom-update -d -a' method previously to run the Pi4 from SSD, but when I use the command on the Pi Zero it states it is a command only compatible with Pi 4.
https://www.raspberrypi.org/documentati ... /README.md
I have worked my way into https://github.com/raspberrypi/usbboot
I followed the instructions:
git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
sudo apt install libusb-1.0-0-dev
make
sudo ./rpiboot
Then all it says is rpiboot stuck on waiting for BCM2835/6/7/2711
Is usbboot correct for my application? Using SSD as boot drive?
Sorry I am not that experienced with this stuff.
The link clearly states USB Boot on the Zero is not supported, and an SD Card is required to boot up, whilst the Operating System is on the SSD.
Special bootcode.bin-only boot mode
........
This is useful for the Raspberry Pi 1, 2, and Zero models, which are based on the BCM2835 and BCM2836 chips
Take what I advise as advice not the utopian holy grail, and it is gratis !!
Re: Pi Zero Boot from SSD
You only have to read the bold sentence at the top of https://www.raspberrypi.org/documentati ... des/msd.md to know that you are wasting your time.
Quis custodiet ipsos custodes?
Re: Pi Zero Boot from SSD
I was sent links to that page and just assumed it was an instruction that would apply to the pi zero too because it was linked to it. I saw that but assumed since it was linked to me maybe its not recommended but would work.drgeoff wrote: ↑Thu Jun 03, 2021 1:04 pmYou only have to read the bold sentence at the top of https://www.raspberrypi.org/documentati ... des/msd.md to know that you are wasting your time.
Re: Pi Zero Boot from SSD
From a reliability point of view, using an SD card for the boot and a USB SSD for the root may be better than putting both on the same device. The reason for this is the wear and usage patterns for the boot partition are much different than the root.
In particular, heavy read write usage of the root partition coupled with wear leveling algorithms used for flash memory on hardware without power-loss protection is what generally leads to a non-bootable Pi. Placing root on the SSD means that boot is the only thing left on the SD card. Since very little read write activity occurs with the boot partition, the SD card consequently is much less likely to experience a fault and the Pi more likely to boot as a result.
Re: Pi Zero Boot from SSD
With the Zero you must have an SD card, but it only needs the file bootcode.bin, everything else is on the SSD.I am interested in stability, not speed.
I don't think anything gets written to the SD card so it should be stable and long lasting.
-
- Posts: 16107
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: Pi Zero Boot from SSD
That's because no Pi prior to the Pi4B has an EEPROM chip on the board.
The fundamental problem you are running into is that the BCM2835 (the SoC on the Pi0) has a ROM bootloader that only knows about the SD card. So it has to read something from the card that knows to look for another device to continue with the next boot stage.
It was only with the Pi3B (and, later, the Pi2Bv1.2) that the SoC ROM was able to look for USB attached mass storage devices. If you really want a smaller (than a B-series) board that will boot from USB, you might consider the Pi3A+.
Re: Pi Zero Boot from SSD
It's also worth mentioning that if you want stability over speed with a Pi Zero, it might be a good to clock it back to 700 MHz and turn off the default overvolt as well.W. H. Heydt wrote: ↑Thu Jun 03, 2021 3:59 pmThat's because no Pi prior to the Pi4B has an EEPROM chip on the board.
The fundamental problem you are running into is that the BCM2835 (the SoC on the Pi0) has a ROM bootloader that only knows about the SD card. So it has to read something from the card that knows to look for another device to continue with the next boot stage.
It was only with the Pi3B (and, later, the Pi2Bv1.2) that the SoC ROM was able to look for USB attached mass storage devices. If you really want a smaller (than a B-series) board that will boot from USB, you might consider the Pi3A+.
My understanding is that 700 MHz was the design specification of the SOC. I've had good luck increasing the stability by turning off the default overclock settings.
Re: Pi Zero Boot from SSD
That might be true for some HDD's but a SSD doesn't physically section storage into partitions, the SSD will map any content to any cell it wants.
Re: Pi Zero Boot from SSD
That's right. The reason I said greater reliability can result when boot and root partitions are on a separate devices is because flash cells can move between partitions as a result of wear leveling.
Re: Pi Zero Boot from SSD
Can anyone suggest a good guide for migrating from an SDcard install on a zeroW to sd boot and ssd root?
Re: Pi Zero Boot from SSD
Depends if you know a bit about partitions and filesystems or not. One of my rpi4 with ssd still boots off sdcard. It's fairly trivial. Clone the sdcard to ssd using method of choice then alter /sdcard/boot/cmdline.txt so it points to /ssd/rootfs/ and modify /ssd/rootfs/etc/fstab accordingly.
The trouble is you need to make decisions pertinent to your use-case. There's no need to have /ssd/boot/ (for instance) but it can be useful to have a copy of /sdcard/boot/ but that means writing/using a personalised apt-get update/upgrade script. It may be useful/required to not use PARTUUID (at least temporarily) during the process. Your ssd is likely to be larger than the sdcard so you'll need to expand /ssd/rootfs/ and the point at which you do this can be made easier/harder depending on if you have a linux PC handy. A final note: moving to an ssd is an opportunity to split out /rootfs/ into more than one partition (not as trivial). I do not know if an rpiZ will boot off a gpt disk.
Re: Pi Zero Boot from SSD
I am running a pihole DNS server with openvpn and a mqtt/node-red/grafana/influxdb combination to receive, log and view some home automation data. This is all on a pi zero w. I want to start using a Samsung SSD and SATA USB adapter. The pi seems to be passing enough power on to the SSD but maybe I won't really know until I put the system on it.
I know a bit about partitions and so on from Linux installs and repartitioning in the past (like ten years ago) but it's all a bit rusty.
I know a bit about partitions and so on from Linux installs and repartitioning in the past (like ten years ago) but it's all a bit rusty.
Re: Pi Zero Boot from SSD
Re: Pi Zero Boot from SSD
Oh great, I misunderstood some of the posts above which I thought were suggesting it didn't work on a zero.
Re: Pi Zero Boot from SSD
I'm sorry if I'm being dense but I've tried following the instructions in the usb-boot guide and nothing happens. What do I have to do to initiate usb-boot so I can transfer the sdcard files (i.e the current OS) to the SSD, bearing in mind this is via SSH. I have prepared another sd card with bootcode.bin.
Re: Pi Zero Boot from SSD
alexnh wrote: ↑Sat Jun 05, 2021 8:08 pmI'm sorry if I'm being dense but I've tried following the instructions in the usb-boot guide and nothing happens. What do I have to do to initiate usb-boot so I can transfer the sdcard files (i.e the current OS) to the SSD, bearing in mind this is via SSH. I have prepared another sd card with bootcode.bin.
There's no 'another sd card with bootcode.bin' involved.
1. Back up your original SD card (just to be safe).
2. Download usb-boot.zip.
3. Unzip usb-boot.zip
4. Make usb-boot executable with 'chmod +x usb-boot'.
5. Run usb-boot with 'sudo ./usb-boot'.
Re: Pi Zero Boot from SSD
I don't understand. It says a zero requires an Sdcard with bootcode?
Re: Pi Zero Boot from SSD
I think that there is some confusion between RonR's usb-boot and Raspberry Pi's usbboot programs. They do very different things.
In order to boot a PI Zero from a USB storage device you do still need an SD card with bootcode.bin on. The rest of the software can be on a USB storage device.
In order to boot a PI Zero from a USB storage device you do still need an SD card with bootcode.bin on. The rest of the software can be on a USB storage device.
Unreadable squiggle
Re: Pi Zero Boot from SSD
In this thread, above. The pi zero cannot boot directly from SSD, it requires an Sdcard with bootcode.bin.
Re: Pi Zero Boot from SSD
Thank you. So can I use dd or some other imager to clone my install?rpdom wrote: ↑Sat Jun 05, 2021 8:33 pmI think that there is some confusion between RonR's usb-boot and Raspberry Pi's usbboot programs. They do very different things.
In order to boot a PI Zero from a USB storage device you do still need an SD card with bootcode.bin on. The rest of the software can be on a USB storage device.