Expanding NextCloudPi filesystem on flash drive?

NextCloudPi looks really great – precisely what I’ve been looking for. I’ve just used Etcher (on OS X) to burn the NextCloudPi 12.0.2 image onto a 32GB flash drive. I want to boot from the flash drive and bypass using SD cards altogether. Booting directly from the flash drive works great (whew!), and I’m really psyched about that – however, raspi-config is unable to expand the filesystem to use the entire flash drive (it complains that it can only expand SD cards).

Can anyone tell me how to expand the NextCloudPi filesystem so that it will use all the storage on my flash drive (in a pinch, I suppose I could burn the image onto a 32GB SD card, boot & use raspi-config to expand the system, then copy/burn the image of the SD card onto my flash drive, but that seems time-consuming and inelegant)?

I tried following the advice given here:

but the methods described didn’t work for me at all.

There has been some conversations about this on github

I have not tried it myself, so I cannot support it. If anybody is up to it we’ll include it in the wiki.

I did look a bit into the raspi-config code, and it is simply assuming mmcblk devices instead of /dev/sda1 kind of device name.

I guess that your best bet is to do it manually. Assuming that the partition is /dev/sda1

sudo resize2fs /dev/sda1
1 Like

THANK YOU for this nacho, and for the prompt response (sorry about my not-so-prompt reply). Running resize2fs as posted completely solved the problem, as you surmised. I had poked around GitHub trying to find a discussion of this, but that particular thread had eluded me.

I realize that this is not really an NCP issue, but now that the RPi is USB-bootable, I suspect that a lot of folks like myself (with minimal RPi and Linux experience) will be encountering it. Indeed, when I recently discovered NCP, my very first instinct was to burn the NCP image directly onto a USB flash drive and boot 'er up…hence this thread. Because of this, I would say that it’s probably worth raising the issue in the NCP installation documentation or as you suggested, on the wiki.

Oh, and another huge THANK YOU for NextCloudPi – this is a fantastic bit of work. After slogging through a manual installation last winter, I was considering putting such a thing together myself, but the work you’ve done far surpasses anything I might have cobbled together. Great stuff.

1 Like

glad to help.

There is now a mention in the wiki entry about the option of using an external USB drive.

I haven’t done it myself so I couldn’t improve that info or provide specific steps but contributions to the wiki are very welcome :wink: :wink:

edit: I created an issue ‘request for help’