sandoz
Posts: 26
Joined: Sun Sep 23, 2012 7:18 am

rpi3 not booting with usb flash drive connected

Thu Jan 16, 2020 7:31 am

my rpi3 is not booting with a usb flash drive connected.
First i thought it was a faulty flashdrive, but after change it to another disk, i get the same problems (kernel panic)

I tried directly to the usb connectors on the pi, and through a powered hub, but no result.
What can be wrong?

User avatar
HawaiianPi
Posts: 5199
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: rpi3 not booting with usb flash drive connected

Thu Jan 16, 2020 8:36 am

Is the system booting from USB or SD card?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

sandoz
Posts: 26
Joined: Sun Sep 23, 2012 7:18 am

Re: rpi3 not booting with usb flash drive connected

Thu Jan 16, 2020 9:21 am

Booting from ssd, with boot partition on sd card

User avatar
HawaiianPi
Posts: 5199
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: rpi3 not booting with usb flash drive connected

Thu Jan 16, 2020 11:09 am

Then it's probably the way you are specifying the root partition and mount points (using /dev/sdxx instead of UUID or PARTUUID).

What's in your /etc/fstab file, and what does the following command return.
ls -l /dev/disk/by-partuuid
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

sandoz
Posts: 26
Joined: Sun Sep 23, 2012 7:18 am

Re: rpi3 not booting with usb flash drive connected

Thu Jan 16, 2020 11:28 am

No, I have disabled all mount points
For now when I reboot I manually have to mount.
I can only attach USB flash drive when the pi is booted, and then manually mount

When the USB drive is connected, the pi doesn't boot

sandoz
Posts: 26
Joined: Sun Sep 23, 2012 7:18 am

Re: rpi3 not booting with usb flash drive connected

Thu Jan 16, 2020 11:54 am

this is the last part of the error. I cannot find it in the logs:
Image
https://pasteboard.co/IQe5uWj.jpg

this is with a usb drive attached, without it no problems booting

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=5576ee7f-ebf9-4773-9988-7f8694f8c974  /boot           vfat    defaults          0       2
PARTUUID=f36137b7-7837-4281-960f-9a5b41dc6e31  /               ext4    defaults,noatime  0       1

#5576ee7f-ebf9-4773-9988-7f8694f8c974
#f36137b7-7837-4281-960f-9a5b41dc6e31


#PARTUUID=5576ee7f-ebf9-4773-9988-7f8694f8c974  /boot           vfat    defaults          0       2

#PARTUUID=d700cc54-02  /               ext4    defaults,noatime  0       1

#/dev/disk/by-uuid/9ca404c3-68b3-4215-b3d6-4d28b3af6f7e /mnt/usb        ext4    rw,relatime   0    2
#/dev/sdb1   /mnt/usb        ext4    rw,relatime   0    2

#/dev/sda1       /mnt/usb        ext4    rw,relatime   0    2


#UUID=9ca404c3-68b3-4215-b3d6-4d28b3af6f7e       /mnt/usb     ext4    defaults,noatime,noauto  0     0

# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

#mount smb share
//192.168.1.111/rpi_backup      /mnt/usb                cifs    uid=0,credentials=/home/pi/.smb,iocharset=utf8,noperm 0 0


sandoz
Posts: 26
Joined: Sun Sep 23, 2012 7:18 am

Re: rpi3 not booting with usb flash drive connected

Sat Jan 18, 2020 8:29 am

anyone? i have no idea

RonR
Posts: 786
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: rpi3 not booting with usb flash drive connected

Sat Jan 18, 2020 8:31 pm

sandoz wrote:
Sat Jan 18, 2020 8:29 am
anyone? i have no idea

Running Raspbian from USB Devices : Made Easy

sandoz
Posts: 26
Joined: Sun Sep 23, 2012 7:18 am

Re: rpi3 not booting with usb flash drive connected

Sat Jan 18, 2020 8:41 pm

Thank you, but that's not the problem

RonR
Posts: 786
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: rpi3 not booting with usb flash drive connected

Sat Jan 18, 2020 9:59 pm

sandoz wrote:
Sat Jan 18, 2020 8:41 pm
Thank you, but that's not the problem

There's a good chance it is. Your fstab is incorrect and usb-boot will set it up correctly for you (as well as your SD card's cmdline.txt).

A UUID is not the same as a PARTUUID, but you're using a UUID as if it is:

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=5576ee7f-ebf9-4773-9988-7f8694f8c974  /boot           vfat    defaults          0       2
PARTUUID=f36137b7-7837-4281-960f-9a5b41dc6e31  /               ext4    defaults,noatime  0       1

should be

Code: Select all

proc            /proc           proc    defaults          0       0
UUID=5576ee7f-ebf9-4773-9988-7f8694f8c974  /boot           vfat    defaults          0       2
UUID=f36137b7-7837-4281-960f-9a5b41dc6e31  /               ext4    defaults,noatime  0       1

A PARTUUID is eight hex digits followed by a partition number, for example: 1a3b5c7d-02

If you'd like to use PARTUUID's (which is the more common practice), you can find a device's PARTUUID with the 'blkid' command.

User avatar
HawaiianPi
Posts: 5199
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: rpi3 not booting with usb flash drive connected

Sun Jan 19, 2020 12:07 am

If that's really your /etc/fstab file, I'm surprised the system boots at all, with or without the extra USB drive.

Boot the system, connect the USB drive, and post the output of the blkid command.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

RonR
Posts: 786
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: rpi3 not booting with usb flash drive connected

Sun Jan 19, 2020 12:13 am

HawaiianPi wrote:
Sun Jan 19, 2020 12:07 am
If that's really your /etc/fstab file, I'm surprised the system boots at all, with or without the extra USB drive.

So was I. But I tried it, and the system actually boots: with a READONLY filesystem.

sandoz
Posts: 26
Joined: Sun Sep 23, 2012 7:18 am

Re: rpi3 not booting with usb flash drive connected

Tue Jan 21, 2020 2:03 pm

its not readonly here
anyway, here are the asked infos:

Code: Select all

[email protected]:~$ sudo blkid
/dev/mmcblk0p1: LABEL="boot" UUID="9304-D9FD" TYPE="vfat" PARTUUID="d700cc54-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="29075e46-f0d4-44e2-a9e7-55ac02d6e6cc" TYPE="ext4" PARTUUID="d700cc54-02"
/dev/sda1: LABEL="boot" UUID="9304-D9FD" TYPE="vfat" PARTLABEL="Microsoft basic data" PARTUUID="5576ee7f-ebf9-4773-9988-7f8694f8c974"
/dev/sda2: LABEL="rootfs" UUID="640f56d4-2a40-419e-a8e8-5f83dacbd444" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="f36137b7-7837-4281-960f-9a5b41dc6e31"
/dev/mmcblk0: PTUUID="d700cc54" PTTYPE="dos"
/dev/sdb1: UUID="9ca404c3-68b3-4215-b3d6-4d28b3af6f7e" TYPE="ext4" PARTUUID="46d90c2e-01"
cmdline.txt

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200 root=/dev/sda2 rootfstype=ext4 elevato$
i could not get the pi to boot from the ssd, with the sd card not inserted. Thats why i have the boot on sd, and the root on the ssd
i rsynced the sd to the ssd, then edited cmdline.txt, and its running ok now, except when i insert an extra usb dongle.

i see some strange thing: the sdcard and sda1 have the same UUID?

RonR
Posts: 786
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: rpi3 not booting with usb flash drive connected

Tue Jan 21, 2020 6:32 pm

sandoz wrote:
Tue Jan 21, 2020 2:03 pm
i could not get the pi to boot from the ssd, with the sd card not inserted.

That's because you have 'root=/dev/sda2' in cmdline.txt. When you insert another USB device, the new device is becoming /dev/sda and your SSD is becoming /dev/sdb.
sandoz wrote:
Tue Jan 21, 2020 2:03 pm
i see some strange thing: the sdcard and sda1 have the same UUID?

That's due to a flaw that was introduced in Raspbian Buster (devices no longer get a unique PARTUUID and UUID). It's left up to you to resolve this conflict.

usb-boot will correct all these issues for you, resulting in a system that boots reliably to the desired device regardless of whether you insert additional devices.

Return to “Troubleshooting”