I have an odroid (raspberry-like) machine with an arch linux system installed. Now I want to move the system from one microsd (A) to another microsd (B). When I tried this, the system became corrupted, information about files attributes were lost:
- Copy files from A to osx-host
cp -R /Volume/microsd_a/* ~/Desktop/backup
- Copy files from osx-host to B
cp -R ~/Desktop/backup/* /Volume/microsd_b
Is it real to copy linux-system using osx-host with preserving integrity?
Update:
dd
. I tried this way, but there is a problem. My sd cards have different sizes, 64 Gb and 16 Gb, but system installed on 64 Gb disk has no more than 8 Gb. So when I launched the copying process, output image file exceed 16 Gb and I killed the process. By the way, the MBR contains information about partition table which should be different (one partition 64Gb / one partition 16 gb). And notice, I do not need to copy bootloader from MBR, I have an ability to flash disk bootloader by other ways.cp
. What I wanted to listen as the answer is the list of flags I need to make this operation. Readingman cp
didn't help me.cp -a
does not copy all files because ofCannot allocate memory
error. Triedcp -aX
, no attributes were restored after copying data to second sdcard.tar
. I tried multiple times with flags, last one wastar -cvpf; tar --same-owner -xpf
. But file attributes were still corrupted.
Again:
- Are you sure, it is possible to preserve file attributes through copying ext4 -> APFS -> ext4
?
- If this is possisble, how does it work and which command with which flags should I use?