diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-09-26 12:12:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-09-26 12:12:26 -0300 |
commit | 96e21d9866cfc7b853f5cb8728ff2f7d7409ea84 (patch) | |
tree | d2bbe49d5b94a69546086530e34c86482c52921e /share/hydractl | |
parent | 52ecfc3590fc33bff702ec1478ac61378639c849 (diff) | |
download | hydra-96e21d9866cfc7b853f5cb8728ff2f7d7409ea84.tar.gz hydra-96e21d9866cfc7b853f5cb8728ff2f7d7409ea84.tar.bz2 |
Provision fixes for raspi
Diffstat (limited to 'share/hydractl')
-rwxr-xr-x | share/hydractl/provision | 8 | ||||
-rwxr-xr-x | share/hydractl/provision-raspi | 16 |
2 files changed, 19 insertions, 5 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index 79c88cc..087b703 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -109,10 +109,16 @@ function hydra_provision_config { hydra_user_config vg $hostname "Install vg" hydra_user_config grub y "Setup GRUB? (y/n)" hydra_user_config mirror http://http.debian.net/debian/ "Debian mirror" + + # Check arch + if [ "$arch" == "armel" ] || [ "$arch" == "armhf" ]; then + echo "You probably want to run provision-raspi instead of provision" + exit 1 + fi } # Load configuration -hydra_provision_load_config +hydra_provision_config_load $1 # Parameters WORK="/tmp/debootstrap" diff --git a/share/hydractl/provision-raspi b/share/hydractl/provision-raspi index 640616f..5b3ea15 100755 --- a/share/hydractl/provision-raspi +++ b/share/hydractl/provision-raspi @@ -29,23 +29,31 @@ function hydra_provision_config { hydra_user_config arch armel "System arch" hydra_user_config version jessie "Distro version" hydra_user_config mirror http://http.debian.net/debian/ "Debian mirror" + + # Check arch + if [ "$arch" != "armel" ] && [ "$arch" != "armhf" ]; then + echo "You probably want to run provision instead of provision-raspi" + exit 1 + fi } # Load configuration -hydra_provision_load_config +hydra_provision_config_load $1 # Parameters WORK="/media/mmc" CHROOT="hydra_sudo_run chroot $WORK" CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" -RPI_URL="http://goo.gl/1BOfJ" +RPI_URL="https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update" # Get config parameters. hydra_provision_config # Partitioning -# TODO automated -hydra_sudo_run cfdisk $device # bootable VFAT (0B) and linux partitions +hydra_sudo_run parted -s -- $device mklabel msdos +hydra_sudo_run parted -s -- $device unit MB mkpart primary fat32 1 100 +hydra_sudo_run parted -s -- $device unit MB mkpart primary ext2 101 -1 +hydra_sudo_run parted -s -- $device set 1 boot on hydra_sudo_run mkdir -p $WORK # Create filesystems |