Page 1 of 1

Enlarge partition

Posted: Sat Mar 17, 2018 7:07 pm
by robologo
As you can see 26,55 GB of my sd-card are not used. I would like to use all space of my sd-card for Ubos/Nextcloud. Which partition may I enlarge with GParted? sdb1 (fat16) or sdb2 (btrfs)? Would an enlargement be dangerous for the functionality of the system?

Re: Enlarge partition

Posted: Sun Mar 18, 2018 1:34 am
by j12t
The best thing to do would be to run

Code: Select all

ubos-install /dev/sdX
where /dev/sdX is the SD Card you are installing UBOS to, while being booted from another disk. This will automatically use all of the space on the target disk/SD Card. It requires an USB/SD Card adapter, however. and not everybody has that :-)

/dev/sdb1 simply contains the files needed to boot the system, while everything else is on /dev/sdb2 in your case. So you want to enlarge that /dev/sdb2 partition. However, keep in mind that many people (myself included) have experienced many SD Card failures, and it may not be a good idea to store anything truly valuable there.

Also FYI: there's some work ongoing to move all important UBOS data into a separate directory hierarchy. There is no release date yet, but once we are there, it would allow you to create a third partition from the leftover space and put all your data there. Alternatively, it will make it easy to use an external HD just for the data.

Re: Enlarge partition

Posted: Sun Mar 18, 2018 7:20 am
by robologo
Ok., thanks for your reply. I make backups of my stored data with Grsync on an external storage disk. So I won't lose anything if the sd-card should crash. But I stay tuned for a third partition. Good idea!

Re: Enlarge partition

Posted: Sun Mar 18, 2018 8:42 am
by robologo
Perhaps it would have been better to look at the faq before asking:
My SD card is much larger than the UBOS image. How do I use the rest of the space?
It would be best if you don’t burn the UBOS image to your large SD Card, but instead to a temporary SD card. Then you boot from the temporary card, and use ubos-install to create a clean new installation on your large SD Card. ubos-install will use all available space. Then you can discard your temporary SD card.
You can also expand the file system, but note that this is an expert-level operation; you can very easily screw your existing UBOS installation and all data on it. So be very careful. In principle, it should work like this: first determine what filesystem your UBOS root partition runs on. On most devices, UBOS runs on “btrfs” but it might be “ext4”. Then, use a command specific to that filesystem type to expand the filesystem, such as btrfs filesystem resize (for “btrfs) or resize2fs (for “ext4”). Alternatively, you can add a second device to the btrfs filesystem pool.

Btw: I got this USB/SD Card adapter which works very well: ... m=GRA12341