[SOLVED] Newbie Question about SD Card

Started by jodi, February 16, 2014, 09:06:24 AM

Previous topic - Next topic

jodi

Hi,

I am very new in working with linux. I downloaded the debian image for the A20 board and installed it. Everything works quiet good, but I have a 16GB microSD card and can only use 4 GB of it. I have found some answers that it should be possible to use the whole 16GB but I can't find how. I tried resize2fs with /dev/root, but it did not work. Is there a tutorial how to do this? On my RPI I could use the raspi-config to resize the card.

Hope somebody can help me!
Thank you!

Kind regards,
jodi

progmetalbg

There are at least 2 different ways to do that.
If you have Linux installed on your desktop PC (or in a VM) you can extend the partitions on the SD card using GParted. It has an intuitive graphical interface and you can find many tutorials in youtube.
The other method is to use fdisk on your OLinuXino.

Below you can find the log from the partition extension on my 8GB uSD card (for reference). Note that I'm not using the Olimex Debian image where partition layout may be different, e.g. separate partitions for /boot and  /.

[root@alarm-a20 ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-15564799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-15564799, default 15564799):
Using default value 15564799
Partition 1 of type Linux and of size 7.4 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@alarm-a20 ~]# shutdown -r now
[root@alarm-a20 ~]# resize2fs /dev/mmcblk0p1


1. Verify the partition name which you would like to extend with "fdisk -l" (in my example it is /dev/mmcblk0p1)
2. Delete it
3. Add a new partition which fills all unallocated space on the uSD
4. Write the new partition table to uSD card
5. Reboot
6. Extend the filesystem on the extended partition with resize2fs

jodi

Hi progmetalbg,

thank you for your help!
For me GParted worked great!

Kind Regards,
Jodi