-
Notifications
You must be signed in to change notification settings - Fork 338
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
Issue #123: Errors with NVMe on Compute Module 4. #147
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you!
@@ -573,7 +573,7 @@ get_src_disk() | |||
partition=${1#/dev/} | |||
disk=${partition:: -1} | |||
num="${partition: -1}" | |||
if [[ $disk == *"mmcblk"* ]] | |||
if [[ $disk == *"mmcblk"* || $disk == *"nvme"* ]] | |||
then | |||
SD_slot_boot=1 | |||
disk=${disk:0:7} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment: I first thought this line will fail for nvme but it works fine 👍 . It works for nvme only as long as for /dev/nvme<x>n<y> x and y has only one digit. But that's a restriction also on the previous code which extracts the partition number.
Testing it on one of my Pis with eMMC boot and an NVMe drive:
Note that I was testing with an 8 TB NVMe drive, and it was only sized to 2 TB... |
I just tested the PR on my CM4 with the 04-04 lite image. Boot from the cloned nvme works perfect 👍 Unfortunately my CM4 doesn't boot any more from nvme with later images. I created an issue on this. |
I'm trying this on CM4 with eMMC storage and /dev/nvme0n1 and it fails despite the manual changes made to the rpi-clone file. I changed the 576 and 1060 line with the same OR condition, but without much luck. Pointers appreciated
|
Why didn't you grab the file from @geerlingguy s PR instead of updating the file? I suggest to compare your modified rpi-clone version with the one in the PR or grab the file from the PR and test again. Just to make sure you use the PR code 😉 . I have exactly the same config other than a smaller NVMe disk and it works for me.
|
Both methods the file from PR and manually editing the script produce the same error. |
😢 Well, then a bash debug log may help. Just invoke the script with |
Plot thickens: |
I suggest to invoke the |
Right, I'm even more confused. |
@notenoughtech Any updates on your issue? |
Hi, @framps |
Right. |
Oh good 😳 ... you can attach a file in a comment - just use drag and drop 😉 Please clean up your huge comment ... nobody will ever read this 😢 |
So there is no need any more for the debug log 😄 |
I thought the code would auto collapse or something. I cleaned it up. Now let's see if this works with non eMMC CM4s |
No matter how many times I try, the CM4 Lite is not liking the boot from nvme. rpi-clone worked on CM4 and change of boot from eMMC to NVMe was easy enough. Same EEPROM firmware on CM4 Lite and boot sequence on CM4 Lite and no dice after rpi-clone. Anyone had this much problems? I can also confirm that I still have the issue of |
I don't have a CM4 lite to test rpi-clone in this environment. Not sure why you actually use rpi-clone. If you just clone the SD card image to NVMe to be able to boot from NVMe why don't you install the OS directly on NVMe instead to the SD card first and then clone the SD to NVMe? See this page how I install RaspbianOS directly on NVMe. |
Why we use tools?
We both know working with rpi-clone is dead easy instead of messing about
with dd.
That's for why.
I could just flash the NVMe drives via CM4 as this worked, but the idea is
to get it working properly rather than hack it working.
What I don't understand why executing rpi-clone via bash works on CM4 but
failed when same file runs from the command line.
Mat Zolnierczyk
Maker, Robotics Engineer
Owner | NotEnoughTech
***@***.***
notenoughtech.com
Teesside, North Yorkshire, UK
[image: facebook] <https://www.facebook.com/NotEnoughTECH/>
[image: twitter] <https://twitter.com/NotEnoughTECH>
[image: linkedin] <https://www.linkedin.com/in/mat-zolnierczyk/>
[image: instagram] <https://www.instagram.com/notenoughtech/>
…On Fri, Nov 4, 2022 at 6:48 PM framp ***@***.***> wrote:
I don't have a CM4 lite to test rpi-clone in this environment.
Not sure why you actually use rpi-clone. If you just clone the SD card
image to NVMe to be able to boot from NVMe why don't you install the OS
directly on NVMe instead to the SD card first and then clone the SD to
NVMe? See this page
<https://www.linux-tips-and-tricks.de/en/raspberrye/614-raspberry-compute-module-4-setup-guide>
how I install RaspbianOS directly on NVMe.
—
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKDRL244BUVHF53KMYJ7HZDWGVLATANCNFSM6AAAAAAQSQJWOM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This requires further debugging I'm not able to assist. @billw2 may be able to help. But given his last commit is 2.5 years ago I doubt he will. |
This patch is now maintained in my fork: https://github.com/geerlingguy/rpi-clone |
Fixes #123. Allows users to work with NVMe drives on the CM4.