MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.78k stars 495 forks source link

Two USB drives, won't boot? #6316

Open mernamer opened 1 year ago

mernamer commented 1 year ago

Creating a bug report/issue

Required Information

Steps to reproduce

  1. Flash Dietpi to USB drive (connected via power hub)
  2. Boot, setup DietPi
  3. Add second drive to powered hub.
  4. Reboot with both drives plugged in

Expected behaviour

Actual behaviour

Extra details

Output from lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid is this:

NAME   FSTYPE LABEL   SIZE RO TYPE MOUNTPOINT   PARTUUID                             UUID
sda                 465.7G  0 disk
├─sda1 vfat           128M  0 part /boot        c26b8af2-01                          9041-5D00
└─sda2 ext4         465.6G  0 part /            c26b8af2-02                          14bb0923-da43-46db-919f-a1b300fdc73f
sdb                 465.8G  0 disk
└─sdb1 ext4         465.8G  0 part /mnt/piDrive 23bee6e2-9f23-4916-85bf-a06c9da6c272 5375d312-1184-440e-8589-0969adbaf986

No errors from dmesg -l emerg,alert,crit,err

Set initial_turbo=0 via Performance options in dietpi-config, to rule out power, no change, also verified not the USB hub / PSU by trying other plugs on the hub and a different hub, issue persists. Feels like probably not power issue.

Followed steps from #5729 to update logs, digging through now, will update if I find something, also updated bug report:

dietpi-software uninstall 103
mkdir /var/log/journal
poweroff

Attach both drives and let it trying to boot for a while. Then power cycle and unplug the second drive again to allow for boot. Then check

journalctl

...[in case someone is trying based on this ticket] can revert the RAM logging via:

systemctl stop systemd-journald
rm -R /var/log/journal
systemctl start systemd-journald
dietpi-software install 103
reboot

ETA: Originally posted details in comment, just condensing details already tried for readability.

Joulinar commented 1 year ago

How are the external drives powered? Do they have an own PSU or just connected to USB ports?

mernamer commented 1 year ago

Sorry, meant to share it's a PSU, updated above. Also, following steps previously provided on #5729, since the issue seems similar, originally posted here, but condensed into original post for clarity / readability.

MichaIng commented 1 year ago

Do you have a UART adapter to check early boot messages via serial console?

What kind of USB drives are those? Did you try it with a different (secondary) one and with a different USB cable?

I think we won't be able to definitely debug without a serial console. And it might still be a voltage issue, e.g. if the USB hub is not able to cover quick power peaks when both drives are powering up just when booting the RPi and are not spinning (of those are spinning HDDs) yet before.

The HDD docking station I use here is spinning up the drives as fast as it gets power, so I'm able to boot the RPi ones those are at full speed. If this is possible as well in your case, would be at least worth to test.

mernamer commented 1 year ago

Recently got UART adapter, going to try serial console.

They're older drives, but did try with other secondary drives, issue seems to persist. Trying an alternate USB hub as well. Won't rule out the voltage issue if it doesn't work, but worth a shot.

Will circle back when have more info.