Page 1 of 1

Increase size of partition to use unallocated space!(solved)

PostPosted: 29 Dec 2015, 13:08
by gonace
Hi
I just switched from Volumio to RuneAudio but ran into a problem, not all the same on the SD Card is used, I'm using a 16Gb SD Card but only 1.9Gb is used!

Is there a way to resize the partition to use the unallocated space?

Code: Select all
[root@runeaudio ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       1.7G  1.4G  252M  85% /
devtmpfs        367M     0  367M   0% /dev
tmpfs           371M     0  371M   0% /dev/shm
tmpfs           371M  324K  371M   1% /run
tmpfs           371M     0  371M   0% /sys/fs/cgroup
tmpfs           371M  4.0K  371M   1% /tmp
logs            5.0M   64K  5.0M   2% /var/log
rune-logs       5.0M  1.1M  4.0M  22% /var/log/runeaudio
/dev/mmcblk0p1  100M   12M   88M  12% /boot


Code: Select all
[root@runeaudio ~]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0 14.9G  0 disk
|-mmcblk0p1 179:1    0  100M  0 part /boot
`-mmcblk0p2 179:2    0  1.9G  0 part /

Re: Increase size of partition to use unallocated space!

PostPosted: 29 Dec 2015, 14:05
by hondagx35
Hi gonace,

you have to resize your image to fit the sd card.

The procedure depends on the device you are working on.
If you have a RP2 it is like this:
- get access to the console
- enter these commands
Code: Select all
fdisk /dev/mmcblk0

* Print out the actual partition table
Code: Select all
p

* Delete the second partition /dev/mmcblk0p2
Code: Select all
d
2

* Create a new primary partition and use default sizes prompted. This will then create a partiton that fills the disk
Code: Select all
n
p
2
enter
enter

* Save and exit fdisk:
Code: Select all
w

* Now reboot.
Code: Select all
reboot

* Once rebooted:
Code: Select all
resize2fs /dev/mmcblk0p2


Frank

Re: Increase size of partition to use unallocated space!

PostPosted: 29 Dec 2015, 15:17
by gonace
Hi
Awesome, that worked :)

Code: Select all
[root@runeaudio ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  1.4G   13G  10% /
devtmpfs        367M     0  367M   0% /dev
tmpfs           371M     0  371M   0% /dev/shm
tmpfs           371M  324K  371M   1% /run
tmpfs           371M     0  371M   0% /sys/fs/cgroup
tmpfs           371M     0  371M   0% /tmp
logs            5.0M   24K  5.0M   1% /var/log
rune-logs       5.0M  440K  4.6M   9% /var/log/runeaudio
/dev/mmcblk0p1  100M   12M   88M  12% /boot

Re: Increase size of partition to use unallocated space!(sol

PostPosted: 21 Jan 2016, 09:24
by ponnyang
HI,

I'm using Pi B version , and tried to extend the disk size to the 8G capacity of my SD card.
Unfortunately, it always failed after 'w" command in fdisk.
Which partition I should delete and rebuild?

[root@runeaudio ~]# fdisk -l

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x417ee54b

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 186367 184320 90M c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 3667967 3481600 1.7G 5 Extended
/dev/mmcblk0p5 188416 3667967 3479552 1.7G 83 Linux



Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy


I tried partition 2 and partition 5 , both failed during the "w" command.
I'm using RuneAudio_rpi_0.3-beta_20141029_2GB image file.

Thanks, Ponny

Re: Increase size of partition to use unallocated space!(sol

PostPosted: 21 Jan 2016, 12:52
by hondagx35
Hi Ponny,

please read this.

Re-reading the partition table failed.: Device or resource busy

Can be ignored at this stage.

Frank

Re: Increase size of partition to use unallocated space!(sol

PostPosted: 22 Jan 2016, 03:06
by ponnyang
Hi, Frank.

It works after following the instructions of the link.
Thanks.

Ponny

Re: Increase size of partition to use unallocated space!(sol

PostPosted: 15 Mar 2016, 18:11
by laurence_jj
Hi

I have a 64gb sd card, and want to partition it. I connected to the pi 3 via putty but when I run

Code: Select all
fdisk /dev/mmcblk0


I get:

Code: Select all
 fdisk: error while loading shared libraries: libfdisk.so.1: cannot open shared object file: No such file or directory


Any idea what I can do to fix it?

Thanks

Laurence

Re: Increase size of partition to use unallocated space!(sol

PostPosted: 15 Mar 2016, 18:30
by hondagx35
Hi Laurence,

Code: Select all
pacman -S libutil-linux

should help.

Frank