Power & Source of Big Ideas

Extend SD card problem

Moderators: chensy, FATechsupport

After doing (in my case):

sudo umount /dev/sdb
(result) umount: /dev/sdb: not mounted
sudo parted /dev/sdb unit % resizepart 2 100 unit MB print

Warning: Partition /dev/sdb2 is being used. Are you sure you want to continue?
parted: invalid token: 100
Yes/No?

Does one ignore both warnings?
Hi we are sorry we made a mistake in our WiKi. I corrected it.
The commands should be :

For Debian
Please run the following commands on a PC host's terminal:
sudo umount /dev/sdx?
sudo parted /dev/sdx unit % resizepart 2 100 unit MB print
sudo resize2fs -f /dev/sdx2


Note: there is a "?" after "sudo umount /dev/sdx"
Good start. Now the error after:

sudo resize2fs - /dev/sdb2

is:

Filesystem at /dev/sdb2 is mounted on /media/davef/rootfs; on-line resizing required
old_desc_blocks = 1, new_desc_blocks =1
resize2fs: Invalid argument While checking for on-line resizing support

What type filesystem is on sdb2?
Doing:

resize2fs /dev/sdb2 says it has done an on-line resize but then throws the error:

davef@davef-AOD255E:~$ sudo resize2fs /dev/sdb2
resize2fs 1.42.9 (4-Feb-2014)
Filesystem at /dev/sdb2 is mounted on /media/davef/rootfs; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/sdb2 to 1934080 (4k) blocks.
resize2fs: Invalid argument While trying to add group #25

It is an 8GB microSDcard. I assume those scripts will work on 8GB and larger microSD cards.
Looks like it might be more difficult then I expected:

https://www.raspberrypi.org/forums/viewtopic.php?t=28235&p=264026

Also, it is not one of your recommended microSD cards, the recommended ones are on their way.
Dear All.
There is a good package for partition management with GUI too !. In the other hand Nano Pi 2 has 2 slots for SD cards so you can put the SD card for partitioning in the second slot and unmount it simply with no error.

Try installing gparted : $ sudo apt-get install gparted
after installation you can run it by command gparted in terminal window and do your favor!
davef wrote:
After doing (in my case):

sudo umount /dev/sdb
(result) umount: /dev/sdb: not mounted
sudo parted /dev/sdb unit % resizepart 2 100 unit MB print

Warning: Partition /dev/sdb2 is being used. Are you sure you want to continue?
parted: invalid token: 100
Yes/No?

Does one ignore both warnings?


Hi ,

When Debian/Ubuntu is loaded the TF card's section will be automatically extended.
When Android is loaded you need to run the following commands on your host PC to extend your TF card's section:
sudo umount /dev/sdx?
sudo parted /dev/sdx unit % resizepart 4 100 resizepart 7 100 unit MB print
sudo resize2fs -f /dev/sdx7
(Note: you need to replace "/dev/sdx" with the device name in your system)



thank you!

Who is online

In total there are 38 users online :: 0 registered, 0 hidden and 38 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 38 guests