summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-07-10 11:58:18 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-07-10 11:58:18 +0200
commit2c132c75dee50f7a5b26a661b50982275a0f3127 (patch)
tree123c642f13798154e541fe60d1ebde7c57257d94 /scripts
parent4bcb070f75c9e107b2107d8ab3d4d29938644a1b (diff)
create cfgfs partition
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-rpi.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/install-rpi.sh b/scripts/install-rpi.sh
index a8aa22f2d..d104f5431 100755
--- a/scripts/install-rpi.sh
+++ b/scripts/install-rpi.sh
@@ -17,6 +17,16 @@ else
exit 1
fi
+printf "Checking if sfdisk is installed"
+sfdisk=$(which sfdisk)
+
+if [ ! -z $sfdisk -a -x $sfdisk ];then
+ printf "...okay\n"
+else
+ printf "...failed\n"
+ exit 1
+fi
+
printf "Checking if mke2fs is installed"
mke2fs=$(which mke2fs)
@@ -88,14 +98,13 @@ rootpart=${1}2
$parted -s $1 mklabel msdos
sleep 2
maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
-rootsize=$(($maxsize-2))
+rootsize=$(($maxsize-16))
$parted -s $1 unit cyl mkpart primary fat32 -- 0 16
-$parted -s $1 unit cyl mkpart primary ext2 -- 16 -2
-#$parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize
+$parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize
+$parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize
$parted -s $1 set 1 boot on
-#$sfdisk --change-id $1 1 27
-#$sfdisk --change-id $1 3 88
+$sfdisk --change-id $1 3 88
sleep 2
mkfs.vfat ${1}1
$mke2fs ${1}2