How to clone USB to sd card in raspberrypi?

First of all, I have searched everywhere, it is sd to USB, not the vice versa. Actually I had installed the manjaro on usb drive and left raspbian on the sd card. IT is the dualboot bootloader, Which boots from USB if available, or else from sd card. I had to see how fine it was working before switching to the main sd card.(because sd card had a lot of imp. files) I transferred all the files to hdd and formatted the sd card. But now i’m stuck here- Raspbian had a utility do this directly. But the manjaro, I am afraid, does’nt. Can anyone tell me how to go further.
I’m a newbie. pls.
and it would be good if the utility is added.
IT seems foolish, but i dont want to reset all the progress on the Manjaro MATE also.
or else i could have written a clean install.

As a general rule, cloning to or from running disks should not be done, as it is prone to file corruption.

But if your SD card is at least as big as your USB drive, you can use your regular PC to dd from one to the other.

yup the sd card is double the size of USB
Could u please tell how to do or hint it, i’m really new and don’t want to mess up in the middle.

From your regular Linux PC, insert USB and SD card.
In this example we will use /dev/sdX for USB and /dev/sdY for SD card (Check yours with lsblk in the terminal).

Depending on the size of the USB drive, this can take a while.

sudo dd if=/dev/sdX of=/dev/sdY status=progress && sync

When it’s done, you can boot the SD card and run sudo resize-fs to have the filesystem expand to fill the SD card.

not possible through Win?? :frowning_with_open_mouth:

That I don’t know. Sorry.

well. thanks for the answer, I was just asking because i have a linux dualboot in my windows pc but it takes time to switch.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.