{"id":7451,"date":"2017-10-05T15:45:15","date_gmt":"2017-10-05T14:45:15","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=7451"},"modified":"2023-10-28T23:39:33","modified_gmt":"2023-10-28T22:39:33","slug":"booting-a-pi3-from-usb3-devices","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/booting-a-pi3-from-usb3-devices\/","title":{"rendered":"Booting a Pi3 from USB3 Devices"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_7451\" class=\"pvc_stats all  \" data-element-id=\"7451\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p><iframe loading=\"lazy\" title=\"Pi3 USB3 boot time\" width=\"1778\" height=\"1000\" src=\"https:\/\/www.youtube.com\/embed\/mWSsbMa_-JI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>This process is really easy now with the latest Raspian image - depending if your USB device make\/model works:<\/p>\n<p>https:\/\/www.raspberrypi.org\/downloads\/raspbian\/<\/p>\n<p>The two USB3 devices which worked for me are these (Integral 16GB NOT the 8GB! That did not work):<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/PIusb.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-7454\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/PIusb-1024x576.jpg\" alt=\"\" width=\"681\" height=\"383\" \/><\/a><\/p>\n<p>stevee@AMDA8:~ $ <span style=\"color: #0000ff;\">lsusb<\/span><br \/>\n<span style=\"color: #ff0000;\">Bus 001 Device 004: ID 0781:5583 SanDisk Corp.\u00a0<span style=\"color: #ffffff;\">(Sandisk Ultrafit 16GB)<\/span><\/span><\/p>\n<p><span style=\"color: #ff0000;\">Bus 004 Device 002: ID 26bd:9917 <\/span>\u00a0(this 16GB Integral is very fast and cheap!!)<\/p>\n<p>Right click the Raspbian image for the Disk Image Writer in Mint and write to your USB device:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/DiskImg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-7456\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/DiskImg-1024x576.png\" alt=\"\" width=\"590\" height=\"332\" \/><\/a><\/p>\n<p>This image should already contain the newer bootcode.bin file in \/boot and the Pi3 should already have it's OTP flash burned for USB boot or SD card as shown if already booted to SD card by:<\/p>\n<p>stevee@RASPBERRYPI:~ $<span style=\"color: #0000ff;\"> sudo vcgencmd otp_dump | grep 17:<\/span><br \/>\n<span style=\"color: #ff0000;\">[sudo] password for stevee: <\/span><br \/>\n<span style=\"color: #ff0000;\">17:<strong>3020000a<\/strong><\/span><\/p>\n<p>If this number is different then the OTP is not flashed yet and you can try:<\/p>\n<p><span style=\"color: #0000ff;\">sudo BRANCH=next rpi-update<\/span><\/p>\n<p>and\/or add the latest bootcode.bin file to \/boot:<\/p>\n<p><span style=\"color: #0000ff;\">wget https:\/\/github.com\/raspberrypi\/firmware\/raw\/next\/boot\/bootcode.bin<\/span><\/p>\n<p>On your laptop, check the boot flag of the boot partition has been set - probably easiest with cfdisk:<\/p>\n<p>stevee@AMDA8 ~ $ <span style=\"color: #0000ff;\">sudo cfdisk \/dev\/sdb<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/cf.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-7517\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/cf.png\" alt=\"\" width=\"818\" height=\"563\" \/><\/a><\/p>\n<p>No! It hasn't. Change that with Bootable for VFAT; write; YES.<\/p>\n<p>Check the partition has been resized to full - if not, you can resize it now with Gparted\/other or do it later in the Pi with parted:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/bootsize.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-7506\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/bootsize-1024x576.png\" alt=\"\" width=\"590\" height=\"332\" \/><\/a><\/p>\n<p>the other things you may want to do to your USB image is add SSH as raspi-conf does not control this now after first Pi boot up - you add a file called ssh to \/boot once your image is burned, and remounted:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/sshfile.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7457 size-medium\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/10\/sshfile.png\" alt=\"\" width=\"1366\" height=\"768\" \/><\/a><\/p>\n<p>or if mounted under your user on your laptop:<\/p>\n<p>stevee@AMDA8 ~ $ <span style=\"color: #0000ff;\">touch \/media\/stevee\/boot\/ssh<\/span><\/p>\n<p>Safely unmount the USB stick and try it in your Pi3, removing any SD card first, and allowing up to 30 secs or more (device dependent) for it to see the device and start booting if it is compatible (e.g. silver Kingston DataTraveler 2.0 (PMAP) is not - or a prior GPT partition on the device is causing problems, say from a prior Mint image install with USB Writer??).<\/p>\n<p>I say that because my Integral 16GB worked fine but the 8GB version did not..?!<\/p>\n<p>It may be better to write a completely new partition table with Gparted and create a full size ext 4 formatted partition on any USB stick first, then write the image.<\/p>\n<p>If you still have problems booting it you can research other issues like USB timeout etc. but I would try different USB devices first for what works.<\/p>\n<p>On the Pi, once logged in as user pi, pw raspberry, get the small font size fixed on HDMI TV:<\/p>\n<p><span style=\"color: #0000ff;\">sudo dpkg-reconfigure console-setup<\/span><\/p>\n<p>change the pi pword, then setup your user etc.<\/p>\n<p><span style=\"color: #0000ff;\">sudo adduser stevee<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo adduser stevee sudo<\/span><\/p>\n<p>find it's IP address:<\/p>\n<p>stevee@RASPBERRYPI:~ $ <span style=\"color: #0000ff;\">ifconfig<\/span><\/p>\n<p>Update the repo info:<\/p>\n<p>stevee@RASPBERRYPI:~ $\u00a0 <span style=\"color: #0000ff;\">sudo apt-get update<\/span><\/p>\n<p>USB3 is faster and more durable than SD cards once booted, and can handle re-writes without failure better.<\/p>\n<p>Add any other apps you want for now...or just check ssh is working locally - if so access remotely and do it from there...<\/p>\n<p>stevee@RASPBERRYPI:~ $<span style=\"color: #0000ff;\"> ssh 127.0.0.1<\/span><\/p>\n<p><span style=\"color: #ff0000;\">The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.<\/span><br \/>\n<span style=\"color: #ff0000;\">ECDSA key fingerprint is ....<\/span><br \/>\n<span style=\"color: #ff0000;\">Are you sure you want to continue connecting (yes\/no)?<\/span><\/p>\n<p>Yep SSH works so that ssh file in \/boot does the trick.<\/p>\n<p>Log in remotely from laptop:<\/p>\n<p>stevee@RASPBERRYPI:~ $<span style=\"color: #0000ff;\">\u00a0sudo apt-get install nmap samba vim nbtscan winbind<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/nsswitch.conf<\/span><\/p>\n<p>add <strong>wins<\/strong>\u00a0to line as usual.<\/p>\n<p><span style=\"color: #ff0000;\">hosts: files wins<\/span><\/p>\n<p>stevee@RASPBERRYPI:~ $ <span style=\"color: #0000ff;\">nbtscan 192.168.1.0\/24<\/span><\/p>\n<p><span style=\"color: #ff0000;\">192.168.1.0 Sendto failed: Permission denied<\/span><br \/>\n<span style=\"color: #ff0000;\">192.168.1.3 PIROAD &lt;server&gt; PIINTEG3 00:00:00:00:00:00<\/span><br \/>\n<span style=\"color: #ff0000;\">192.168.1.4 PIGATE &lt;server&gt; PIGATE 00:00:00:00:00:00<\/span><\/p>\n<p>Change the hostname if you want and reboot.<\/p>\n<p>stevee@raspberrypi:~ $ <span style=\"color: #0000ff;\">sudo vi \/etc\/hostname<\/span><\/p>\n<p>Add passwordless login from your laptop to new Pi3 device name pi3:<\/p>\n<p>stevee@AMDA8 ~ $ <span style=\"color: #0000ff;\">ssh-copy-id -i ~\/.ssh\/id_rsa.pub PI3<\/span><\/p>\n<p><span style=\"color: #ff0000;\">The authenticity of host 'pi3 (192.168.1.13)' can't be established.<\/span><br \/>\n<span style=\"color: #ff0000;\">ECDSA key fingerprint is 58:de:82:aa:b6:20:53:2d:54:8c:46:3c:87:2f:ed:0c.<\/span><br \/>\n<span style=\"color: #ff0000;\">Are you sure you want to continue connecting (yes\/no)?<\/span><\/p>\n<p>Log in via SSH.<\/p>\n<p>Check the partition sizes have been expanded fully:<\/p>\n<p>stevee@pi3:~ $<span style=\"color: #0000ff;\"> df -h<\/span><br \/>\n<span style=\"color: #ff0000;\">Filesystem Size Used Avail Use% Mounted on<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/root 15G 1.2G 13G 9% \/<\/span><br \/>\n<span style=\"color: #ff0000;\">devtmpfs 458M 0 458M 0% \/dev<\/span><br \/>\n<span style=\"color: #ff0000;\">tmpfs 462M 0 462M 0% \/dev\/shm<\/span><br \/>\n<span style=\"color: #ff0000;\">tmpfs 462M 6.4M 456M 2% \/run<\/span><br \/>\n<span style=\"color: #ff0000;\">tmpfs 5.0M 4.0K 5.0M 1% \/run\/lock<\/span><br \/>\n<span style=\"color: #ff0000;\">tmpfs 462M 0 462M 0% \/sys\/fs\/cgroup<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda1 42M 21M 21M 51% \/boot<\/span><br \/>\n<span style=\"color: #ff0000;\">tmpfs 93M 0 93M 0% \/run\/user\/1001<\/span><\/p>\n<p>Seems so...<\/p>\n<p>stevee@pi3:~ $ <span style=\"color: #0000ff;\">sudo cfdisk \/dev\/sda<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Device Boot Start End Sectors Size Id Type<\/span><br \/>\n<span style=\"color: #ff0000;\">&gt;&gt; Free space 2048 8191 6144 3M <\/span><br \/>\n<span style=\"color: #ff0000;\"> \/dev\/sda1 * 8192 93813 85622 <strong>41.8M<\/strong> c W95 FAT32 (LBA)<\/span><br \/>\n<span style=\"color: #ff0000;\"> \/dev\/sda2 94208 30031249 29937042 <strong>14.3G<\/strong> 83 Linux<\/span><\/p>\n<p>If you want a desktop at boot, there is now a better linux one than the old Pi2s.<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt-get install lightdm parted<\/span><\/p>\n<p>(ha! well, would be if you could log in to it!)<\/p>\n<p>To setup a Picam there are some changes from my old method here:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/pi-with-motion-only-minimal-fresh-install-summary\/\"><span style=\"color: #00ff00;\">https:\/\/stevepedwards.today\/DebianAdmin\/pi-with-motion-only-minimal-fresh-install-summary\/<\/span><\/a><\/p>\n<p>but you can follow it and should be able to work out what is required from the screen output, such as permissions, and changes to the newer Motion motion.conf file that is NOT backwards compatible with the Pi2 version, by comparing an older Pi2 conf file with the new default one as some same functions have been renamed for later Motion versions. I got mine working ok, even with rpi-update firmware and apt-get upgrade.<\/p>\n<p>I'll probably do a Post on it next...<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_7451\" class=\"pvc_stats all  \" data-element-id=\"7451\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>This process is really easy now with the latest Raspian image - depending if your USB device make\/model works: https:\/\/www.raspberrypi.org\/downloads\/raspbian\/ The two USB3 devices which worked for me are these (Integral 16GB NOT the 8GB! That did not work): stevee@AMDA8:~ $ lsusb Bus 001 Device 004: ID 0781:5583 SanDisk Corp.\u00a0(Sandisk Ultrafit 16GB) Bus 004 Device <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/booting-a-pi3-from-usb3-devices\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Booting a Pi3 from USB3 Devices<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":["post-7451","post","type-post","status-publish","format-standard","hentry","category-uncategorised","category-uncategorized"],"a3_pvc":{"activated":true,"total_views":1,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/7451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=7451"}],"version-history":[{"count":1,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/7451\/revisions"}],"predecessor-version":[{"id":10079,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/7451\/revisions\/10079"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=7451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=7451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=7451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}