(2) Partition and Format the USB Hardrive

We are going to use Raspbian to partition and format the USB Hardrive

If you are new to the Raspberry, you should note that the first USB Hardrive linux finds is /dev/sda. The SD Card is completely different, it installs Raspbian too /dev/mmcblk0p2 - Do Not Touch the SD Card !!!

From inside a working Desktop, we have the option of installing a suitable graphical tool to do the partitioning of the USB Hardrive. I used gparted, but use what ever you are most familiar and comfortable with. I am not going to dictate how you should slice and dice your hardrive.

If you do not know how to partition a hardrive for linux, do not attempt this install..

One thing I am going to say, is "READ THE MANUAL FIRST".

Default Partition Scheme

Here is how I partitioned my 1TB USB hardrive :

This install, avoids spending 6 hours compiling a kernel ... Instead uses it uses the SD Card /boot. When the machine boots, it will mount the root file system off the USB drive, but the /boot will be mounted from the SD Card. A more elaborate pure dual boot would be to use NOOBS to create a data partition, format that as FAT and use that as the /boot - that is beyond the scope of this guide.

Partion Mount File System Size
/dev/sda1 SWAP SWAP 4 Gb
/dev/sda2 / ext4 16 Gb
/dev/sda3 /home ext4 881 Mb OPTIONAL

I kept it simple, with the exception that I added an optional extra partition for /home. Depending on your intended use, you should adjust accordingly, please read the Handbook. Because the Raspberry Pi 2 only has 1Gb RAM, the swap file is effectively mandatory. The precise size of a swap file is guess work and or painful experience. If you have a drive bigger than 2TB you will need to find out how to use parted.

What ever you decide, write it down now.

If you decide to follow this Default Partitioning and Formatting, you can edit and use my script to automate the install all the way up to the chroot step.

Next : Choose Install Method, SSH or Raspbian Console