From 2c132c75dee50f7a5b26a661b50982275a0f3127 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 10 Jul 2013 11:58:18 +0200 Subject: create cfgfs partition --- scripts/install-rpi.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3