bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Can't boot from usb external hard drive

Wed Dec 27, 2017 4:13 pm

Hi everyone

I need your help to make my Pi 3 Model B boot on my USB hard drive. It looks so simple when I read the instuctions or watching videos, but I can't make it works.

So i've buy a complete kit offered by canakit on amazon : https://www.amazon.ca/CanaKit-Raspberry ... berry+pi+3. The microSD car comes with NOOBs preinstalled.

From NOOBs, I've install raspbian-lite-strecht and I've follow this guide : https://www.raspberrypi.org/documentati ... des/msd.md
the output from the command "vcgencmd otp_dump | grep 17:" is good (17:3020000a) after the reboot.

Then, I've an old usb hard drive which I want to use for my Pi3 : https://www.amazon.com/LaCie-External-d ... YYPCY?th=1. Then, I've use Etcher to flash my HDD with the last image of raspbian (stretch). I also have create the SSH file.

So I've unplugged the Pi3, remove microSD card, plug my HDD, replug Pi3 and nothing happens. I've read on some forums that might cause by unsufficiant power from the Pi To manage the usb HDD. So I plus an USB hub with his own powersupply https://www.amazon.ca/D-Link-7-Port-Pow ... ered+dlink and the results are the same.

Can you please help me ?

P.S. Sorry for bad english!


k-pi
Posts: 930
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 12:04 pm

I've not had any problems converting my two RPi3B to boot from pendrives, maybe first just check if it works if you use a pendrive.

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 12:22 pm

Between the time i post my question and the time it was publish, I've done this :

After all these steps, I've buy another microSD card which I've flash with Raspbian Stretch, and I've repeat all teps describe before. Then, I put this microSD card in usb stick adapter, plug it to the Pi3 and still doesn't boot on the microSD card which has work before when the card wasn't in the usb stick.

Seems like I have a real problem with usb boot.

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 12:28 pm

What do you get from vcgencmd otp_dump | grep 17:?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 12:28 pm

17:3020000a

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 12:41 pm

So the problem must lie in the layout of your partitions on your USB stick.

/boot (which contains bootcode.bin, cmdline.txt, config.txt and a bunch of other stuff) needs to be a primary FAT12, FAT16 or FAT32 partition with around 100MB of space. It's primary #1 on my USB devices.

the root fs (as defined in /boot/cmdline.txt) needs to be an ext4 partition can be primary or extended.

Code: Select all

pi@eagle:~$ sudo fdisk -l /dev/sda
[sudo] password for root:
Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x83b2a35c

Device     Boot  Start       End   Sectors  Size Id Type
/dev/sda1         2048    133119    131072   64M  b W95 FAT32
/dev/sda2       133120 312581807 312448688  149G 83 Linux
pi@eagle:~$
/boot/cmdline.txt

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 root=UUID=2ebfb7f2-0c0b-4de2-964c-8fe9b20aacee rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=10  plymouth.ignore-serial-consoles disable_splash=1
I'm using a UUID there so that I can be 100% sure the right partition gets mounted as rootfs.

Code: Select all

pi@eagle:~$ sudo blkid /dev/sda
/dev/sda: PTUUID="83b2a35c" PTTYPE="dos"
pi@eagle:~$ sudo blkid /dev/sda1
/dev/sda1: UUID="4887-B621" TYPE="vfat" PARTUUID="83b2a35c-01"
pi@eagle:~$ sudo blkid /dev/sda2
/dev/sda2: UUID="2ebfb7f2-0c0b-4de2-964c-8fe9b20aacee" TYPE="ext2" PARTUUID="83b2a35c-02"
pi@eagle:~$
You may also need to remove every other USB device there's one of my RPis that doesn't like having a USB keyboard inserted when it boots.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 1:24 pm

Here is the result of the command fdisk :

Code: Select all

sudo fdisk -l /dev/sda

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9dee3daa

Device     Boot Start     End Sectors  Size Id Type
/dev/sda1        8192   93236   85045 41.5M  c W95 FAT32 (LBA)
/dev/sda2       94208 3629055 3534848  1.7G 83 Linux
the result of the command blkid :

Code: Select all

sudo blkid /dev/sda*

/dev/sda: PTUUID="9dee3daa" PTTYPE="dos"
/dev/sda1: LABEL="boot" UUID="CDD4-B453" TYPE="vfat" PARTUUID="9dee3daa-01"
/dev/sda2: LABEL="rootfs" UUID="72bfc10d-73ec-4d9e-a54a-1cc507ee7ed2" TYPE="ext4" PARTUUID="9dee3daa-02"
The content of /boot/cmdline.txt was :

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=37665771-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh
Modified to :

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=UUID=72bfc10d-73ec-4d9e-a54a-1cc507ee7ed2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh
Still no boot from the external usb HDD

No other USB pluged into RPI3, only HDMI

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 8:48 pm

This works on one of my RPis with a hard drive

Code: Select all

/dev/sda: PTUUID="02532899" PTTYPE="dos"
/dev/sda1: SEC_TYPE="msdos" LABEL="BOOT" UUID="A3D1-68F2" TYPE="vfat" PARTUUID="02532899-01"
/dev/sda2: LABEL="root" UUID="9a9ffb1b-8a51-4678-9f56-1a89f7977e78" TYPE="ext4" PARTUUID="02532899-02"
/boot/cmdline.txt

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=02532899-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=10
/etc/fstab

Code: Select all

proc /proc proc defaults 0 0
UUID=A3D1-68F2 /boot vfat defaults 0 2
UUID=9a9ffb1b-8a51-4678-9f56-1a89f7977e78 / ext4 defaults,noatime 0 1


I'm mixing and matching the use of PARTUUID and UUID (can't remember why I did that).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 11:32 pm

I suppose you want me to boot on USB throught the microSD card isn't it ? I don't try this actually because, it's not the solution I look to at this moment. I want to boot from USB without any microSD card ?

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 11:37 pm

There's no SDCard in any of my three RPi 3Bs. All boot straight from their USB devices.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 11:42 pm

Can't make it works! Does my RPI power supply is strong enough ? 5V 2.5A

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't boot from usb external hard drive

Thu Dec 28, 2017 11:44 pm

What happens if you boot with an SDCard with just bootcode.bin on it, nothing else?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Thu Feb 08, 2018 7:42 pm

I've just format a new SD card, put the bootcode.bin file on it and nothing happened.

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: Can't boot from usb external hard drive

Fri Feb 09, 2018 3:48 pm

It's possible that your external/adapter drive isn't "ready" at the time the boot code tries to read it. In which case you would need the SD card. Then you would need to add rootwait or boot_delay=nnn to /boot/cmdline.txt. Or get an adapter/drive that can spin up fast enough if thats the problem.
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

Nightwalker83
Posts: 43
Joined: Mon Sep 19, 2016 1:05 pm

Re: Can't boot from usb external hard drive

Sat Feb 10, 2018 1:46 pm

DougieLawson wrote:
Thu Dec 28, 2017 8:48 pm
This works on one of my RPis with a hard drive

Code: Select all

/dev/sda: PTUUID="02532899" PTTYPE="dos"
Why put /dev/sda? All the tutorial I have seen only put the partitions. Is there something I am missing as to why this should be done?

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Mon Feb 12, 2018 1:20 am

My friend has a RPI3 and he was able to boot on his USB HDD. So we tried with his HDD and it works at first try. We also test another usb dongle which boot with succes ont it.

So, it seems like my HDD is too slow to wake before the boot. Is there anything I can do?

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: Can't boot from usb external hard drive

Mon Feb 12, 2018 9:32 am

Did you try your HDD in your friends Pi?
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

bigpino67
Posts: 18
Joined: Wed Dec 27, 2017 3:46 pm

Re: Can't boot from usb external hard drive

Mon Feb 12, 2018 1:32 pm

Yes we did, doesn't works on his RPI3 too!

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: Can't boot from usb external hard drive

Mon Feb 12, 2018 2:49 pm

Does the drive start to spin up when you apply power to the pi? If so, try powering off the pi (just the pi) for 5-10 seconds and then re-apply power to the pi. Is it able to boot then? If not, you are probably stuck with the SD card or get a different adapter+hdd.
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

Return to “Advanced users”