[Solved] How to expand filesystem osmc rc2 on Rpi2

Hello!

Two things

  1. Sorry for my english.

  2. Some One can help to expand the sd, have installed on a 16 GB but only have One partition (2GB) with 24 MB free.

Thank you very much!!!

During installation, the ext4 partition will automatically be expanded to the full size of the disk.

Or did you save an image of an install on a 2GB card and restore the image to a 16GB card later ?

I install The OS on a 16Gb sd card, and this is after install process

Hi,

This appears to be a bug in the OSMC skin - there should be two entries there - one for /boot which is the small 240MB fat32 boot partition, and the other for / which is the rest of the disk (2nd partition in ext4 format) where most of the OS and your media files will be installed.

Try switching to the Confluence skin and checking in SystemInfo->Storage and you will see what I mean.

I’ve passed this on to our Skin Dev to check. Just a visual error - your full disk is available.

Omg! There is!! Thanks for tour time! Really sorry! Thank you so much!

Hey no problem. Thanks for bringing the problem with not displaying partitions properly in the OSMC skin to our attention.

Hello,
that´s my problem now. I installed osmc on 8gb sd card and clone it 1:1 to 64gb.
How can I resize the partition? "touch /storage/.please_resize_me" doesn´t work…:frowning:

Thanks a lot and best wishes form Germany :wink:

1 Like

It’s a different issue altogether. The original poster just had a visual bug where the skin was reporting the partition layout incorrectly but the partitions were correctly sized. You want to actually resize your partition.

Probably a good idea to start your own thread.

What you could do (I think) is use something like Gparted to resize the partition. You’d need to run this on the machine you are creating/restoring the image on.

Depends what linux resources you have, in that this will do it, but you need to have the filesystem not doing anything, so at the least stop the media center (it would be better to do it on a separate system, not the OSMC):

[code] Once booted:
sudo fdisk /dev/mmcblk0
Delete the second partition (d, 2),
then re-create it using the defaults (n, p, 2, enter, enter),
then write and exit (w).

Reboot the system, then:
sudo resize2fs /dev/mmcblk0p2[/code]

I’m sure a better source will comment if this is a bad idea!
You need to identify the disk name for the SD card, and you’ll need to check you have the fdisk and resize2fs available
Derek

That is an OpenELEC command

A fresh installation of OSMC will use the full size of the SD card automatically

Sam

I know, but I´m searching the similar commands for OSMC, because I cloned my old sd card (8GB) and restored it on a new sd card (64GB) with an 1:1 Image, so I can use only the 8GB of the sd card. Thats the reason why I´d like to resize the partition…

You can do this manually with fdisk. You delete the last partition, then recreate and run resize2fs to enlarge

Sam

Aaaah ok…thank you!
But which is the correct one? /dev/mmcblk0p6?

This doesn look like a 1:1 copy of a 8GB OSMC card, that would look like

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        2048   499711   497664  243M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      501760 15523839 15022080  7.2G 83 Linux

Looks like you are on a NOOBS setup. I do not recommend this procedure for NOOBS

Oh sorry for this mistake… Yes, I installed OSMC with NOOBS… I hope it isn´t a big problem… :confused:

You won’t be able to expand the partition safely on a noobs install.

If OSMC is the only operating system you installed on the card (eg you are not using noobs as a boot manager to boot multiple operating systems) then I’d recommend backing up any important data and doing a fresh install using the official OSMC installer - this will automatically give you a fully sized partition.

If you only had data within Kodi that needs backing up, check out the backup/restore function My OSMC.

Ok I see… It´s a better way to use the official osmc installer…

Thanks a lot for your support and best wishes from Germany :wink:

hey. Im looking to upgrade my sd card from 16 to 32gb. I dont have NOOBS but originally used the official installer. I got a heavily customised OSMC so using OSMC backup/restore not an option.

Should be able to expand using fdisk? Think I need some help with the process…

My table looks like this…

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 499711 497664 243M c W95 FAT32 (LBA)
/dev/mmcblk0p2 501760 31256575 30754816 14.7G 83 Linux

Trying to run sudo fdisk /dev/mmcblk0p2

get /dev/mmcblk0p2: device contains a valid ‘ext4’ signature, it’s strongly recommended to wipe the device by command wipefs(8) if this setup is unexpected to avoid possible collisions.

…try d to delete

and get

No partition is defined yet!
Could not delete partition 1995340625

Should I be stopping media center? or unmounting first?

thanks

Use GParted for simplicity.