scottk
Posts: 22
Joined: Mon May 26, 2014 9:21 pm

boot off USB drive - easy ways to expand file system?

Mon Oct 30, 2017 9:43 pm

So I've read through several tutorials on how to expand the file system when using an external hard drive. They seem very complicated. The Pi 3 makes it easy to boot from a USB drive, but is there an easy way to expand the file system? The most detailed (and trust-worthy?) instructions seem to be here: https://elinux.org/RPi_Resize_Flash_Partitions

But it's pretty complex. I was wondering why there Rasp-config's tool to expand file system isn't made to also work for USB drive? it only works for SD cards.

Anyone know any good tricks for doing this?

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: boot off USB drive - easy ways to expand file system?

Mon Oct 30, 2017 10:31 pm

Easiest option is to, temporarily, boot from an SDCard (with the USB drive still connected). Install gparted and use that to muck about withe the partitions on your USB hard drive.

When you're done, shutdown, pull the SDCard and boot from the USB drive.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ghans
Posts: 7863
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: boot off USB drive - easy ways to expand file system?

Tue Oct 31, 2017 7:50 am

gparted is what you want. It only works on Linux.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: boot off USB drive - easy ways to expand file system?

Tue Oct 31, 2017 8:53 am

You only need to follow this https://elinux.org/RPi_Resize_Flash_Par ... spberry_Pi with a few little changes:
- if you have only one block-device connected (which is strongly recommended during this) it is named /dev/sda instead /dev/mmcblk0
- skip this on normal raspbian: d, 3 to delete the swap partition - There is no swap partition anymore ...
- use /dev/sda2 instead /dev/mmcblk0p2 in the last step

Greetings, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

User avatar
HawaiianPi
Posts: 4275
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: boot off USB drive - easy ways to expand file system?

Tue Oct 31, 2017 1:30 pm

The easy way is to use Raspbian's SD card copier to clone your SD card to the USB device, because it does it while copying the card.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

scottk
Posts: 22
Joined: Mon May 26, 2014 9:21 pm

Re: boot off USB drive - easy ways to expand file system?

Tue Oct 31, 2017 2:05 pm

FM81 wrote:
Tue Oct 31, 2017 8:53 am
You only need to follow this https://elinux.org/RPi_Resize_Flash_Par ... spberry_Pi with a few little changes:

- skip this on normal raspbian: d, 3 to delete the swap partition - There is no swap partition anymore ...
- use /dev/sda2 instead /dev/mmcblk0p2 in the last step
Thanks. These are good tips, probably why I was having trouble before. I wish this was more straight forward.

scottk
Posts: 22
Joined: Mon May 26, 2014 9:21 pm

Re: boot off USB drive - easy ways to expand file system?

Tue Oct 31, 2017 2:07 pm

DougieLawson wrote:
Mon Oct 30, 2017 10:31 pm
Easiest option is to, temporarily, boot from an SDCard (with the USB drive still connected). Install gparted and use that to muck about withe the partitions on your USB hard drive.

When you're done, shutdown, pull the SDCard and boot from the USB drive.
Haha...yeah it's the mucking around that I have trouble with. Even following the elinux.org instructions, things are straightforward, and there are issues following those steps.

https://elinux.org/RPi_Resize_Flash_Par ... spberry_Pi

Return to “General discussion”