Made a little script to copy multiple OP OS on SD card


Linux-SWAT

Forum Addict!
Joined
Feb 13, 2010
Messages
9,175
Assuming you have pandora-rootfs.tar.bz2 and autoboot.txt in the same folder.


Assuming you have a 8G SD card formatted in 8 X 1G ext2 ou ext3.


Assuming this card is recognized as /dev/sdd


Then this script copies 8 times (may have a number pb with logical drives) the official OS, so you can tweak around for days, adapting autoboot.txt


You have to run it as root.


If someone knows how to fast format, tell me.



Code:
for i in `seq 1 8`; do 


 mkdir -p /mnt/usb/$i


done


for u in `seq 1 8`; do 


 echo "ATTTTTEEEEENNNTIOOOONNNNN"

 sleep 3


done


for i in `seq 1 8`; do 


 echo "loop $i"


 mount /dev/sdd$i /mnt/usb/$i/


 rm -rf /mnt/usb/$i/*


 tar jxf pandora-rootfs.tar.bz2 -C /mnt/usb/$i/


 umount /mnt/usb/$i/


done


mount /dev/sdd1 /mnt/usb/1


cp autoboot.txt /mnt/usb/1/


umount /mnt/usb/1
 
Last edited by a moderator:
Back
Top