Jump to content

Recommended Posts

Posted

I thought it would be easy, but I am now turning in circles, so I am asking here.

I have a working system booting on NVME (when no SD card inserted), with two partitions nvme0p1 (256Mb) and nvmeop2 (40Gb) 

 

I would like to clone my working system on a SD card.

How shall I proceed?

 

I am not asking details instruction, only the rough path I should follow (e.g. dd partitions, tune2fs ......).

 

PS: I thought it would be easy, but whatever I do, the system keep taking /boot on the nvmeop1, so I really struggle to boot on the /boot of the SD card

Posted (edited)

@Tony3 You've to edit the UUID in armbianEnv.txt to the one of your SD card.  You could find it with the Gnome Disk-utility or with blkid in terminal.

And edit the UUIDs of the mounting points in /etc/fstab

 

For "cloning" you could use sudo cp -ra /source/* /destination

Edited by royk
Posted

I'd suggest using dd to get an exact clone; that way, you don't have finagle UUIDs.


Assuming your destination is larger than your source, I'd run the following from a third device with both drives available:
 

dd if=/dev/<source> of=/dev/<destination> bs=4M 

 

That's how I migrated from SDcard to an NVME drive without any headaches whatsoever. If you want to grow the filesystem to consume the full drive after you've dd'ed, you can use fdisk/parted/gparted to do so. Just make sure you note the starting sector when re-creating the partition table. Then it's just a matter of growing the filesystem (xfs_growfs, resize2fs, etc).

Posted

yes of course, update /etc/fstab, now working, thanks Royk.

 

To Tom1238732, I did the copy with dd, but not for the whole disk, only the partitions /boot and /

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