Jump to content

Moving from Micro SD to NVME SSD (Orange Pi 5)


Markus Braun
Go to solution Solved by royk,

Recommended Posts

Hey everyone,

 

I'm starting to lose my mind here.

 

I've got an Orange Pi 5 which works great with a micro SD card. Now I got myself a nvme ssd and all I want to do is move my system from the sd card to the ssd. I've created an image of the sd card on my PC using "dd" and then wrote it on the ssd using dd again.

 

It seemed to work fine, the only issue seems to be, that the UUID of the partitions on the ssd were the same as on the sd card, that's why I changed the UUID of the root partition on the ssd using "tune2fs -U random /dev/nvme0n1p2".

 

I booted up the Pi with my sd card again and used armbian-config to flash mtdblock0 (bootloader install). After that I opened the armbianExt.txt on my nvme boot partition and changed the "rootdev=UUID=" to the UUID of my root partition on the nvme. I have also added "overlays=opi5-sata" in this file.

 

 

But now if I shutdown the system, remove the sd card and try to boot it up with my ssd, it doesn't really work. Nothing seems to happen. If I insert the micro sd, it will boot up again, but "lsblk -f" tells me:

 

NAME        FSTYPE   FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       squashfs 4.0                                                         0   100% /snap/certbot/3641
loop1       squashfs 4.0                                                         0   100% /snap/core/16578
loop2       squashfs 4.0                                                         0   100% /snap/certbot/3698
loop3       squashfs 4.0                                                         0   100% /snap/core/16931
loop4       squashfs 4.0                                                         0   100% /snap/core20/2186
loop5       squashfs 4.0                                                         0   100% /snap/core20/2267
loop6       squashfs 4.0                                                         0   100% /snap/hello-world/29
mtdblock0
mmcblk1
├─mmcblk1p1 vfat     FAT16 armbi_boot F086-14E9
└─mmcblk1p2 ext4     1.0   armbi_root 384d3db4-7e83-40fe-933e-22e63200cb80   12.4G    55% /var/log.hdd
                                                                                          /
zram0                                                                                     [SWAP]
zram1                                                                        35.6M    16% /var/log
nvme0n1
├─nvme0n1p1 vfat     FAT16 armbi_boot F086-14E9                               153M    40% /boot
└─nvme0n1p2 ext4     1.0              65f3148f-b661-42fa-8244-b1d2a0fde9d9

 

So it seems to be using the boot partition of my ssd (/dev/nvme0n1p1) right? But the root partition is still used from the sd card? Oddly enough I can even mount the root partition of my nvme perfectly fine, the folders and files are all there. But it won't be using it on boot as my root partition. And I still have to use my micro sd card to start the system.

 

Can anyone help me out here? How can I tell the system to use the root partition on the ssd?

 

Any help is appreciated!

 

best regards

Markus

 

 

 

Link to comment
Share on other sites

  • Solution

You should use "sudo armbian-install" to install from the sd-card to the nvme. It should copy the boot partition to the /boot folder, so only one partition. After installing to the NVME you should also write the bootloader to the MTD.

 

If it still doesn't work check if the M.2 storage isn't SATA, otherwise you should write the SATA bootloader. To do that you could use the Armbian instructions from:

https://www.reddit.com/r/OrangePI/comments/10iq625/guide_how_to_boot_orange_pi_5_from_sata_m2_ssd/

 

Link to comment
Share on other sites

Thanks yor your help @royk!

 

As far as I know my storage is an nvme (at least it appears as /dev/nvme0n1) and not sata.

 

Do I have to partition my nvme before using armbian-install? What option should I choose when using armbian-install? "4 Boot from MTD Flash - system on SATA, USB or NVMe" seems fine, doesn't it?

 

And after that "7 Install/Update the bootloader on MTD Flash"?

Link to comment
Share on other sites

@Markus Braun To be sure you could make one ext4 partition.  "4 Boot from Flash..." is the right one indeed, after that it should ask to install/update the bootloader which you can agree and otherwise you can choose 7 install/update bootloader indeed.

And by the way, the reason why it didn't work in the first place was probably because you forgot to edit /etc/fstab

Edited by royk
Link to comment
Share on other sites

I wiped the SSD again, this time I created only one big ext4 partition. After that I used armbian-install "4 Boot from MTD Flash - system on SATA, USB or NVMe" and "7 Install/Update the bootloader on MTD Flash".

 

I restarted the Orange Pi 5, but it booted from the micro sd card again. When trying to boot the system without the micro sd card (only the ssd present), it won't boot up at all.

 

Is there anything I'm missing? The folders and files are all on the ssd. Everything seems fine. Do I have to edit the armbianEnv.txt on the ssd?

Link to comment
Share on other sites

Posted (edited)

@Markus Braun It might be a good idea to check the serial console to see what's going wrong, keep in mind that you need a ftdi adapter that can handle a high baudrate.

Things you could check:

Did you disable the sata overlay?

Did you check if all the files are in the /boot folder of the nvme?

Checked if the correct UUID is in /boot/armbianENV.txt and /etc/fstab

Removed the SD-card at the first boot from NVME?

Edited by royk
Link to comment
Share on other sites

I don't have a ftdi adapter.

 

How exactly do I disable the sata overlay?

 

The files in /boot on my nvme are:

 

armbianEnv.txt                  boot.bmp  boot.scr                         dtb    initrd.img-5.10.160-rockchip-rk3588  uInitrd
armbian_first_run.txt.template  boot.cmd  config-5.10.160-rockchip-rk3588  Image  System.map-5.10.160-rockchip-rk3588

 

The armbianEnv.txt on the nvme says:

verbosity=1
bootlogo=false
overlay_prefix=rockchip-rk3588
fdtfile=rockchip/rk3588s-orangepi-5.dtb
rootdev=UUID=e389976d-765a-4392-97c0-fdc69e5fb045
rootfstype=ext4
overlays=ssd-sata
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

My /etc/fstab on the nvme says:

# <file system>                                 <mount point>   <type>  <options>                                                       <dump>  <pass>
tmpfs                                           /tmp            tmpfs   defaults,nosuid                                                 0       0
UUID=e389976d-765a-4392-97c0-fdc69e5fb045       /               ext4    defaults,noatime,commit=600,errors=remount-ro,x-gvfs-hide       0       1

 

lsblk -f gives me:

NAME        FSTYPE   FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       squashfs 4.0                                                         0   100% /snap/certbot/3641
loop1       squashfs 4.0                                                         0   100% /snap/core/16578
loop2       squashfs 4.0                                                         0   100% /snap/certbot/3698
loop3       squashfs 4.0                                                         0   100% /snap/core/16931
loop4       squashfs 4.0                                                         0   100% /snap/core20/2186
loop5       squashfs 4.0                                                         0   100% /snap/core20/2267
loop6       squashfs 4.0                                                         0   100% /snap/hello-world/29
mtdblock0                                                                                  
mmcblk1                                                                                    
├─mmcblk1p1 vfat     FAT16 armbi_boot F086-14E9                               153M    40% /boot
└─mmcblk1p2 ext4     1.0   armbi_root 384d3db4-7e83-40fe-933e-22e63200cb80   12.4G    55% /var/log.hdd
                                                                                         /
zram0                                                                                     [SWAP]
zram1                                                                        35.6M    17% /var/log
nvme0n1                                                                                    
└─nvme0n1p1 ext4     1.0              e389976d-765a-4392-97c0-fdc69e5fb045

 

I'm a little desperate here, but thanks for your support @royk!

 

Any other ideas? I cannot be the only one with this problem, can I? My ssd is 2 TBs, maybe this is too much?

 

Do you have any other ideas?

 

 

 

Link to comment
Share on other sites

Posted (edited)

@Markus Braun

 

edit: I have an orange pi 5 plus!

 

I have mine booting without any SD card. I sadly don't recall whatever guide I followed but I am pretty sure I had to toogle nvme booting somwhere in armbian-config or some command that updated the bootloader on the opi5+

 

This is my /boot/armbianEnv.txt

 

verbosity=1
bootlogo=true
overlay_prefix=rockchip-rk3588
fdtfile=rockchip/rk3588-orangepi-5-plus.dtb
rootdev=UUID=4578f871-5c8a-406a-87bd-be8562b1f8bf
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

my /etc/fstab look like this
UID=4578f871-5c8a-406a-87bd-be8562b1f8bf / ext4 defaults,noatime,commit=600,errors=remount-ro 0 1
UUID=dce8fefd-ace9-468e-8695-55071f59094f /boot ext4 defaults,commit=600,errors=remount-ro 0 2
tmpfs /tmp tmpfs defaults,nosuid 0 0
[... nfs and other irrelevant junk]

 

Did you change your fstab before running dd so it reflects the UUID of the the nvmes /boot disk? or change it to /dev/nvme... blabla ?

 

I will be getting a new opi5+ in a week or two with an nvme so I will need to revisit these steps anyway. Let me know if I can check something on my side.

Edited by igelkotten
Link to comment
Share on other sites

It's finally working now!

 

And it probably was working before, but I didn't notice it, because for whatever reason the IP address of the Orange Pi changed when using the ssd. When I tried to ssh on the device, I couldn't get any connection, since I was using the IP to connect. When using the new IP of the device (I was checking the web interface of my router and it showed me an Orange Pi 5 with a new IP), it worked like a charm!

 

Thanks for your input @royk & @igelkotten!

 

Just to clarify @igelkotten: I didn't use dd in my last attempt at all. I created one single partition on the ssd and did what @royk suggested from the very beginning: Use armbian-install (which is btw also accessible through armbian-config) and then "4 Boot from MTD Flash - system on SATA, USB or NVMe". After that is completed, it asks you if you want to install/update the bootloader on MTD Flash, which I agreed.

 

Then I didn't already reboot the device. Instead I took a look at the armbianEnv.txt and /etc/fstab to see if the UUID is correct. Everything looked fine, so I rebooted without the micro sd card and apparently the Orange Pi was working the whole time, but using a different IP. Anyway, it's working now and I'm happily using the ssd!

 

Thanks again for the help! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines