create_sdcard: remove support for creating images

this is legacy, and probably broken. now we do provide
ready to use images.

this reverts debed63cff2951690191542e6daf04b3afdf0eaa
This commit is contained in:
Stefan Saraev 2015-01-09 13:39:08 +02:00
parent 92823333c1
commit aae9acfe7c

View File

@ -20,10 +20,6 @@
# usage: sudo ./create_sdcard <drive> # usage: sudo ./create_sdcard <drive>
# example: sudo ./create_sdcard /dev/sdb # example: sudo ./create_sdcard /dev/sdb
# loop example: sudo ./create_sdcard /dev/loop0 ~/vSD.img
# create an empty image file for use with loop device like this:
# dd if=/dev/zero of=~/vSD.img bs=1M count=910
if [ "$(id -u)" != "0" ]; then if [ "$(id -u)" != "0" ]; then
clear clear
@ -40,9 +36,6 @@ if [ -z "$1" ]; then
echo "# please execute with your drive as option #" echo "# please execute with your drive as option #"
echo "# example: sudo ./create_sdcard /dev/sdb #" echo "# example: sudo ./create_sdcard /dev/sdb #"
echo "# or: sudo ./create_sdcard /dev/mmcblk0 #" echo "# or: sudo ./create_sdcard /dev/mmcblk0 #"
echo "# or: sudo ./create_sdcard /dev/loop0 ~/vSD.img #"
echo "# to create an image file for /dev/loop0 option: #"
echo "# sudo dd if=/dev/zero of=~/vSD.img bs=1M count=910 #"
echo "#########################################################" echo "#########################################################"
exit 1 exit 1
fi fi
@ -53,12 +46,6 @@ case $DISK in
PART1="${DISK}p1" PART1="${DISK}p1"
PART2="${DISK}p2" PART2="${DISK}p2"
;; ;;
"/dev/loop"*)
PART1="${DISK}p1"
PART2="${DISK}p2"
IMGFILE="$2"
losetup $DISK $IMGFILE
;;
*) *)
PART1="${DISK}1" PART1="${DISK}1"
PART2="${DISK}2" PART2="${DISK}2"
@ -217,14 +204,6 @@ echo "#########################################################"
echo "creating filesystem on $PART2..." echo "creating filesystem on $PART2..."
mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 "$PART2" -L Storage mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 "$PART2" -L Storage
# remount loopback device
if [ "$DISK" = "/dev/loop0" ]; then
sync
losetup -d $DISK
losetup $DISK $IMGFILE -o 1048576 --sizelimit 131071488
PART1=$DISK
fi
# mount partition # mount partition
echo "mounting partition $PART1 ..." echo "mounting partition $PART1 ..."
rm -rf /tmp/openelec_install rm -rf /tmp/openelec_install
@ -257,9 +236,4 @@ echo "#########################################################"
echo "cleaning tempdir..." echo "cleaning tempdir..."
rmdir $MOUNTPOINT rmdir $MOUNTPOINT
# unmount loopback device
if [ "$DISK" = "/dev/loop0" ]; then
losetup -d $DISK
fi
echo "...installation finished" echo "...installation finished"