Advertisement
workdowg

archarm image creator

Apr 21st, 2012
844
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. #!/bin/bash -v
  2. #name this file archarm-image-creator.sh
  3. cd /sdcard
  4. #make and mount image file
  5. dd if=/dev/zero of=archarm.img seek=2000000000 bs=1 count=1 #create empty 1.9gb image file
  6. mke2fs -F archarm.img
  7. mknod /dev/loop256 b 7 256
  8. losetup /dev/loop256 archarm.img
  9. mount -t ext2 /dev/loop256 /sdcard/arch/
  10. # download and extract archlinuxarm
  11. cd arch
  12. wget http://archlinuxarm.org/os/ArchLinuxARM-trimslice-latest.tar.gz #this is compatable with the A200
  13. tar xzf ArchLinuxARM*.tar.gz
  14. rm ArchLinuxARM*.tar.gz
  15. #make some directories
  16. mkdir /sdcard/arch/media/external_sd
  17. mkdir /sdcard/arch/media/sdcard
  18. mkdir /sdcard/arch/dev/pts
  19. mkdir /sdcard/arch/dev/ptmx
  20. mkdir /sdcard/arch/root/.vnc
  21. # do some mounting
  22. mount -o bind /dev/ /sdcard/arch/dev
  23. mount -t proc proc /sdcard/arch/proc
  24. mount -t sysfs sysfs /sdcard/arch/sys
  25. mount -t devpts devpts /sdcard/arch/dev/pts
  26. mount -o bind /sdcard /sdcard/arch/media/sdcard
  27. # enter the chroot
  28. chroot . /bin/bash
  29. # your now in the Arch install.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement