summaryrefslogtreecommitdiff
path: root/src/Linux:Formatting_a_Hard_Drive.ascii
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@iohq.net>2015-09-24 16:21:02 -0600
committerAaron Ball <nullspoon@iohq.net>2015-09-25 00:10:55 -0600
commit4c921d1dd9e16eb456da3e97d72aecb0881ff39d (patch)
tree7e66e633fbd643f239346aac2e299b8eb3d75bd5 /src/Linux:Formatting_a_Hard_Drive.ascii
parent161a81152e7b644444dea3000165f436d16ce3f5 (diff)
downloadoper.io-4c921d1dd9e16eb456da3e97d72aecb0881ff39d.tar.gz
oper.io-4c921d1dd9e16eb456da3e97d72aecb0881ff39d.tar.xz
Initial conversion to php
Wrote index.php Moved all asciidoc source files into new src directory Created index.ascii for keeping track of post index (and allow for drafts easily) Updated styles to allow for styles unique to the index page Fixed a few issues with various posts Added tracking code
Diffstat (limited to 'src/Linux:Formatting_a_Hard_Drive.ascii')
-rw-r--r--src/Linux:Formatting_a_Hard_Drive.ascii108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/Linux:Formatting_a_Hard_Drive.ascii b/src/Linux:Formatting_a_Hard_Drive.ascii
new file mode 100644
index 0000000..51ef09b
--- /dev/null
+++ b/src/Linux:Formatting_a_Hard_Drive.ascii
@@ -0,0 +1,108 @@
+Linux:Formatting a Hard Drive
+=============================
+:author: Aaron Ball
+:email: nullspoon@iohq.net
+
+
+== {doctitle}
+
+Good afternoon everyone or good evening/morning, depending on which time zone
+you're reading this from...
+
+*Ahem*
+
+Good afternoon from GMT -7 everyone (much better),
+
+If you've done anything with Linux-based servers you have most likely at one
+time or another had to format a hard drive, which unfortunately can be quite
+the feat in Linux if you're not too comfortable with the command line (which if
+you're a linux sys admin, you shouldn't be). In this post, I will be describing
+how to format an ENTIRE drive (doing a portion is a bit more complicated...post
+in the comments section if you want to see a post on how to do a partial
+format).
+
+[[finding-which-drive-to-format]]
+== Finding which drive to format
+
+To start off, we need to find the disk that needs to be formatted. Do this by
+typing
+
+----
+sudo fdisk -l
+----
+
+If the disk has not been formatted you should
+see
+
+----
+Disk /dev/ doesn't contain a valid partition table.
+----
+
+If the drive has already been formatted you need to either identify the drive
+by the amount of space (the blocks column...it's in kilobytes. For example:
+249023502 is roughly 250 gigabytes). Another method is to use
+
+----
+mount -l
+----
+
+The drive should show up as **/dev/ on /media/**.
+
+
+[[formatting-the-drive]]
+== Formatting the drive
+
+To start up the format process, let's type
+
+----
+fdisk /dev/sdc
+----
+
+(sdc is our example drive. The drive you want to format was found in the
+previous step).
+
+If your drive already has a partition table, you need to delete that. Do this
+by typing the letter *"d"* and pressing enter.
+
+If the drive is NOT formatted yet, all you need to do here is press the letter
+**"n"**.
+
+Fdisk will now prompt you to give it a start and end block for the partition
+(this is essentially how much of the drive to create the partition table for).
+If you want to format the entire drive, just hit enter twice to select the
+defaults (the first and the last blocks...the entire drive).
+
+Now that we've selected which parts of the drive to format, press *"w"* to
+write the changes to the disk (up to this point, no changes have been made so
+if you want to get out, now is the time).
+
+Now that we've formatted the drive and created the partition table, we can
+mount the drive. To mount the drive, there are two options.
+
+First, the drive can be removed and plugged back in. This will cause an
+auto-mount (if that's enabled on your machine). The other way is to use the
+mount command. To do this, we need a mount point. This can simply be a folder
+where your drive will show up (without getting too complicated). For this
+example, I'll put a folder at *.
+
+Now, earlier when we formatted the hard drive, we formatted the drive located
+at* (drive sdc partition 1). Now, with that out of the way, let's mount
+partition one.
+
+Type *
+
+What that does is mount partition one (/dev/sdc1) at *.
+
+Many people say practice makes perfect. With that, go practice formatting on
+all of your hard drives and usb sticks.   :)
+
+Once again...
+
+*Disclaimer: I am not responsible for any loss of data or damage to
+personal property due to attempting the contents of this article.*
+
+
+Category:Linux
+
+
+// vim: set syntax=asciidoc:

Generated by cgit