## Resize main partition (utilize all SD card)

It's annoying when you copy image to the SD card and the main partion uses 2Gb out of 8Gb (in my case)
Here is just a quick reminder what to do to set up arch linux on Pi while utilizing all 8Gb or whatever size SD card you have.

So you want to resize the partition to match the SD card since there is likely to be a lot of unused/unusable space by default. Log in with username root and password root (either via SSH or with a keyboard and screen connected to the Raspberry Pi, either will work). Run "fdisk /dev/mmcblk0". Type the command 'p' and press enter. You should see two lines looking similar to this:

/dev/mmcblk0p1                     1      195312           97656        c  W95 FAT32 (LBA)
/dev/mmcblk0p2            197265        15544319         7673527+  83  Linux


Those are the current partitions. What we need to do is delete the second one and recreate it larger. Make a note of the first number on the second line (in this case 197265) and then type the command 'd' (and press enter). Choose 2. Now we create a new one with 'n' and enter 'p' for primary and 2 for partition number 2. Now we get to the first sector, and here it's important that you enter the number we took note of earlier, in this case 197265. Select the largest value for last sector. Now that we've done that enter 'w' to write and then 'q' to quit. Reboot with the command 'reboot' and once you've booted and logged in again run 'resize2fs /dev/mmcblk0p2'.

### Related Articles

• #### Implementing pulse oximeter using MAX30100

Mar 8, 2017 | by Raivis Strogonovs
• #### nRF51 Makefile with Qt Creator

Jun 4, 2016 | by Raivis Strogonovs
• #### USART, FreeRTOS and C++ on nRF51

Dec 14, 2015 | by Raivis Strogonovs
• #### Starting with nRF51 BLE and Qt Creator

Dec 12, 2015 | by Raivis Strogonovs
• #### Touch gesture recognition using body capacitance

Nov 29, 2014 | by Raivis Strogonovs
• #### Introduction to data encryption

Oct 4, 2014 | by Raivis Strogonovs
• #### MEMS (Part 2) – Guide to using gyroscope L3G4200D

Jun 17, 2014 | by Raivis Strogonovs
• #### Harold Burton in LXDE on Raspberry PI Arch Linux

Never watched this video, I predicted Super Mario World at #1! And LITERALLY just as I was typing this, Super Mario World was #2? I'm actually surprised by WatchMojo this time! After that though I knew a Zelda game was #1 and I'm not surprised by that at all! Also no Kirby...

#### Harold Burton in LXDE on Raspberry PI Arch Linux

Never watched this video, I predicted Super Mario World at #1! And LITERALLY just as I was typing this, Super Mario World was #2? I'm actually surprised by WatchMojo this time! After that though I knew a Zelda game was #1 and I'm not surprised by that at all! Also no Kirby...

#### Small Cardboard Boxes in Starting with nRF51 BLE and Qt Creator

Custom Packaging Boxes carries a large variety of printed cardboard boxes, including paper, plastic and small cardboard boxes for shipping, storage, and more! Our selection of <a...

#### Caique Lima in Implementing pulse oximeter using MAX30100

Hello, Bogdan. did you have any success with that?

#### Caique Lima in Implementing pulse oximeter using MAX30100

Hello, Raivis. Thanks for the tutorial. Could you post the code .ino which results the figure 14?

#### Caique Lima in Implementing pulse oximeter using MAX30100

Hello, Raivis. Thanks for the tutorial. Could you post the code .ino which results the figure 14?

#### Caique Lima in Implementing pulse oximeter using MAX30100

Hello, Raivis. Thanks for the tutorial. Could you post the code .ino which results the figure 14?