Last active
August 29, 2015 14:17
-
-
Save GlassGhost/d7ae8af02a70692d0a38 to your computer and use it in GitHub Desktop.
format
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 characters
#!/bin/bash | |
ISO_8601=`date -u "+%FT%TZ"` #ISO 8601 Script Start UTC Time | |
utc=`date -u "+%Y.%m.%dT%H.%M.%SZ"` #UTC Time (filename safe) | |
owd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #Path to THIS script. | |
# Copyright 2013 Roy Pfund | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, | |
# software distributed under the License is distributed on an "AS | |
# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | |
# express or implied. See the License for the specific language | |
# governing permissions and limitations under the License. | |
#_______________________________________________________________________________ | |
#http://goo.gl/Hv1xn2 | |
blkidDev=/dev/sda | |
sudo dd bs=1G count=1 if=/dev/zero of=${blkidDev} | |
#partion disks | |
sudo sfdisk ${blkidDev} -u M <<EOF | |
,65536,07 | |
,32768,L | |
,4096,S | |
,,L | |
EOF | |
#format disks | |
sudo partprobe ${blkidDev} | |
#sleep 2; sudo dd bs=512 count=1 if=/dev/zero of=${blkidDev}1 | |
sleep 2; sudo mkfs.ntfs -f -L WINDOWS ${blkidDev}1 | |
sleep 2; sudo mkfs.ext4 -L LINUX ${blkidDev}2 | |
sleep 2; sudo mkswap -L SWAP ${blkidDev}3 | |
sleep 2; sudo mkfs.ext3 -L DATA ${blkidDev}4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment