Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot from USB Raspberry pi Menu Option #3752

Closed
davidjmorin opened this issue Sep 2, 2020 · 31 comments
Closed

Boot from USB Raspberry pi Menu Option #3752

davidjmorin opened this issue Sep 2, 2020 · 31 comments
Labels
External Bug 🐞 For bugs which are not caused by DietPi. Question ❔ RPi Solution available 🥂 Definite solution has been done

Comments

@davidjmorin
Copy link

Would love to see this option in the config menu. I updated today and no joy.

Does dietpi have a step by step on how to do this with current Version?

I have looked all around and only found ones for raspberry os.

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

Hi,

many thanks for your question. There isn't such an option available via DietPi options. There are different ways described by Raspberry Foundation depending on your devices.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md

@MichaIng
Copy link
Owner

MichaIng commented Sep 2, 2020

The easiest way is to flash the image to the USB drive directly, on RPi3+ and RPi4 this works OOTB. All ways to move the boot partition afterwards are not that save, best is dd cloning the SD card from an external system.

On RPi3 non-plus as described on the RPi docs, this OTP bit needs to be set to allow USB boot. This can be done via dietpi-config as well, but since it's an RPi3-nonplus-only option, it's also only shown there 😉. All models prior to RPi3 do not support USB boot, hence moving the root partition only (not the boot partition) is the best you can do, e.g. via dietpi-drive_manager.

@MichaIng MichaIng added the RPi label Sep 2, 2020
@davidjmorin
Copy link
Author

davidjmorin commented Sep 2, 2020 via email

@davidjmorin
Copy link
Author

davidjmorin commented Sep 2, 2020

-- A start job for unit rpi-eeprom-update.service has begun execution.
--
-- The job identifier is 749.
Sep 02 18:02:37 DietPi rpi-eeprom-update[6234]: /usr/bin/rpi-eeprom-update: 271: /usr/bin/rpi-eeprom-update: hexdump: not found
Sep 02 18:02:37 DietPi systemd[1]: rpi-eeprom-update.service: Main process exited, code=exited, status=127/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit rpi-eeprom-update.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 127.
Sep 02 18:02:37 DietPi systemd[1]: rpi-eeprom-update.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit rpi-eeprom-update.service has entered the 'failed' state with result 'exit-code'.
Sep 02 18:02:37 DietPi systemd[1]: Failed to start Check for Raspberry Pi EEPROM updates.
-- Subject: A start job for unit rpi-eeprom-update.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit rpi-eeprom-update.service has finished with a failure.
--
-- The job identifier is 749 and the job result is failed.

@davidjmorin
Copy link
Author

davidjmorin commented Sep 2, 2020

[  OK  ] APT update
root@DietPi:/mnt/mydrive# G_AGI rpi-eeprom rpi-eeprom-images flashrom libraspberrypi-bin raspberrypi-bootloader
[ INFO ] APT install for: rpi-eeprom rpi-eeprom-images flashrom libraspberrypi-bin raspberrypi-bootloader, please wait...
[  OK  ] APT install for: rpi-eeprom rpi-eeprom-images flashrom libraspberrypi-bin raspberrypi-bootloader
root@DietPi:/mnt/mydrive# G_AG_CHECK_INSTALL_PREREQ binutils
[ INFO ] Checking for required APT packages: binutils
[  OK  ] All required APT packages are already installed.
root@DietPi:/mnt/mydrive# rpi-eeprom-update -a
/usr/bin/rpi-eeprom-update: 271: /usr/bin/rpi-eeprom-update: hexdump: not found
root@DietPi:/mnt/mydrive#

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

@davidjmorin
can I ask a question? On what Raspberry Pi model you are? because rpi-eeprom-update is working on RPi4 only.

@davidjmorin
Copy link
Author

raspberry pi4 4gb

@bbsixzz
Copy link

bbsixzz commented Sep 2, 2020

rpi-eeprom-update is not working on two of my RPi4 4GB after the latest update:

/usr/bin/rpi-eeprom-update: 271: /usr/bin/rpi-eeprom-update: hexdump: not found

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

hmm on my RPi4B 4GB it's working fine

root@DietPi4:~# rpi-eeprom-update
BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 LATEST: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 FW DIR: /lib/firmware/raspberrypi/bootloader/critical
VL805: up-to-date
CURRENT: 000137ad
 LATEST: 000137ad
root@DietPi4:~#

Question: Are you using 32bit or 64bit image?

@bbsixzz
Copy link

bbsixzz commented Sep 2, 2020

apt update and apt upgrade produced Unpacking rpi-eeprom (7.12-1) over (7.11-1) ... but same result after reboot.

[EDIT]

32-bit

@davidjmorin
Copy link
Author

hmm on my RPi4B 4GB it's working fine

root@DietPi4:~# rpi-eeprom-update
BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 LATEST: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 FW DIR: /lib/firmware/raspberrypi/bootloader/critical
VL805: up-to-date
CURRENT: 000137ad
 LATEST: 000137ad
root@DietPi4:~#

Question: Are you using 32bit or 64bit image?

root@DietPi:~# rpi-eeprom-update /usr/bin/rpi-eeprom-update: 271: /usr/bin/rpi-eeprom-update: hexdump: not found root@DietPi:~#
This is 32bit

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

I have installed version 7.10-1 still.

root@DietPi4:~# dpkg -l rpi-eeprom
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  rpi-eeprom     7.10-1       all          Raspberry Pi 4 boot EEPROM updater
root@DietPi4:~#

But it's offered as update.

root@DietPi4:~# apt list --upgradable
Listing... Done
rpi-eeprom-images/testing 7.12-1 all [upgradable from: 7.11-1]
rpi-eeprom/testing 7.12-1 all [upgradable from: 7.10-1]
root@DietPi4:~#

Maybe some bug on latest version of rpi-eeprom

@davidjmorin
Copy link
Author

davidjmorin commented Sep 2, 2020

I have installed version 7.10-1 still.

root@DietPi4:~# dpkg -l rpi-eeprom
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  rpi-eeprom     7.10-1       all          Raspberry Pi 4 boot EEPROM updater
root@DietPi4:~#

But it's offered as update.

root@DietPi4:~# apt list --upgradable
Listing... Done
rpi-eeprom-images/testing 7.12-1 all [upgradable from: 7.11-1]
rpi-eeprom/testing 7.12-1 all [upgradable from: 7.10-1]
root@DietPi4:~#

Maybe some bug on latest version of rpi-eeprom

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  rpi-eeprom     7.12-1       all          Raspberry Pi 4 boot EEPROM updater

Odd mine is different

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

Looks like 7.12 is buggy one?

@davidjmorin
Copy link
Author

Looks like 7.12 is buggy one?

Very possible. Gonna squash this attempt for now. Hopefully this gets fixed soon.

@bbsixzz
Copy link

bbsixzz commented Sep 2, 2020

I should prolly not update the eeprom so often, this is what you get :[

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

Unfortunately something we can't influence from DietPi side. 😢

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

found this issue. But not sure if this exactly same or similar raspberrypi/rpi-eeprom#211

@MichaIng
Copy link
Owner

MichaIng commented Sep 2, 2020

Do you guys actually have the hexdump command? which hexdump
This commit is the culprit which adds hexdump command but does not add the related package as dependency, does it?: raspberrypi/rpi-eeprom@eea80bc#diff-86eaef688a7bf372514e072950593ed7

apt install bsdmainutils

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

@MichaIng
would it make sense to downgrade eeprom to 7.10 ?

cd /tmp
wget http://archive.raspberrypi.org/debian/pool/main/r/rpi-eeprom/rpi-eeprom_7.10-1_all.deb
dpkg -i ./rpi-eeprom_7.10-1_all.deb

🤔

At least on my test it was working. But you are the expert 😄

root@DietPi4:~# rpi-eeprom-update
/usr/bin/rpi-eeprom-update: 271: /usr/bin/rpi-eeprom-update: hexdump: not found
root@DietPi4:~# cd /tmp/
root@DietPi4:/tmp# wget http://archive.raspberrypi.org/debian/pool/main/r/rpi-eeprom/rpi-eeprom_7.10-1_all.deb
--2020-09-02 22:17:08--  http://archive.raspberrypi.org/debian/pool/main/r/rpi-eeprom/rpi-eeprom_7.10-1_all.deb
Resolving archive.raspberrypi.org (archive.raspberrypi.org)... 176.126.240.84, 176.126.240.86, 176.126.240.167, ...
Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|176.126.240.84|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 351188 (343K) [application/x-debian-package]
Saving to: ‘rpi-eeprom_7.10-1_all.deb’

rpi-eeprom_7.10-1_all.deb             100%[=========================================================================>] 342.96K   508KB/s    in 0.7s

2020-09-02 22:17:14 (508 KB/s) - ‘rpi-eeprom_7.10-1_all.deb’ saved [351188/351188]

root@DietPi4:/tmp# dpkg -i ./rpi-eeprom_7.10-1_all.deb
dpkg: warning: downgrading rpi-eeprom from 7.12-1 to 7.10-1
(Reading database ... 83296 files and directories currently installed.)
Preparing to unpack ./rpi-eeprom_7.10-1_all.deb ...
Unpacking rpi-eeprom (7.10-1) over (7.12-1) ...
Setting up rpi-eeprom (7.10-1) ...
root@DietPi4:/tmp# rpi-eeprom-update
BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 LATEST: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 FW DIR: /lib/firmware/raspberrypi/bootloader/critical
VL805: up-to-date
CURRENT: 000137ad
 LATEST: 000137ad
root@DietPi4:/tmp#

@MichaIng
Copy link
Owner

MichaIng commented Sep 2, 2020

Bug reported: raspberrypi/rpi-eeprom#215

@MichaIng MichaIng added External Bug 🐞 For bugs which are not caused by DietPi. Waiting for external fix ⏳ Question ❔ and removed Question ❔ labels Sep 2, 2020
@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

@MichaIng we are on 32bit not 64bit. As far as I can see you linked following. Does it makes a difference

This is part of the bsdmainutils package: https://packages.debian.org/buster/amd64/bsdmainutils/filelist

@MichaIng
Copy link
Owner

MichaIng commented Sep 2, 2020

It's the same for armhf and all other architectures and the same for Raspbian as well, but Raspbian doesn't have such a nice online portal to view package details 😉.

From Bullseye on, the command has been moved into the bsdextrautils package, but that is pulled in as dependency by bsdmainutils then, so installing the first solves it on all distros: https://packages.debian.org/bullseye/bsdmainutils


But just to be sure there is not second issue, installing the package solves it, right?

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

as I don't want to play that much on my RPi4 (prod), I was testing it on my RPi3B+. And yes it seems to be fixed by installing bsdmainutils

root@DietPi3:/tmp# dpkg -l rpi-eeprom
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  rpi-eeprom     7.12-1       all          Raspberry Pi 4 boot EEPROM updater
root@DietPi3:/tmp#
root@DietPi3:/tmp# systemctl status rpi-eeprom-update.service
● rpi-eeprom-update.service - Check for Raspberry Pi EEPROM updates
   Loaded: loaded (/lib/systemd/system/rpi-eeprom-update.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2020-09-02 22:36:23 CEST; 2s ago
  Process: 1309 ExecStart=/usr/bin/rpi-eeprom-update -a (code=exited, status=0/SUCCESS)
 Main PID: 1309 (code=exited, status=0/SUCCESS)

Sep 02 22:36:23 DietPi3 systemd[1]: Starting Check for Raspberry Pi EEPROM updates...
Sep 02 22:36:23 DietPi3 systemd[1]: Started Check for Raspberry Pi EEPROM updates.

@MichaIng
Copy link
Owner

MichaIng commented Sep 2, 2020

Although on RPi3 there is no EEPROM, this RPi4 only 😉.

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

I know 😉 but I could have it installed anyway. Just to play around with this.

@MichaIng
Copy link
Owner

MichaIng commented Sep 2, 2020

Yes, also I cannot see an explicit exit path for non-RPi4 models, I guess some of the EEPROM firmware version checks will give an empty output to make the script exit gracefully without applying something.

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 2, 2020

correct, it's running but don't do anything on the RPi3B+

@MichaIng
Copy link
Owner

MichaIng commented Sep 2, 2020

I just opened a PR to add the dependency: raspberrypi/rpi-eeprom#216

@Joulinar
Copy link
Collaborator

Joulinar commented Sep 3, 2020

ok rpi-eeprom has been fixed on version 7.13-1. Thx @MichaIng for your time on this.

root@DietPi4:~# dpkg -l rpi-eeprom
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  rpi-eeprom     7.13-1       all          Raspberry Pi 4 boot EEPROM updater
root@DietPi4:~#
root@DietPi4:~# rpi-eeprom-update
BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 LATEST: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 FW DIR: /lib/firmware/raspberrypi/bootloader/critical
VL805: up-to-date
CURRENT: 000137ad
 LATEST: 000137ad
root@DietPi4:~#

@MichaIng
Copy link
Owner

MichaIng commented Sep 3, 2020

Great, thanks to the RPi devs for the quick release. Also the final solution was IMO the best possible, moving to a command that is part of essential coreutils so that no additional dependency was required anymore 👍. I mark this as closed.

@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed Waiting for external fix ⏳ labels Sep 3, 2020
@MichaIng MichaIng closed this as completed Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Bug 🐞 For bugs which are not caused by DietPi. Question ❔ RPi Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

4 participants