Need help booting from USB

January 12, 2024, 17:10

ninsew

Hi, I recently bought a Pi4 to use as server for Home Assistant. I also bought a USB to SATA-connector to use a old(ish) SSD as boot device. However, I am having issues booting from the USB. From Googling I found that most people said you needed the official power adapter, which I bought and just got. Besides this, I've flashed a SD-card to get USB boot into the Pi. It works perfectly - the green light flashes rapidly. After this, I disconnect the power to the Pi, I insert the USB with the SSD, and give the Pi power. The red light is constantly on, with the green light flashing fast once, followed by keeping the light on for about 10 seconds. After that the green light turns off, and repeats after about 10 seconds. Any help is appriciated!

k9t33n

ok just checking you did the same as this guide https://discord.com/channels/818384379197784084/1193923435789824050 except with the ssd

k9t33n

a single fast and single long flash isn't on the list so maybe send a video

k9t33n

do you have a display by chance?

thunder07337

How much A does your power supply deliver?

oops.se

Did you execute the command sudo poweroff before disconnecting the power?

ninsew

Posted video above.

k9t33n

ok it is 1 short and 1 long

k9t33n

do you have a display? and answer the other questions above aswell

ninsew

I did not. I inserted the SD-card, which after a few seconds its showing me it's sucessful according to documentation. After that I disconnect the power. Did not know I could even access bash during that state.

ninsew

I don't have a micro HDMI so sadly no.

k9t33n

okay just be wheary you do need to shut it off before you remove the power

k9t33n

and what about your power supply?

ninsew


ninsew

This is what I've put on the MicroSD. According to documentation it should be done after it blinks green rapidly. Should I be able to run sudo poweroff when doing that?

ninsew

So, to sum it up, my steps: 1. Took Micro SD-card and installed the bootloader USB Boot via Raspberry Pi Imager. 2. Inserted the SD-card into my RPi4. 3. Connected it to the power. 4. Waited a couple of seconds until it started blinking green, according to documentation it was succesful. 5. Disconnected the power (pulling the cord) from the RPi. 6. Removed the SD-card. 7. Took a SSD, using a USB -> SSD-adapter, and used Raspberry Pi Imager to install HomeAssistant OS. 8. Plugged in the USB/SSD into the Pi, plugged in the power. 9. The Pi gives a code with 1 long, 1 short (see video). It does not show up in the router (when it's connected with ethernet cable), which it did when having RPi OS on the Micro SD-card. 10. Cried.

k9t33n

ok good

k9t33n

you shouldnt need to set it so it can usb boot, the pi 4 has it on the boot order by default

k9t33n

oh and the 10th step is crucial πŸ˜‚

k9t33n

ok do you have a usb stick?

ninsew

Kind of is.. I spent a couple of hours earlier this week until I understood that using the incorrect power adapter could cause the issue, been waiting a couple of days to get it delivered, yet it's not working.

ninsew

I do, should I try and see if it can boot from that if I install on it?

k9t33n

yes

k9t33n

without the home assistant

k9t33n

just follow this guide exactly https://discord.com/channels/818384379197784084/1193923435789824050 , no messing around with the boot order although youve already done something that changes it directly on the pi

ninsew

Yeah that gives me 3 (would like to say 2 but I assume I'm blind) short blinks. Will see if I even can get it to work with the SD-card now.

thunder07337

Which OS do you have installed, Bookworm or Bullseye?

ninsew

Bookworm 64bit, no desktop is what I'm trying with now.

thunder07337

Try it with Bullseye.

ninsew

Using the SD-card I'm able to get it to run. Should I try with Bullseye on the USB?

thunder07337

Yes

ninsew

Tried with Bullseye 64bit, no desktop, on the USB stick and same issue as before - 3 short flashes.

ninsew

Would it help if I the SD-card running and being able to SSH into it?

oops.se

To just disconnect the power without "shutdown" can cause your filesystem to be corrupt and unable to boot.

oops.se

That is wrong, between step 4 and 5 you need to shut down the system with the command sudo poweroff

ninsew

From my understanding, when using the bootloader I do not have access to any terminal. I assume I'm wrong then?

oops.se

Isn't you using a OS, just the bootloader? Then your correct, the bootloader can be accessed via the keyboard/video or serial port if configured.

ninsew

Using the SD-card, I am able to find both the USB stick and the SSD (via USB adapter), so atleast the USB ports are working:
pontus@raspberrypi:~ $ lsusb
Bus 002 Device 004: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp. JMS578 SATA 6Gb/s
Bus 002 Device 003: ID 0781:5581 SanDisk Corp. Ultra
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

oops.se

Nice

oops.se

Are you from the nordics ?

ninsew

I am from Sweden, yes.

oops.se

Well guess where Im from πŸ˜‰

oops.se

A hint: Stockholm area

ninsew

No idea πŸ˜…

ninsew

Anyways.. Considering I find the USB devices, that must be a good sign?

ninsew

After some trial and error, I actually got it to boot from my USB stick. No luck with the SSD, though.

k9t33n

ok thats a good sign

k9t33n

try formatting the ssd.

ninsew

Okay, after some more trial and error (meaning pulling in and out the SSD a couple of times), I did get it to work aswell. Both of these are by using Bullseye 64 bit without desktop environment. That being said, two issues remain. 1) It's not stable, as in I have to reboot the RPi a couple of times to get it to work, and 2) This is with a OS that's not the one I want to use. Issue #2 might be a question for another forum, but someone here might be able to help me with the first one (hopefully).

k9t33n

have you tried bookworm with the same technique?

ninsew

Well, kind of, before our discussion here. Do you reckon I should do that again?

k9t33n

yes make sure to formatt the card using the "erase" option at the bottom

k9t33n

just to make sure we have no problems

ninsew

Erase to FAT32 and then install Bookworm?

k9t33n

yes

ninsew

Jesus, how can I get all of the issues possible πŸ˜‚

ninsew

Will format it in some other way first

ninsew

Hm, yeah. Worked with Bookworm, first time trying it. And I noticed that I've forgotten the SD-card in the RPi, which might be what has helped me to get it to work

k9t33n

that's probs booting from the SD card

ninsew

FINALLY I got it working! Not sure how, or why, it worked. I did now leave the SD-card with the USB bootloader in the RPi, which I assume somehow helped me. I used USB 2.0 ports instead of 3.0 - will have to try to move it to 3.0 one eventually. Since it's going to be a HA server, once it works I'm kinda done.

ninsew

Thank you so much everyone for the help!

k9t33n

no problem

k9t33n

I am still suspicious that's it's not booting of of the SSD and instead of of the SD card or the usb stick

ninsew

Atleast HA is showing me using the SSD, in terms of storage.