Skip to content

Instantly share code, notes, and snippets.

@Oneiroi
Created May 25, 2015 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oneiroi/405834baecb5c732c982 to your computer and use it in GitHub Desktop.
Save Oneiroi/405834baecb5c732c982 to your computer and use it in GitHub Desktop.
#
# ensure CWD contains dirs root and boot
# ensure sd card has not automounted elsewhere
# ensure ArchARM-rpi2.tgz exists in CWD
# ensure partitions configured as per: http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2
#
mkfs.vfat /dev/mmcblk0p1 && \
mount /dev/mmcblk0p1 ./boot && \
mkfs.ext4 /dev/mmcblk0p2 && \
mount /dev/mmcblk0p2 ./root && \
bsdtar -xpf ArchARM-rpi2.tgz -C ./root && \
mv ./root/boot/* ./boot/ && \
mkdir ./root/.ssh && \
chmod 700 ./root/.ssh && \
cp /home/dbusby/.ssh/id_rsa.pub ./root/.ssh/authorized_keys && \
chmod 600 ./root/.ssh/authorized_keys && \
umount ./boot ./root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment