Guest User

mount script for chroot on raspi

a guest
Feb 11th, 2013
704
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. mnt=mount
  4. root_disk=raspi.img
  5. mnt_devices="proc dev dev/pts sys"
  6.  
  7. sudo mkdir "$mnt"
  8. sudo mount -o loop,offset=62914560 $root_disk "$mnt"
  9.  
  10. for i in $mnt_devices ; do
  11. sudo mount -o bind /$i "$mnt"/$i
  12. done
  13.  
  14. sudo chroot "$mnt" /bin/bash
RAW Paste Data