I have a Raspberry Pi 4 B with 2 disks connected via usb. One is an SSD and the other is an HDD. Both of them are in SATA to USB cases that have their own power supply each.
I've configured the Rpi4 to boot from USB, and put the OS in the SSD. The thing is that if I turn down everything, then turn on the SSD and the HDD and the same time, then turn on the RPi4, it all boots normally (the HDD takes some time to warm up and the SSD is faster)
But then I do sudo reboot
and for some reason the RPi4 does not boot. I think this is because the HDD somehow manages to answer faster than the SSD and the RPi4 thinks there is no bootable external disk (because the HDD is not bootable) so it just hangs there without booting.
If I turn off and then turn on everything again, it boots normally, but whenever I do reboot it just hangs again.
I've done some research but all I could find is some posts that recommend editing the file /boot/cmdline.txt
to something like this
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=<your part uuid goes here> rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
I've also had similar issues with a Raspbery Pi 3B with a USB HDD dock, if i put the SSD on the slot B it does not boot, but if i put the SSD on the slot A it always boots even with a normal reboot.
I've also seen that some people say that this happens because the power supply is not enough but I have the official Raspberry Pi power supply in both cases, each HDD has their own power supply and this is still happening so I'm not sure if that's the problem.
I've attached a screen to the RPi3B for testing just to see if it outputs something when it cannot boot, but it does not show anything at all, in fact, there is no output from the HDMI, the screen says it doesn't get any input.
I have also noticed on the usb dock that is connected to the RPi3B that when i swap places between the ssd (that has the boot info) and the hdd, only the hdd lights blink, the ssd ones do not, so i assume that the RPi3B reads first the hdd and doesn't even bother to check the ssd.
I've tried to put a monitor to the RPi4 to see what does it output, and this is the output
Every 20 seconds or so, the last 10 lines output again (it seems stuck in a boot loop)
The RPi3B does not output anything.
How can I fix this?