hdtodd
Posts: 35
Joined: Tue Mar 04, 2014 1:53 am

Re: USB boot now working on Pi3 -- updates held back

Fri Mar 31, 2017 3:08 am

I'm booting a Pi-3B from a USB-attached SSD, running Pixel (uname -a gives "Linux Pi-1 4.9.13-v7+ #974 SMP Wed Mar 1 20:09:48 GMT 2017 armv7l GNU/Linux"). I've done the "apt-get update", "upgrade", and "dist-upgrade" to keep the software up to date. Most of the packages get upgraded just fine, but for the firmware upgrades I get
The following packages have been kept back:
libraspberrypi0 raspberrypi-bootloader raspberrypi-kernel wolfram-engine
I've also tried "BRANCH=next rpi-update", which reports that my firmware is up to date.

I'm being cautious because I don't want to brick my SSD by doing a firmware update that doesn't recognize the USB drive boot files.

Am I right in guessing that the bootloader & kernel (in particular) are being held back because I installed BRANCH=next firmware? And they won't be updated until the next major mainline firmware release comes out?
  • If that's not right, what do I need to do to have those firmware installed?
  • If that's right, will I need to do anything special to have that firmware installed when it's released, or will a simple "apt-get dist-upgrade" do the job?
Thanks for any insight and advice you can offer.

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

Re: USB boot now working on Pi3

Fri Mar 31, 2017 6:17 am

sudo rpi-update shouldn't be needed the USB booting is in the stock kernel/bootcode, stop running it. It can leave your system unbootable (which it did to my Zero last night).

sudo apt-get install --reinstall raspberrypi-kernel raspberrypi-bootloader
sudo reboot
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.

hdtodd
Posts: 35
Joined: Tue Mar 04, 2014 1:53 am

Re: USB boot now working on Pi3

Fri Mar 31, 2017 6:22 pm

DougieLawson,
Thanks! That answered my question. Did as you suggested and the system did reboot successfully from the USB SSD drive (whew!). Doing update/upgrade/dist-upgrade got rid of that "held back" message. Only unexpected side effect was reverting 4.9 --> 4.4, which isn't critical to me right now. With limited testing, doesn't seem to have affected anything else.

Oh, hold it. Interesting side benefit. I usually connect to this Pi-3 via ssh from my Mac. With 4.9, when I've connected in via keyboard and HDMI, the screen was blank -- I couldn't access the Pi-3 directly. On boot, the large rainbow box would come up, then the screen would go black: the system booted fine, but I had to access it via ssh or ssh -X if I wanted GUI. After the reversion to 4.4, the HDMI connection works. An unexpected but welcome additional benefit.

But two lingering problems, carried over from when I was running 4.9, are the wolfram-engine not updating and a set of modules that dist-upgrade says I can remove, but it then wants to add them in again.
The following packages were automatically installed and are no longer required:
coinor-libipopt1 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0 libgmime-2.6-0
libmumps-seq-4.10.0 liboauth0 libraw10
Use 'apt-get autoremove' to remove them.
Done
The following NEW packages will be installed:
coinor-libipopt1 libgmime-2.6-0 libmumps-seq-4.10.0 liboauth0 libraw10
The following packages have been kept back:
wolfram-engine
Any advice on how to get rid of these?

And thanks again for your help.

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

Re: USB boot now working on Pi3

Sat Apr 01, 2017 4:22 am

But two lingering problems, carried over from when I was running 4.9, are the wolfram-engine not updating and a set of modules that dist-upgrade says I can remove, but it then wants to add them in again.
The following packages were automatically installed and are no longer required:
coinor-libipopt1 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0 libgmime-2.6-0
libmumps-seq-4.10.0 liboauth0 libraw10
Use 'apt-get autoremove' to remove them.
Done
The following NEW packages will be installed:
coinor-libipopt1 libgmime-2.6-0 libmumps-seq-4.10.0 liboauth0 libraw10
The following packages have been kept back:
wolfram-engine
Read the words that apt-get gave you. It tells you precisely what's needed to remove stuff that's no longer needed.

If you're not running wolfram-engine and don't want to update it, either ignore the messages or purge the package.
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.

hdtodd
Posts: 35
Joined: Tue Mar 04, 2014 1:53 am

Re: USB boot now working on Pi3

Sat Apr 01, 2017 9:15 pm

DougieLawson,
Read the words that apt-get gave you. It tells you precisely what's needed to remove stuff that's no longer needed.
I'm sorry that my explanation wasn't clear. I've tried that. This is a loop.

Try to do a dist-upgrade and get that message. So I do as suggested:
root@Pi-1:/home/hdtodd# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@Pi-1:/home/hdtodd#
So "autoremove" doesn't do anything after all. Well, OK, that's odd. But then maybe I should do the install it wants to do. I note that the set of packages it wants to install is a subset of the list of packages that it says would be removed by "autoremove". But I proceed:
root@Pi-1:/home/hdtodd# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
coinor-libipopt1 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0 libgmime-2.6-0
libmumps-seq-4.10.0 liboauth0 libraw10
Use 'apt-get autoremove' to remove them.
Done
The following NEW packages will be installed:
coinor-libipopt1 libgmime-2.6-0 libmumps-seq-4.10.0 liboauth0 libraw10
The following packages have been kept back:
wolfram-engine
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/1,906 kB of archives.
After this operation, 9,269 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Install proceeds as normal, and then, after completion, same message as before
Selecting previously unselected package libgmime-2.6-0:armhf.
(Reading database ... 142480 files and directories currently installed.)
Preparing to unpack .../libgmime-2.6-0_2.6.20-1_armhf.deb ...
Unpacking libgmime-2.6-0:armhf (2.6.20-1) ...
Selecting previously unselected package liboauth0:armhf.
Preparing to unpack .../liboauth0_1.0.1-1_armhf.deb ...
Unpacking liboauth0:armhf (1.0.1-1) ...
Selecting previously unselected package libraw10:armhf.
Preparing to unpack .../libraw10_0.16.0-9+deb8u2_armhf.deb ...
Unpacking libraw10:armhf (0.16.0-9+deb8u2) ...
Selecting previously unselected package libmumps-seq-4.10.0.
Preparing to unpack .../libmumps-seq-4.10.0_4.10.0.dfsg-3+b2_armhf.deb ...
Unpacking libmumps-seq-4.10.0 (4.10.0.dfsg-3+b2) ...
Selecting previously unselected package coinor-libipopt1.
Preparing to unpack .../coinor-libipopt1_3.11.9-2_armhf.deb ...
Unpacking coinor-libipopt1 (3.11.9-2) ...
Setting up libgmime-2.6-0:armhf (2.6.20-1) ...
Setting up liboauth0:armhf (1.0.1-1) ...
Setting up libraw10:armhf (0.16.0-9+deb8u2) ...
Setting up libmumps-seq-4.10.0 (4.10.0.dfsg-3+b2) ...
Setting up coinor-libipopt1 (3.11.9-2) ...
Processing triggers for libc-bin (2.19-18+deb8u7) ...
root@Pi-1:/home/hdtodd# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
coinor-libipopt1 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0 libgmime-2.6-0
libmumps-seq-4.10.0 liboauth0 libraw10
Use 'apt-get autoremove' to remove them.
Done
The following packages have been kept back:
wolfram-engine
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
I do what it told me to do,
root@Pi-1:/home/hdtodd# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
coinor-libipopt1 libgmime-2.6-0 libmumps-seq-4.10.0 liboauth0 libraw10
0 upgraded, 0 newly installed, 5 to remove and 1 not upgraded.
After this operation, 9,269 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 142518 files and directories currently installed.)
Removing coinor-libipopt1 (3.11.9-2) ...
Removing libgmime-2.6-0:armhf (2.6.20-1) ...
Removing libmumps-seq-4.10.0 (4.10.0.dfsg-3+b2) ...
Removing liboauth0:armhf (1.0.1-1) ...
Removing libraw10:armhf (0.16.0-9+deb8u2) ...
Processing triggers for libc-bin (2.19-18+deb8u7) ...
OK, now that the "autoremove" has supposedly cleaned up, try the "dist-upgrade" again, and find that the packages are still there:
root@Pi-1:/home/hdtodd# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
coinor-libipopt1 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0 libgmime-2.6-0
libmumps-seq-4.10.0 liboauth0 libraw10
Use 'apt-get autoremove' to remove them.
Done
The following NEW packages will be installed:
coinor-libipopt1 libgmime-2.6-0 libmumps-seq-4.10.0 liboauth0 libraw10
The following packages have been kept back:
wolfram-engine
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/1,906 kB of archives.
After this operation, 9,269 kB of additional disk space will be used.
Do you want to continue? [Y/n]
It appears that something is out of sync or some vestige is left from an earlier install/remove, but doing a "check" or adding "--fix-broken" to "autoremove" and "dist-upgrade" doesn't correct the problem. The "libboost" stuff seems to be the anomaly here, since they appear in the list of things "dist-upgrade" says would be removed by "autoremove", but they aren't in the list of things to be installed as new packages via the "dist-upgrade".

If I try to remove manually the three of them mentioned in that "autoremove" list, I get
root@Pi-1:~# apt-get remove libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libboost-filesystem1.55.0' is not installed, so not removed
Package 'libboost-program-options1.55.0' is not installed, so not removed
Package 'libboost-regex1.55.0' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
So I think the catalog of installed packages is corrupted, but attempts to fix it fail. Suggestions?

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

Re: USB boot now working on Pi3

Sun Apr 02, 2017 5:39 pm

sudo apt-get install aptitude or sudo apt-get install synaptic both of those things act as a front-end to apt-get and have some clever stuff to resolve conflicts.

If you can't get either of those things to run, then start with a fresh SDCard with a fresh copy of Raspbian and rebuild based on 2017-03-02 as you've probably destroyed your software inventory data.
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.

hdtodd
Posts: 35
Joined: Tue Mar 04, 2014 1:53 am

Re: USB boot now working on Pi3

Sun Apr 02, 2017 8:37 pm

DougieLawson,
Thanks! Invoked "aptitude", had it look for broken pkgs, do updates that it thought it should, and let it delete things it thought it should. It looks like the problem was wolfram-engine, which aptitude chose to remove (one of your earlier suggestions, I think, but I thought I had been using this Pi-3B for Mathematica -- apparently I hadn't been). Anyway, let aptitude do its thing, then went back and did "apt-get update/upgrade/dist-upgrade" and everything is clean now.

Much appreciate your help!

David

CoPop
Posts: 9
Joined: Wed Aug 31, 2016 3:24 pm
Location: Colorado, U.S.

Re: USB boot now working on Pi3

Wed Apr 05, 2017 5:30 pm

gsh wrote:
Thanks for that, it would be very much appreciated if you create a pull request

Gordon
Just thought I would mention pull request #590 is waiting for a technical check. I don't suppose there is anything I can do about that on my end? Except maybe post what I have here and let the community take a look at it? I did try to account for people setting up the SD card with NOOBS or the more normal way. Anyway I realize people get busy (like myself), however I'm not seeing the harm in posting here. Agreed or not?

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

Re: USB boot now working on Pi3

Sat Apr 08, 2017 4:22 am

Just a quick message to say that I have successfully got USB boot working on my sole Raspberry Pi 3 using the following procedure. I'm adding it here in case anyone else is interested, as it was much easier than I thought it would be.

Note that this procedure uses a completely stock Raspbian Jessie Lite image. You only need to make one small change to the FAT16 partition before you boot your USB device on your chosen Pi 3.

Also bear in mind that this procedure permanently changes a setting inside the Raspberry Pi itself - in the actual BCM2837 SoC. It is not possible to undo this change!

1. Boot the Raspberry Pi 3 from an SD card running either Raspbian Jessie or Raspbian Jessie Lite. (Other distros may or may not work).

2. Update the OS and firmware on the card in the usual way by issuing the following command:

Code: Select all

sudo apt-get update && sudo apt-get upgrade
and saying 'yes' to whatever it offers you.

3. Add the following line to the bottom of the file /boot/config.txt:

Code: Select all

program_usb_boot_mode=1
4. Reboot the Pi. When the Pi boots back up from the SD card, upon seeing the line you just added, the firmware will program the One Time Programmable (OTP) memory inside the BCM2837 with a special flag that tells the on-chip boot ROM that on subsequent boots it should attempt to boot in USB host mode if booting from the SD card fails. Programming the One Time Programmable memory inside the BCM2837 is, as the name suggests ONE TIME ONLY. In other words - YOU CANNOT UNDO THIS STEP!

5. Power down the Pi.

5. On another computer, download the official Raspbian Jessie Lite image from the website (currently the 2017-03-02 release).

6. Write this image to your chosen USB mass storage device in exactly the same way you would write the image to an SD card.

7. Eject the USB device from your computer.

8. Re-insert the USB device to your computer. The first partition on the USB device is FAT16 and should be automatically mounted in whatever OS you are running on your machine.

9. On said FAT16 partition, fine the file cmdline.txt and edit it as follows: change the root= part to 'root=/dev/sda2', add 'rootwait' if it is not already specified, and remove the init=... part from the end.

10. Insert the USB drive as the only mass storage device on your Raspberry Pi 3. (This point is important, as you have just told it to boot from the first mass storage device using Linux's (sda). If you attach other mass storage devices, there is no guarantee your intended boot device will become the first one in the list.

11. Power up our Raspberry Pi 3 and wait. Wait some more while it tries, and fails, to mount /dev/mmcblk0p1 as /boot.

12. The Pi 3 will have booted into an emergency shell. Edit /etc/fstab to point to your USB mass storage device instead of mmcblk0.

13. Reboot. You will now have a fully working Raspbian Jessie Lite system running entirely off your USB mass storage device.

That's more steps than I thought it was, but never mind!

The key point is that, at least for Raspbian Jessie Lite, you don't need to make any changes to the ext4 partition before you boot from USB. The only change that needs to be made to the stock Raspbian Jessie Lite image is to change the command line passed to the Linux kernel on boot, which is contained in the file cmdline.txt on the boot partition, which is easily accessible from within Windows / OS X.

Once you have booted done the above initial setup, you can then modify the cmdline.txt to boot from the PARTUUID of the root partition on your USB mass storage device. You can also modify /etc/fstab to use the UUID of the boot and root filesystem instead of /dev/sda1 and /dev/sda2 as well.

Edited to add:

Resize the root partition with the following command:

Code: Select all

sudo parted /dev/sda resizepart 2 100%
To resize the root filesystem, use resize2fs.

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

Re: USB boot now working on Pi3

Sun Apr 09, 2017 4:07 pm

andrum99 wrote:5. On another computer, download the official Raspbian Jessie Lite image from the website (currently the 2017-03-02 release).

6. Write this image to your chosen USB mass storage device in exactly the same way you would write the image to an SD card.

7. Eject the USB device from your computer.
I edit official Raspbian Jessie Lite 2017-03-02 release for boot from USB mass storage device,

I use it for backup and for restore system

PS I edit /boot/cmdline.txt, /etc/fstab and I update first boot resize script.
Last edited by hommar on Sun Apr 09, 2017 9:53 pm, edited 1 time in total.

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

Re: USB boot now working on Pi3

Sun Apr 09, 2017 5:44 pm

hommar wrote:PS I edit /boot/cmdline.txt, /etc/fstab and I update resize script for first run.
Can you post a copy of your modified 'first boot' resize script?

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

Re: USB boot now working on Pi3

Sun Apr 09, 2017 9:52 pm

andrum99 wrote:Can you post a copy of your modified 'first boot' resize script?
I copy this script from current raspbian
after all updates

PS you can download raspi-config_20170307.tar.xz and extract init_resize.sh

furmek
Posts: 2
Joined: Mon Apr 10, 2017 1:13 am

Re: USB boot now working on Pi3

Mon Apr 10, 2017 1:24 am

I followed documentation on how to make rpi3 boot of a USB device and ended up with something a bit strange.
As long as I have any other (non mass storage) device connected to any USB ports with my new USB boot device everything works just fine but if I unplug additional devices rpi3 will no longer boot.

eg.:
If I connect USBboot device and keyboard and power cable it boots fine
If I connect USBboot device and power cable it will not boot

no led's are blinking (just solid red), led on usb device will turn on after about 3s. but will not blink.

Is there any debug output that I could tap to or is there something I may have missed?

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 2:42 am

andrum99 wrote:Can you post a copy of your modified 'first boot' resize script?
Official images was updates. Built-in resize script support USB boot now.

CoPop
Posts: 9
Joined: Wed Aug 31, 2016 3:24 pm
Location: Colorado, U.S.

Re: USB boot now working on Pi3

Tue Apr 11, 2017 2:53 am

CoPop wrote:
gsh wrote:
Thanks for that, it would be very much appreciated if you create a pull request

Gordon
Just thought I would mention pull request #590 is waiting for a technical check. I don't suppose there is anything I can do about that on my end? Except maybe post what I have here and let the community take a look at it? I did try to account for people setting up the SD card with NOOBS or the more normal way. Anyway I realize people get busy (like myself), however I'm not seeing the harm in posting here. Agreed or not?
I didn't see any objections, so I put up the procedure I have up on a website I take care of:
http://www.dialysisethics2.org/open_ima ... hecked.pdf

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 12:14 pm

furmek wrote:I followed documentation on how to make rpi3 boot of a USB device and ended up with something a bit strange.
As long as I have any other (non mass storage) device connected to any USB ports with my new USB boot device everything works just fine but if I unplug additional devices rpi3 will no longer boot.

eg.:
If I connect USBboot device and keyboard and power cable it boots fine
If I connect USBboot device and power cable it will not boot

no led's are blinking (just solid red), led on usb device will turn on after about 3s. but will not blink.

Is there any debug output that I could tap to or is there something I may have missed?
That's interesting. My 4GB USB flash drive will boot the Pi 3 no problem, but my 32GB USB flash drive won't. However, I have only tried it with nothing else connected to the Pi 3. I will give it a try with a keyboard and mouse connected and see if that does the trick!

To answer your question, my guess would be that it works with the keyboard attached because your particular USB mass storage device takes a certain amount of time to become ready and bootable. With only the USB mass storage device attached, the Pi attempts to boot from it but gives up before the device is ready. By attaching the keyboard as well, the Pi 3 takes slightly longer to get round to attempting to boot from your USB mass storage device, and by that time it is ready. That's just a guess though.

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 12:24 pm

hommar wrote:
andrum99 wrote:Can you post a copy of your modified 'first boot' resize script?
Official images was updates. Built-in resize script support USB boot now.
I've successfully booted a stock Raspbian Lite 2017-04-10 image off a USB flash drive and can confirm it does indeed work. So now all you have to do to make a USB mass storage device bootable on the Pi 3 is:

1. Program the OTP on your Pi 3.
2. Image your chosen USB mass storage device with stock Raspbian / Raspbian Lite.
3. Boot the Pi 3 with said device.

Excellent!

We just need some documentation for how to get rid of the 5 second timeout while the Pi 3 attempts to boot from the SD card now. :D

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 12:32 pm

There is documentation for forcing your RPi3 to boot from USB first unless GPIO22 is held high.
https://www.raspberrypi.org/documentati ... ootflow.md

It's uses a OTP burner (in config.txt) so once done is irreverisble.
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

Tue Apr 11, 2017 12:54 pm

this is all great info... but i do have one question:

is there a downside to setting the 'one-time' bit for USB booting? from what i gather, there isn't as even if the bit is set the RPi can still be booted with no problem from sdhc?

tia,

willie
on the warming Gulf of Mexico

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 1:04 pm

It irreversibly means the RPi3 won't attempt to boot the microSD card unless you pull GPIO22 high.

I have three RPi3s that boot from USB drives, I don't care about the five second delay enough to flip that OTP bit.
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.

canadian.bacon
Posts: 3
Joined: Thu Mar 30, 2017 2:43 am

Re: USB boot now working on Pi3

Tue Apr 11, 2017 7:00 pm

Maybe this will help others with large USB HDD mounted.
I have a 1TB USB enclosure I'm booting my Pi from and the / partition is 931GB, however, 1% used and 869GB available. So I was missing quick a good chunk of my space.
After RTFM and googling around, this comes to the rescue: https://help.ubuntu.com/community/Insta ... ptional.29

It seems the system takes by default 5% for the superuser in case the disk gets full and you still need to be able to write to it. I fixed it with tune2fs -m1 /dev/sda2 , so now it is down to 1% (you can go even as 0.1%). This can be done to a mounted drive with data already on it.
Filesystem Size Used Avail Use% Mounted on
/dev/root 917G 1.2G 907G 1% /

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 7:11 pm

linux_author wrote:this is all great info... but i do have one question:

is there a downside to setting the 'one-time' bit for USB booting? from what i gather, there isn't as even if the bit is set the RPi can still be booted with no problem from sdhc?

tia,

willie
on the warming Gulf of Mexico
The only downside I can see is that if, for whatever reason, your Pi 3 fails to boot from the SD card, it will then try to boot from any USB mass storage device that you might have attached. Depending on how you use your Pi 3 this may or may not be a problem.

furmek
Posts: 2
Joined: Mon Apr 10, 2017 1:13 am

Re: USB boot now working on Pi3

Tue Apr 11, 2017 10:20 pm

andrum99 wrote:That's interesting. My 4GB USB flash drive will boot the Pi 3 no problem, but my 32GB USB flash drive won't. However, I have only tried it with nothing else connected to the Pi 3. I will give it a try with a keyboard and mouse connected and see if that does the trick!
I'm interested in the result of that.
andrum99 wrote:To answer your question, my guess would be that it works with the keyboard attached because your particular USB mass storage device takes a certain amount of time to become ready and bootable.
That was my first guess, but then I found you can set another flag by using

Code: Select all

program_usb_timeout=1
and after using that only thing that changed was the amout of time I have o wait for the usb drive led to cone up. What is more the device is an ssd drive which doesn't need all that much time to 'spin up'.

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 10:34 pm

furmek wrote:
andrum99 wrote:That's interesting. My 4GB USB flash drive will boot the Pi 3 no problem, but my 32GB USB flash drive won't. However, I have only tried it with nothing else connected to the Pi 3. I will give it a try with a keyboard and mouse connected and see if that does the trick!
I'm interested in the result of that.
Failed to boot, even with the 5 second timeout using program_usb_timeout=1.

I'm thinking we probably need someone more knowledgeable to chime in on these ones. ;)

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

Re: USB boot now working on Pi3

Tue Apr 11, 2017 10:59 pm

You need to boot an SDCard with Raspbian 2017-04-10 and

Code: Select all

program_usb_boot_mode=1
in /boot/config.txt before you do anything.

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).
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.

Return to “General discussion”