kholi
Posts: 2
Joined: Wed Apr 12, 2017 6:51 am

Re: USB boot now working on Pi3

Wed Apr 12, 2017 6:55 am

I think I found a few things that are going to trip up less sophisticated folks if this isn't going to ultimately be encapsulated in a script or GUI utility.

User avatar
davidcoton
Posts: 4008
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: USB boot now working on Pi3

Wed Apr 12, 2017 9:10 am

kholi wrote:I think I found a few things that are going to trip up less sophisticated folks if this isn't going to ultimately be encapsulated in a script or GUI utility.
Great, it would be useful to document them here. Read this whole thread first because it's quite likely that some of them are already known.
Signature retired

User avatar
ColonelDare
Posts: 14
Joined: Wed Apr 12, 2017 9:01 am

Re: USB boot now working on Pi3

Wed Apr 12, 2017 11:10 am

Hahahaha (as in happy!). Having run my Pi3 booting from a 128GB ssd since last November - very stable but unable to update without breaking it, I decided to do a fresh install with Raspbian 2017-04-10. Spending most of yesterday trying to follow the 'Boot from SD instructions' I used before but kept failing. Working through the last few pages (12-14) of this blog I eventually caught up when I read DougieLawsons's:
You can then dd the SDCard to your USB stick, poweroff, pull the SDCard and it will boot from the USB stick (no changes needed to anything - because the clever folks at the RPF have built a system that works on both SDCard and USB with Raspbian 2017-04-10).
I then figured that I didn't need the SD card at all - I just 'restored' the fresh Raspbian image directly onto my SSD, plugged it in and booted with no card, and BINGO!!! works like a charm ( I had previously set the OTP bit on my Pi so no problems there). Start to finish, a few minutes, plus restoring my previously backed up files etc etc.

Thank you Dougie et al. for all your efforts - much appreciated :-)

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Wed Apr 12, 2017 2:55 pm

jitendra8819 wrote:When we originally announced the Raspberry Pi 3, we announced that we’d implemented several new boot modes. The first of these is the USB mass storage boot mode, and we’ll explain a little bit about it in this post; stay tuned for the next part on booting over Ethernet tomorrow. We’ve also supplied a boot modes tutorial over on the Raspberry Pi documentation pages.

Note: the new boot modes are still in beta testing and use the “next” branch of the firmware. If you’re unsure about using the new boot modes, it’s probably best to wait until we release it fully.
That's a quote from here:

https://www.raspberrypi.org/blog/pi-3-b ... rage-boot/

in case anyone is wondering. Note that the documentation is now out of date, and also that you no longer need the "next" branch of the firmware.

hommar
Posts: 172
Joined: Sat Mar 25, 2017 1:55 pm
Location: Russia, Yekaterinburg

Re: USB boot now working on Pi3

Wed Apr 12, 2017 6:22 pm

andrum99 wrote:Note that the documentation is now out of date
Actualy documentation:
Raspbberry Pi Bootmodes
How to boot from a USB Mass Storage Device on a Raspberry Pi 3

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Wed Apr 12, 2017 7:24 pm

hommar wrote:
andrum99 wrote:Note that the documentation is now out of date
Actualy documentation:
Raspbberry Pi Bootmodes
How to boot from a USB Mass Storage Device on a Raspberry Pi 3
Yup that's the documentation I meant. The page that is out of date is this one:

https://www.raspberrypi.org/documentati ... des/msd.md

I have submitted a pull request for an update to the page that reflects the fact that the process for getting USB boot working is now much simpler, as of the 2017-04-10 release of Raspbian / Raspbian Lite. See https://github.com/raspberrypi/documentation/pull/616.

ayttransfer
Posts: 1
Joined: Fri Apr 14, 2017 9:00 am
Contact: Website

Re: USB boot now working on Pi3

Sat Apr 15, 2017 11:17 am

Just a general notice to others looking into this USB booting. Once I forced another BRANCH=next rpi-update everything worked perfectly (using a SanDisk Ultra Fit USB 3.0 Flash Drive, 64 GB). I'm using my RPi3 normally without any need for an SD card. Further, other distributions besides Raspbian have also worked for me, including RetroPie and Ubuntu-MATE.
http://antalyatransferairport.com/

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: USB boot now working on Pi3

Sun Apr 16, 2017 2:48 pm

quick question:

i have flipped the usb boot bit in one of my RPI3s, but have been unsuccessful in booting via USB so far (after trying four different USB carriers and dongles), and hit the following two messages upon booting:

No caching mode page found.
Assuming drive caching write through.

any hints, tips, traps, tricks? (am using the latest Raspbian)

tia,

willie
on the Happy Easter Gulf of Mexico

User avatar
DougieLawson
Posts: 35790
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: USB boot now working on Pi3

Sun Apr 16, 2017 2:52 pm

Ignore them they are "informational" only.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: USB boot now working on Pi3

Sun Apr 16, 2017 3:26 pm

DougieLawson wrote:Ignore them they are "informational" only.
umm, tks Mr. Lawson, but the RPi3 doesn't boot, but instead hangs at these two messages...

any hint on an incantation?

willie
on the still-stumped Gulf of Mexico

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Sun Apr 16, 2017 3:54 pm

linux_author wrote:quick question:

i have flipped the usb boot bit in one of my RPI3s, but have been unsuccessful in booting via USB so far (after trying four different USB carriers and dongles), and hit the following two messages upon booting:

No caching mode page found.
Assuming drive caching write through.

any hints, tips, traps, tricks? (am using the latest Raspbian)

tia,

willie
on the Happy Easter Gulf of Mexico
Those messages are produced by the Linux kernel so they indicate that you have managed to boot from your USB mass storage device. The fact that is has got stuck at this stage would tend to indicate that Linux doesn't like something about your particular setup. I'm guessing you're seeing those messages underneath 4 Raspberry Pi logos?

The first thing I would try is to disconnect everything from your Pi 3 except for an HDMI connected display and the USB mass storage device which you are booting from. Then apply power. Hopefully an expert in USB booting on the Pi can chime in with some more useful suggestions beyond that.

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: USB boot now working on Pi3

Sun Apr 16, 2017 4:13 pm

tks! i finally figured it out (a slap of the forehead - i should have known better):

had to point /boot/cmdline.txt and /etc/fstab to /dev/sda !!!

tks to all posting in this thread - i now have a USB-bootable RPi3... now off to find a low-cost, low-power high-capacity storage device...

i know, i know, pick two...

:D

willie
on the USB-booting Gulf of Mexico

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Sun Apr 16, 2017 4:57 pm

linux_author wrote:tks! i finally figured it out (a slap of the forehead - i should have known better):

had to point /boot/cmdline.txt and /etc/fstab to /dev/sda !!!
You must have been using one of the "old" methods for installing your OS onto your USB mass storage device. The new method of simply imaging your USB mass storage device with a Raspbian or Raspbian Lite disk image directly, in the same way that you would for an SD card, will get you a fully booting Pi 3 - no fiddling required. (That is, using Raspbian /Raspbian Lite 2017-04-10 or later). It seems NOOBS 2.4.0 also has the capability, but if your USB drive is more than 32GB then it is actually slightly more complicated to achieve.

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Sun Apr 16, 2017 5:18 pm

linux_author wrote:tks! i finally figured it out (a slap of the forehead - i should have known better):

had to point /boot/cmdline.txt and /etc/fstab to /dev/sda !!!
I should also point out that using /dev/sda is not guaranteed to always work, since if you plug in another mass storage device at the same time then it could get allocated /dev/sda, and your boot drive /dev/sdb instead. The preferred method is to do what the 2017-04-10 release of Rasbian and Raspbian Lite do, which is to use the PARTUUID of the boot partition on the kernel command line (/boot/cmdline.txt) and the PARTUUID of the boot and root partitions in /etc/fstab. This ensures that whichever order the devices end up getting enumerated, your system should always boot and be able to mount the root filesystem correctly.

User avatar
PeterO
Posts: 4940
Joined: Sun Jul 22, 2012 4:14 pm

Re: USB boot now working on Pi3

Sun Apr 16, 2017 5:47 pm

andrum99 wrote:You must have been using one of the "old" methods for installing your OS onto your USB mass storage device. The new method of simply imaging your USB mass storage device with a Raspbian or Raspbian Lite disk image directly, in the same way that you would for an SD card, will get you a fully booting Pi 3 - no fiddling required. (That is, using Raspbian /Raspbian Lite 2017-04-10 or later). It seems NOOBS 2.4.0 also has the capability, but if your USB drive is more than 32GB then it is actually slightly more complicated to achieve.
That method is only usable if you don't care about any data already on the disk.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Sun Apr 16, 2017 6:09 pm

PeterO wrote:
andrum99 wrote:You must have been using one of the "old" methods for installing your OS onto your USB mass storage device. The new method of simply imaging your USB mass storage device with a Raspbian or Raspbian Lite disk image directly, in the same way that you would for an SD card, will get you a fully booting Pi 3 - no fiddling required. (That is, using Raspbian /Raspbian Lite 2017-04-10 or later). It seems NOOBS 2.4.0 also has the capability, but if your USB drive is more than 32GB then it is actually slightly more complicated to achieve.
That method is only usable if you don't care about any data already on the disk.
PeterO
Correct - I should have made that clear - my bad!

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: USB boot now working on Pi3

Sun Apr 16, 2017 7:39 pm

andrum99 wrote:I should also point out that using /dev/sda is not guaranteed to always work, since if you plug in another mass storage device at the same time then it could get allocated /dev/sda, and your boot drive /dev/sdb instead. The preferred method is to do what the 2017-04-10 release of Rasbian and Raspbian Lite do, which is to use the PARTUUID of the boot partition on the kernel command line (/boot/cmdline.txt) and the PARTUUID of the boot and root partitions in /etc/fstab. This ensures that whichever order the devices end up getting enumerated, your system should always boot and be able to mount the root filesystem correctly.
correct! and thank you! the blkid command is quite helpful... i was able to acquire the values and update /etc/fstab - my RPI3 is booting nicely!

willie
on the warm and sunny Gulf of Mexico

adbtransfer
Posts: 1
Joined: Wed Apr 19, 2017 12:28 pm
Contact: Website

Re: USB boot now working on Pi3

Wed Apr 19, 2017 12:31 pm

Let's recap !

First attempt:
I install latest raspbian on SD card.
I boot the pi, follow the instructions on the OP using only the main branch.
And the pi boots on the HDD (no SD card in it).
I update (apt-get update, upgrade and dist-upgrade).
Then I reboot and it won't boot. Sometimes the LED on the HDD flashes and stop and sometimes it remains lit. But there is no yellow led that flashes on the pi.
<a href="http://www.adbtransfer.com/"> çeşme transfer</a>

W. H. Heydt
Posts: 10749
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: USB boot now working on Pi3

Wed Apr 19, 2017 3:41 pm

andrum99 wrote:
linux_author wrote:tks! i finally figured it out (a slap of the forehead - i should have known better):

had to point /boot/cmdline.txt and /etc/fstab to /dev/sda !!!
I should also point out that using /dev/sda is not guaranteed to always work, since if you plug in another mass storage device at the same time then it could get allocated /dev/sda, and your boot drive /dev/sdb instead. The preferred method is to do what the 2017-04-10 release of Rasbian and Raspbian Lite do, which is to use the PARTUUID of the boot partition on the kernel command line (/boot/cmdline.txt) and the PARTUUID of the boot and root partitions in /etc/fstab. This ensures that whichever order the devices end up getting enumerated, your system should always boot and be able to mount the root filesystem correctly.
Is there some formal documentation somewhere on how to convert an existing config that uses the "/dev/sda" method to the PARTUUID method? (I'm sure it's pretty simple, but it'd be nice to see something written tht points to *all* the steps needed to do in manually.)

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: USB boot now working on Pi3

Wed Apr 19, 2017 4:35 pm

W. H. Heydt wrote: Is there some formal documentation somewhere on how to convert an existing config that uses the "/dev/sda" method to the PARTUUID method? (I'm sure it's pretty simple, but it'd be nice to see something written tht points to *all* the steps needed to do in manually.)
i had never used the UUID method before (always had more simple servers, etc.); the RPF docs don't impart the incantation (and in fact, use /dev/sda examples), but basically, on a working configured system using a single usb device:

1. use blkid to obtain the desired universally unique identifiers for the device and partitions:

Code: Select all

$ sudo blkid
/dev/sda1: SEC_TYPE="msdos" LABEL="BOOT" UUID="29A2-52C5" TYPE="vfat" PARTUUID="32aab5f1-01"
/dev/sda2: UUID="67288758-da58-4c17-8b6a-13652f3200af" TYPE="ext4" PARTUUID="32aab5f1-02"
2. edit /etc/fstab to reflect the returned identifiers:

Code: Select all

$ cat /etc/fstab
proc            /proc           proc    defaults          0       0
/dev/disk/by-uuid/29A2-52C5  /boot           vfat    defaults          0       2
/dev/disk/by-uuid/67288758-da58-4c17-8b6a-13652f3200af  /               ext4    defaults,noatime  0       1
3. update /boot/cmdline.txt:

Code: Select all

$ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=32aab5f1-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
thanks to all posters in this thread for helpful info...

YMMV,

willie
on the warming Gulf of Mexico

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Thu Apr 20, 2017 4:43 am

Raspbian /Raspbian Lite 2017-04-10 uses the PARTUUID for the boot and root partitions in fstab like this:

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=84fa8189-01  /boot           vfat    defaults          0       2
PARTUUID=84fa8189-02  /               ext4    defaults,noatime  0       1
You can find out the PARTUUID for each partition using:

Code: Select all

sudo blkid

andrum99
Posts: 772
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB boot now working on Pi3

Thu Apr 20, 2017 5:19 am

linux_author wrote:2. edit /etc/fstab to reflect the returned identifiers:

Code: Select all

$ cat /etc/fstab
proc            /proc           proc    defaults          0       0
/dev/disk/by-uuid/29A2-52C5  /boot           vfat    defaults          0       2
/dev/disk/by-uuid/67288758-da58-4c17-8b6a-13652f3200af  /               ext4    defaults,noatime  0       1
There is a slightly neater way of doing it if you are going to use UUIDs rather than PARTUUIDs:

Code: Select all

UUID=29A2-52C5 /boot  vfat  defaults  0  2
etc

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: USB boot now working on Pi3

Thu Apr 20, 2017 10:20 am

yes! another thing i want to try is e2label (labels instead of UUID)

thanks!

willie
on the usb-booting Gulf of Mexico

W. H. Heydt
Posts: 10749
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: USB boot now working on Pi3

Mon Apr 24, 2017 10:11 pm

Thank you, gentlemen. I now have my Pi3B+PiDrive using PARTUUID. At some point, i will do the same operation to my CM3L+WD SATA Adapter+SSD.

karthik.pdy
Posts: 1
Joined: Wed Apr 26, 2017 2:30 pm

Re: USB boot now working on Pi3

Wed Apr 26, 2017 2:38 pm

hi

how to find the the device is working or Not ??

Return to “General discussion”