Skip to content

Instantly share code, notes, and snippets.

@chrisloweau
Last active September 21, 2017 02:52
Show Gist options
  • Save chrisloweau/df0e664abf1959240ba49a501f0ec10f to your computer and use it in GitHub Desktop.
Save chrisloweau/df0e664abf1959240ba49a501f0ec10f to your computer and use it in GitHub Desktop.
This script is used to create the 'Persistence' partition for Raspbian x86
#!/bin/bash
DEV=sda
parted /dev/$DEV --script mklabel gpt
parted /dev/$DEV --script mkpart persistence 0% 100%
mkfs.ext4 /dev/${DEV}1
mkdir -p /media/pi/persistence
mount /dev/${DEV}1 /media/pi/persistence
chown pi /media/pi/persistence
echo / union > /media/pi/persistence/persistence.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment