From da1641a7ade7446272df2781ea8fba42abbadefe Mon Sep 17 00:00:00 2001 From: Brennen Bearnes Date: Fri, 11 Sep 2015 13:55:24 -0600 Subject: [PATCH] chroot installer: pin origin, deal with jessie changes to kpartx --- adafruit-pitft-chroot-install | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/adafruit-pitft-chroot-install b/adafruit-pitft-chroot-install index 8583462..f2e3aa1 100755 --- a/adafruit-pitft-chroot-install +++ b/adafruit-pitft-chroot-install @@ -54,15 +54,18 @@ target_mnt="/media/raspbian-target" echo "Mounting $target_image on $target_mnt" kpartx -av $target_image mkdir -p $target_mnt -mount /dev/mapper/loop0p2 $target_mnt -mount /dev/mapper/loop0p1 $target_mnt/boot +mount /dev/dm-1 $target_mnt +mount /dev/dm-0 $target_mnt/boot -echo "Dropping you into Bash" +echo "Dropping you into Bash before install" chroot $target_mnt sudo /bin/bash echo "Adding apt.adafruit.com to sources.list" curl -SLs https://apt.adafruit.com/add | chroot $target_mnt /bin/bash +# pin apt.adafruit.com origin for anything installed there: +echo -e "Package: *\nPin: origin \"apt.adafruit.com\"\nPin-Priority: 1001" | chroot $target_mnt bash -c "cat > /etc/apt/preferences.d/adafruit" + echo "Installing kernel and adafruit-pitft-helper" chroot $target_mnt sudo apt-get install -y raspberrypi-bootloader chroot $target_mnt sudo apt-get install -y adafruit-pitft-helper @@ -70,7 +73,7 @@ chroot $target_mnt sudo apt-get install -y adafruit-pitft-helper echo "Running adafruit-pitft-helper" chroot $target_mnt sudo adafruit-pitft-helper -t $pitfttype -echo "Dropping you into Bash" +echo "Dropping you into Bash after install" chroot $target_mnt sudo /bin/bash echo "Unmounting $target_image"