Is it possible to copy or clone all files from eMMC to an external drive?

I copy all the files from mmcblk1p0 to an external SSD with cp command. However, the files which copied to the SSD become invisible(not hidden).

How to fix it?

Hi,

what do you mean with invisible? Did you the mount the partition?
Also, it would not work if you did this because the eMMC was near full, and you wanted to use an external drive for saving data, as the rootfs still resides in the eMMC.

I mean most of the files, if not all, in eMMC were copied to an SSD but all the copied files in the SSD are invisible. They could not be seen in terminal or file explorer.

Hi,

does the available capacity on your SSD change after you copy the file?
What does df -h give you before and after this issue?

Yes, the used space of the SSD increased from 7 % to 18%. That’s why I know the files existed.

Doesn’t work.

I chose “unhidden” option but the files still didn’t show up in the file explorer.

The SSD(sdb1) was mounted.

Hi,

not sure how you did it, but did you check the correct mounting point for your SSD?

I just copied the files with normal procedure. This problem is probably related to incorrect file attribute.

Hi,

does ls -a still show nothing?

No.

Can you try to format your SSD if it’s due to some attribute issues?

I will reformat the SSD if there is no way to make the files visible.

1 Like

Is the SSD partition formatted as ext4? NTFS? With that SSD on the Jetson, what do you see from:
lsblk -f

To copy everything I’d suggest using rsync. If you post the lsblk -f information I’ll suggest the command to use.

The SSD is formatted in ext4. I think this is probably a file system problem.

Only a recycled bin folder can be seen in file explorer

What content do you want to copy? Everything from “/” (the whole filesystem)? Where are things mounted at? Can you post the output of “lsblk -f”?

I copied the whole thing from eMMC to an USB drive(sdb1), sda1 is root drive. I followed the normal procedures to do it but no any files/folders can be seen except “lost+found.”

Which command is the best for copying the rootfs from eMMC to external drive?

Hi,

can you format the SSD and just copy some random files to make sure it functions correctly?
Assuming you want to use your SSD as roots, there are some scripts that do it all for you:

I just wanted a backup in case the sda1 fail which could render the TX2 unbootable because the file system is pointed to sda1. I could replace it with a backup if it fails.

I could not find a m.2 E SSD and used a m.2 B+M to m.2 E adapter instead but to no avail. The plug-in SSDs (I tried different SSDs) could not be detected. I assume the m.2 E slot is only for Bluetooth or Wi-Fi but not for SSD.

Hi,

so how exactly is your hardware setup now? The M.2 E slot is for Wi-Fi cards as pointed by you, and not for SSD. What did you mean with:

The plug-in SSDs (I tried different SSDs) could not be detected.

Was the SSD you failed to copy files into connected with an M.2 adapter? Or you use something like a USB closure to connect it?

USB drive/SSD can be detected but not m.2 SSD.

The link you showed me is about m.2 SSD. Therefore I mentioned the problems I encountered before.

I connect the SSD to the board with a SATA to USB cable which is better than enclosures, I copied all the files from eMMC to sdb1(USB) with cp command. It seems to be not working.

Hi,

I think it should work with any kind of external storages, not just M.2 SSD.

sudo ./change_rootfs_storage_direct-emmc_to_ssd.sh {EXTERNAL_STORAGE}

Can you try this to make sure your SSD is functioning properly?