Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide Boot USB. Move sd-card to USB Drive
#1
Prompted by @cofot28  post here...(for Pi4)
http://moodeaudio.org/forum/showthread.php?tid=2983

With some advances in the RPI firmware and Balena Etcher this is now trivial.

You will need a spare micro-sd-card....
1) On your PC (linux preferred but there is a Win version for these steps) Download the latest Balena Etcher..
https://www.balena.io/etcher/

2)Download the latest Raspberry Pi Lite image and burn to the micro-sdcard using Etcher.
https://www.raspberrypi.org/downloads/raspberry-pi-os/

3)Add an ssh file to the micro-sdcard as per #3 Headless instruction from RPi foundation.....
https://www.raspberrypi.org/documentatio...ccess/ssh/

4) Remove your Moode micro-sdcard from your Pi4 and insert the Raspberry Pi Lite card and boot.
5) ssh to the Pi  (ssh 'pi@ip-address'..password 'raspberry')
(in linux...to find the Pi ip-address)
Code:
sudo arp-scan  --localnet

6)Check current Firmware..

Code:
vcgencmd bootloader_version

The latest firmware update will be displayed. It should be the June 15, 2020, or later release for the USB boot feature to work successfully.

Mine was an earlier Firmware so run..

Code:
sudo apt update
sudo apt full-upgrade

Then reboot your Pi and again check...

Code:
vcgencmd bootloader_version

Currently mine now shows...
Code:
pi@argon:~ $ vcgencmd bootloader_version
Sep  3 2020 13:11:43
version c305221a6d7e532693cc7ff57fddfc8649def167 (release)
timestamp 1599135103
 
While your MoOde micro-sdcard is removed from your Pi put it in a card reader and connect it to your PC.(preferably this is an un-expanded install...and you will need a bigger USB drive than the micro-sdcard.)

Connect a USB 3 flash Drive (or SSD) to your PC.

Start Balena Etcher and choose 'clone drive' from it's source menu. ( Smile Big Grin  Excellent addition you Balena folks !!!)

Choose the MoOde micro-sdcard as the source.

Choose your USB drive as the target and Flash.

Once finished, Safely remove both the micro-sdcard and the USB (or SSD) from the PC and then remove the micro-sdcard (Raspberry Pi Os) from your Pi4.
Attach the USB3 (or SSD) to the Pi and power on.
The Pi4 should boot from the attached drive... Smile 

Mine does from a USB 3 Flash drive and much quicker than from the micro-sdcard.

Will try from SSD once I find a spare to use.
Note that while everything works as expected Moode System Info still reports USB boot for the RPi4 as 'not available' Not sure why. (Tim ?)

Other Pi...ymmv Cool
----------
bob
Reply
#2
Nicely done.

To add a little technical meat to the bone (USB mass storage boot documentation):
  • The Raspberry Pi 2B v1.2, 3A+, 3B, and Compute Module 3 all require a specific One-Time Programming bit be permanently set before they can boot from USB mass storage. The state of this bit is checked and can be set via moOde's System Config screen. This is an irreversible action.
  • The Raspberry Pi 3B+ and Compute Module 3+ support USB mass storage boot out of the box. (My only 3B+ is packed away ATM but I believe this just means that OTP bit is already set.)

The Raspberry Pi 4B is fundamentally different under the covers from its predecessors. It has less boot code in its microcode and requires the newer firmware referenced in Drone7's post in order to boot from USB mass storage. The OTP-bit test does not apply. Everything in Drone7's post down to "While your MoOde micro-sdcard is removed from your Pi..." deals with this firmware issue.

So, in response to that final "YMMV", booting from a USB mass storage device works fine with RPi 2B v1.2, 3A+, 3B, CM3, 3B+, CM3+ provided the OTP bit has been set first.

I've been booting moOde on a 3B+ from a USB thumbdrive for some time now. Disk activity is slower than if I used a uSD card but it is much more convenient because of the enclosure this particular RPi is in (it's a SmartiPi Touch 2 screen and case). As Drone7 notes, it would be the reverse with an RPi4B and a USB 3 thumbdrive plugged into one of the USB3 ports.

Regards,
Kent
Reply
#3
How do u install just the firmware update without having to do an "apt full-upgrade"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
(10-22-2020, 02:33 PM)Tim Curtis Wrote: How do u install just the firmware update without having to do an "apt full-upgrade"

First take out the running Moode sd card and set it aside.

Then prep another sd card with Raspbian lite and boot the pi from that...do the full upgrade that then updates the firmware.
Remove the Raspbian sd card and either return to the Moode sd card or clone the Moode sd card to a USB drive and boot the Pi4 from that.
----------
bob
Reply
#5
Thats like using a sledgehammer to push in a thumbtack.

I recall b4 there was a utility that updated the EEEPROM firmware from a .bin file. It was called vl805.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
(10-22-2020, 05:55 PM)Tim Curtis Wrote: Thats like using a sledgehammer to push in a thumbtack.
Big Grin  Quite possibly but the upside being there is no chance of corrupting the original sd card install as it is aside from the process.

The original enquirer @cofot28  was wanting to 'move' the sd card install to usb drive and boot from it on their RPi4.
This seemed to be the easiest option with least chance of failure.. Wink

(Never had a thumbtack fall out after using a sledgehammer Tongue )
----------
bob
Reply
#7
Just to note: I tried update / full-upgrade with a running 6.7.1 installation which loads by that a new eeprom image. But it turns out then that rpi-eeprom-update -a does not burn the new bootloader. After reboot 
 rpi-eeprom-update still shows the old version and that a new version is available.

I then followed a similar approach as @DRONE7, but used instead the Raspberry Pi Imager on my PC with Linux:
  1. With a spare microSDCard plugged to the PC launch Raspberry Pi Imager
  2. Then select CHOOSE OS > Misc Utilities Images > Raspberry Pi 4 EEPROM boot recovery.
  3. Select SD Card > Generic STORAGE DEVICE ....
  4. WRITE
  5. Remove the microSDCard safely
  6. Insert it in the Raspi and boot
  7. After a while the green led starts blinking fast signalling success. (An attached HDMI display should turn green at success or red at failure, but I had none.)
  8. Power off and remove the microSDCard.
This procedure simply updates the bootloader without requiring a full-upgrade.
Reply
#8
After I updated the bootloader successfully I tried to boot from an USB stick. The OS bootet, but Moode failed with "/lib/systemd/system/mpd.service:8: CPU scheduling priority is out of range, ignoring: 43".

The image on the USB stick was copied from the microSDCard before I performed the update / full-upgrade.

So I took a new image from the latest state of the microSDCard and flashed the USB stick anew.

This time it seem to boot as well, but is not accessible. Both with SSH and browser the connection is refused. Now I am a bit lost...

Do one of you guys has any idea what might have happened? 

(Ok, I can always set up a fresh installation. But then I have to redo all the config ...)
Reply
#9
Quote:I tried update / full-upgrade with a running 6.7.1 installation which loads by that a new eeprom image.

Yes, that does not work.

Quote:I then followed a similar approach as @DRONE7
http://moodeaudio.org/forum/showthread.p...9#pid26329
That does.. Wink


Good it is working for you.

@Atair Redo the update as per my first post.... and reply with any error output
----------
bob
Reply
#10
With the first try (USB with image taken before update / full-upgrade) the symptoms are the same as in MPD connection failed thread. , i.e., integrity check failed.

With the second try I cannot connect to the raspi anymore to inpect the logs. (connection refused.)

I will give balena etcher a try later this day. Up to now I was just using dd which always has been working well.
Reply


Forum Jump: