clone copy of sd card by using partclone
#1
Wink 
Hi all

sd card is /dev/sdc Exclamation .

1) backup

dd if=/dev/sdc of=~/Pine-mate-MBR.img bs=512 count=10000

partclone.vfat -c -s     /dev/sdc1          -o    ~/Pine-mate-sdx1of3.pcl

fsck /dev/sdc2

partclone.ext4 -c -s     /dev/sdc2          -o    ~/Pine-mate-sdx2of3.pcl



and then i put anothe sd card  into USB . Exclamation


2)restore

dd if=/root/Pine-mate-MBR.img of=/dev/sdc bs=512

partclone.vfat -r -s /root/Pine-mate-sdx1of3.pcl -o /dev/sdc1

partclone.ext4 -r -s /root/Pine-mate-sdx2of3.pcl -o /dev/sdc2

mkswap /dev/sdc3

---------------------------
all is done . Big Grin

this is much faster by using dd . Heart
----------
regards
  Reply
#2
Interesting...
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#3
(11-03-2016, 09:09 PM)MarkHaysHarris777 Wrote: Interesting...

thanks for reply .

about  
dd if=/dev/sdc of=~/Pine-mate-MBR.img bs=512 count=10000

10000 is too big .
i don not know best value  .

and
this line hard copy of MBR(?) and partition structure . Idea
if you want full size of partition 1  , you should use gparted Tongue .

and this method is applicable for btrfs arch linux Heart  (partclone.btrfs)

--------------
regards
  Reply
#4
what do you mean by USB?
what about the FIRST SD card, are there still open files when you remove it?
why do you never use command sync?
  Reply
#5
(11-03-2016, 10:02 PM)dkryder Wrote: what do you mean by USB?
what about the FIRST SD card, are there still open files when you remove it?
why do you never use command sync?

arch linux PC:USB port------ Exclamation sd card reader Exclamation ------sd card in which pine64 lives .

no,
cloning to img , and then clone to another sd card .
so mass productin is easy Angel .


in btrfs , rsync is impossible
1)btrfs cloning itself
https://youtu.be/eFfKmEh6KO8
2)and then gparted
https://youtu.be/wRpEqggWS8w

---
regards
  Reply
#6
This actually has some cool application:  if we start providing a service ( like noobs on Raspberry PI ) to mail out SD cards for folks that don't want to go to the trouble of making their own.

difinitely worth looking into.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#7
(11-03-2016, 10:17 PM)hatahata Wrote: in btrfs , rsync is impossible

sync, not rsync. And it is probably a good idea to do it before removing the target microSD, just in case you yank it out as it's finishing flushing the buffers to disk... although the flashing light (if there is one) on the microSD card reader is usually a giveaway that it hasn't really finished yet. Wink
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  resize root partition to max available space SD card can provide bilylilyli 16 22,911 11-18-2016, 07:10 PM
Last Post: pfeerick
Sad How to resize the root partition in order to fully utilize the SD Card MicroDiery 5 8,358 05-24-2016, 05:48 AM
Last Post: Luke

Forum Jump:


Users browsing this thread: 2 Guest(s)