Game Development Reference
In-Depth Information
Ext4 is the preferred storage filesystem in Linux. Media mounted using this
filesystem in Linux is really fast and reliable. There are ways to use it on Mac OS X
and Windows, but that is not the goal of this chapter. You should commit to using
the media as a long term storage that will stay connected to the Pi as long as you
would like it to work, hidden behind the coach or in the wardrobe—out of sight.
A word of warning: this step will destroy all data and create an
Ext4 partition.
This command will quickly remove everything from your hard drive, including
partitions and boot sectors. Be sure to use the correct device name that you saw in
fdisk . In this case, it is sda , but you need to double check this on your Pi as it may
be different. This can be done using the following command:
dd if=/dev/zero of=/dev/sda bs=512 count=1
Now, we will create a new partition using fdisk . I want to use the entire drive and
use defaults that fdisk provides. You can use the m command in fdisk at any time
for more help as shown in the following command line snippet:
fdisk /dev/sda
n "new partition"
<enter> "Uses p as the default"
<enter> "Uses 1 as the default"
<enter> "Uses default first sector"
<enter> "Uses last sector available on drive"
w "write partition data and exit"
The last line is used to write the Ext4 filesystem on the newly created partition
found at sda1 . The -L flag in the following command line provides the name
of the partition. You can use any short name that you like.
sudo mkfs.ext4 /dev/sda1 -L nas001
Mounting the drives
Linux has a directory called /mnt where you create mount points for various hard
drives or other network connections. There is also a directory called /media where
you can mount drives. This is a convention used throughout Linux so that people
have an idea of how to organize all these files. These are just normal directories;
and if you wish, you can create your own directory called /nas , and mount all
your drives associated with Network Attached Storage (NAS) there.
 
Search WWH ::




Custom Search