Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

tentative proposal; duplicate sd card on running orange pi

Featured Replies

hi all .

 

i try clone  sd card on running orange pi (cone 32GB to 16GB).

original sd is 32GB ,  clone sd is 16GB .

 

1) insert USB sd converter ( 16GB sd is in ).

    this is recognized as sdb  because i alredy attach USB HDD.

 

 

2) i alredy install boot loader into sdb (16GB).  see -> http://forum.armbian.com/index.php/topic/897-backup-restore/

so

 

mkfs.ext4 /dev/sdb1

 

 

3)mount /dev/sdb1 /mb1

and run the next shell script

----------------------------------------

 

cd /mb1
df
pwd
cp  --archive /bin /etc /home /lib /opt /root /run /sbin /srv /tmp /usr /var /selinux /boot /media      ./
mkdir -p boot dev sys mnt proc

 

 

4) then halt , and replace sd card .

    orange pi boot with new 16GB sd card .

 

if this is right ,  backup is easy and time sparing because this is done on running machine . :lol:

 

--------------------------------------------

tuyosi

What about rsync command which we use for transferring system from SD to USB / NAND / HARD drive?

 

https://github.com/igorpecovnik/lib/blob/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh#L55-L56 

 

.exclude file content example:

/boot/*
/dev/*
/proc/*
/sys/*
/media/*
/mnt/*
/run/*
/tmp/*

Mount destination under /destination and execute:

rsync -avrltD --delete --exclude-from=.exclude / /destination
  • Author

thanks  for great advice .

 

i try another orange pi PC running armbian , this is ordinaly armbian which has 32GB micro sd card only .

( i do not stop armbian , make clone sd card on runnning machine  )

 

i insert USB card reader which has 16GB micro sd card .

 

the chart is

 

clone.jpeg

after

 

 

mkfs.ext4  /dev/sda1

mount /dev/sda1 /ma1

 

run the next shell script

shell sctipt is

----------------

df
read X
echo $X
cd /ma1
cp  --archive /bin /etc /home /lib /opt /root  /sbin /srv /usr /var /selinux /boot /SWAP    ./
cd /ma1
mkdir -p  dev proc sys media mnt run tmp

 

i have made  swap file as /SWAP 1 month ago on 32GB sd

 

after halt -p

 

i change 32GB for 16GB , armbian boots .

 

how to install boot loader into 16GB micro sd card  is  http://forum.armbian...backup-restore/  .

--------------------

tuyosi

  • Author

i also try the following .

then

orange pi PC also boot armbian .

 

 

clone-rsync.bat
umount /ma1
df
fdisk -l /dev/sda

 

read X
echo $x

mkfs.ext4 /dev/sda1
mount /dev/sda1 /ma1

 

cd /ma1
mkdir -p bin etc home lib opt root sbin srv usr var selinux boot

 

for x in /bin /etc /home /lib /opt /root  /sbin /srv /usr /var /selinux /boot 
do
rsync -avHx  --delete $x/  /ma1/$x/
done
 

cd /ma1
mkdir -p  dev proc sys media mnt run tmp
 

touch /ma1/SWAP
dd if=/dev/zero of=/ma1/SWAP bs=1M count=1024
mkswap /ma1/SWAP

 

-------------------------------

the next ,

 

umount /ma1
df
fdisk -l /dev/sda

 

read X
echo $x

mount /dev/sda1 /ma1
 

cd /ma1
mkdir -p bin etc home lib opt root sbin srv usr var selinux boot

 

for x in /bin /etc /home /lib /opt /root  /sbin /srv /usr /var /selinux /boot 
do
rsync -avHx  --delete $x/  /ma1/$x/
done

 

if this is right ,  fast cloning is done .

-------

regards

This project may be what you are looking for: https://github.com/billw2/rpi-clone

 

Although written for Raspbian, it may work for Armbian if you replace every occurrence of  'mmcblk0p2' with 'mmcblk0p1' in the script.

 

[ Disclaimer: I have not tried this myself and am not responsible if your house catches on fire and burns down. :-) ]

  • Author

 thanks for good information .

  

-------------------------------------

partclone also use rsync but i have not tried it yet in order to clone sd card's partition  .

anyway it is easy to clone sd card , so we can take the risk of not booting armbian forever  to improve armbian .

 

  nothing ventured, nothing gained

 

---------------

my japanese home page is http://orange-pi-2.blogspot.jp/2016/01/orange-pi-2g.html

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.