How can I adjust things to use 32G uSD card?

Discuss Ubuntu related items.

How can I adjust things to use 32G uSD card?

Postby edsut » Wed Apr 15, 2015 5:24 pm

I installed the image from wandboard downloads...
http://www.wandboard.org/images/downloa ... 312.img.xz
onto a 32G uSD card. I see that the partition table and root file system is set up to max out at 4G.

I thought I could just adjust the two partitions to go from this:
Code: Select all
 Device Boot      Start         End      Blocks   Id  System
   /dev/sdd1           16384     7186431     3585024   83  Linux
   /dev/sdd2        61900000    62333951      216976   83  Linux

to this:
Code: Select all
      Device Boot      Start         End      Blocks   Id  System
   /dev/sdd1           16384    61899999    30941808   83  Linux
   /dev/sdd2        61900000    62333951      216976   83  Linux


But still, at runtime I get "out-of-space" errors because /dev/root is only 3.4G.
Here is output of "df -h" and "cat /proc/partitions"...
Code: Select all
wandboard:df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       3.4G  3.4G     0 100% /
devtmpfs        450M  4.0K  450M   1% /dev
none             90M  608K   90M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            450M  100K  449M   1% /run/shm

wandboard:cat /proc/partitions
major minor  #blocks  name

 254        0      81920 zram0
 179        0   31166976 mmcblk0
 179        1   30941808 mmcblk0p1
 179        2     216976 mmcblk0p2


How do I adjust the /dev/root filesystem to expand to the size of the first partition?
edsut
 
Posts: 31
Joined: Thu Sep 11, 2014 5:12 pm

Re: How can I adjust things to use 32G uSD card?

Postby edsut » Thu Apr 16, 2015 12:18 pm

Answering this myself, but would like to know if there is a better way...
Four steps:
1. mount the uSD card on my linux host, transfer the entire file system using "cp -r" to disk space on my linux box; unmount the card;
2. use fdisk to adjust the partition table;
3. use mkfs.ext4 to recreate the file system on the first partition;
4. do the reverse of step #1 to get the files back onto the newly partitioned uSD card.

Seems to me there should be an easier way to do this; nevertheless, this works.
edsut
 
Posts: 31
Joined: Thu Sep 11, 2014 5:12 pm


Return to Software - Ubuntu

Who is online

Users browsing this forum: No registered users and 6 guests

cron