Advertisement
metalx1000

Multi Architecture Chroot - Debian ARM and x86 Debootstrap

Sep 30th, 2013
1,385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.66 KB | None | 0 0
  1. #!/bin/bash
  2. #https://wiki.debian.org/EmDebian/CrossDebootstrap#QEMU.2Fdebootstrap_approach
  3. dir="debian_armel_jessy"
  4. ver="jessy"
  5.  
  6. apt-get install binfmt-support qemu qemu-user-static debootstrap
  7.  
  8. mkdir $dir
  9.  
  10. debootstrap --foreign --arch armel $ver $dir http://ftp.debian.org/debian/
  11.  
  12. cp /usr/bin/qemu-arm-static $dir/usr/bin
  13.  
  14. DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
  15.  LC_ALL=C LANGUAGE=C LANG=C chroot $dir /debootstrap/debootstrap --second-stage
  16.  
  17. DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
  18.  LC_ALL=C LANGUAGE=C LANG=C chroot $dir dpkg --configure -a
  19.  
  20. echo "Welcome to your ARM chroot!"
  21.  
  22. chroot $dir bash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement