how to extend a filesystem after extending the size of a partition

Asked by Zack666 on 2011-01-09

Okay, so i installed ubuntu using wubi, on a 10GB partition and i started to really enjoy ubuntu and now i started installing applications and stuff. Anyway, i only had left 1 gb free space , and i decided to extend the partition, add an additional 10gb to it. I did it from Windows using Easus partition manager, now...the ubuntu partition has 20 gb , but when i boot in , and check the free space, it only says i have 1 gb, it won't recognize the free space. Is there any way to make the system acknoweledge the extra space, without having to re-install ubuntu, and make a 20gb installation?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu e2fsprogs Edit question
Assignee:
No assignee Edit question
Solved by:
marcus aurelius
Solved:
2011-01-10
Last query:
2011-01-10
Last reply:
2011-01-10

Why not just clean up a little, ubuntu is very small

You can start with:

sudo apt-get clean

Then you can run:

uname -a

That is your CURRENT kernel, if you then run:

dpkg -l | grep linux-image-2

You can see the INSTALLED kernels. You can remove the kernels you no longer need but do NOT remove the CURRENT kernel.

You can also remove openoffice in entirety and install abiword if you only use writer, this saves about 250Mb which is great. You can also install bleachbit and run it as root and user but have as many apps CLOSED as you can (also watch your browser settings or it will clean settings you want to keep as avoiding options which say they will take a long time)

This can all help recoup space.

Hi Zack666,

as it seems that you have resized the partition you'll need just to resize the file system. If it is ext* it can be resized safely even if it is mounted.

Run:

resize2fs -f /dev/<partition>

If you dont specify the size to reach it will default to the maximum size of the partitiont

HTH

Hi Zack666,

of course, run resize2fs as root :-)

HTH

Zack666 (zack-2ql4sql) said : #4

i tried resize2fs and i got this:
zack@ubuntu:~$ sudo resize2fs -f /dev/sda7
resize2fs 1.41.12 (17-May-2010)
resize2fs: Bad magic number in super-block while trying to open /dev/sda7
Couldn't find valid filesystem superblock.

i don't think i did it right...

Zack666 (zack-2ql4sql) said : #5

it's a ntfs partition...i think this is the problem

Tobias (ulbricht-tobias) said : #6

Wow, i didn't know you can install Linux on an NTFS. But you might just...

If thats the case (check "mount" ) you are better off reinstalling it on an ext3/ext4 partition...

bcbc (bcbc) said : #8

No - there's no method that I am aware of to increase the virtual disk used by Wubi. You can 'resize' it but it is actually a copy (so with 10GB free you could only create a new 10GB virtual disk). You could create a separate virtual disks for /home etc. that would make use of the new 10GB.

But the whole point of Wubi is so that you don't need to partition, and since you're quite familiar with partitioning, it makes sense just to create a new 20GB partition plus a swap partition and migrate your wubi install to partition.

If you make a folder ni the /host folder, it will be stored in your windows partition, this may help

Zack666 (zack-2ql4sql) said : #10

Thanks marcus aurelius, that solved my question.