At this point you can connect the piDrive to the Raspberry Pi, insert the SD card and power up. On my setup everything worked and the Raspi was booting just fine. Because my server backup image was 64GB, the piDrive still uses only half of its capacity. Finally, I wanted to utilize all the available space on the piDrive, the method using raspi-config doesn’t work with the piDrive because it´s connected by USB.
When connected to you Raspberry Pi type the following command to start fdisk:
sudo fdisk /dev/sda
Then press p and enter to see the partitions. There should only be 2. What we’re going to do now is delete the Linux partition, but before we do this, we make a note of the start position for the linux partition sda2. Press d and then when prompted type 2 and then hit enter. This will delete the partition. (Don´t worry, nothing will be deleted 😉 )
Now we’re going to create a new partition, and make it large enough for the OS to occupy the full space available on the piDrive. To do this type n to create a new partition, when prompted to give the partition type, press p for primary. Then it will as for a partition number, press 2 and hit enter.
You will be asked for a first sector, set this as the start of partition 2 as noted earlier. In my case this as 122880 but this is likely to be different for you.
After this it will ask for an end position, hit enter to use the default which is end of disk. Now type w to commit the changes. You will see a message about the Kernel, just ignore this. Type the following to reboot:
Once your Raspberry Pi has rebooted, we need to resize the partition. To do this type the following command:
sudo resize2fs /dev/sda2
Be patient, this will take some time. Once it’s done reboot again. Then type:
This will show the partitions and the space, you’ll see the full piDrive has all the space available now. That’s it, result!
Operational. That´s where you end up when connecting to raspberrypi.nerdcamp.net 😎
Step by step guide to install Raspian OS to an USB drive