-
-
Save hansstimer/4950249 to your computer and use it in GitHub Desktop.
Revisions
-
mattes created this gist
Oct 22, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/bin/bash # Quelle: http://omappedia.org/wiki/Minimal-FS_SD_Configuration, 06.06.2012 if [ ! "$1" = "/dev/sda" ] ; then unset LANG DRIVE=$1 if [ -b "$DRIVE" ] ; then dd if=/dev/zero of=$DRIVE bs=1024 count=1024 SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'` echo DISK SIZE - $SIZE bytes CYLINDERS=`echo $SIZE/255/63/512 | bc` echo CYLINDERS - $CYLINDERS { echo ,9,0x0C,* echo ,,,- } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE mkfs.vfat -F 32 -n "boot" ${DRIVE}1 mke2fs -j -L "rootfs" ${DRIVE}2 fi fi