ubuntu disk space

Asked by cparnell

im a complete noob when it comes to ubuntu i literally just loaded it onto my computer an hour or two ago. when i started it up its coming up that i dont have enough disk space, to do things like update manager. i took 20 gigs off my vista partition and went into ubuntu partition editor but cant figure it out from there cause i cant unmount the other partitions. i need help in the simplest terms possible, because i want to stay with ubuntu. so please help me. also i have a 300 gig harddrive.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Tom
Solved:
Last query:
Last reply:
Revision history for this message
Nick Gorbunov (intsurfer) said :
#1

Hi!
You don't need to unmount other partitions, if you want to use vista and ubuntu together. You can divide 20G in 2 partitions - 8G for root / and others for your home directory. So, you'll have both vista and ubuntu and access your vista's partitions. For accessing ntfs drives from ubuntu you should install ntfs-3g package: sudo apt-get install ntfs-3g.

Revision history for this message
Arun (carun) said :
#2

Open a terminal and run

df -kh

If you seem to have very low diskspace for Ubuntu, then you should boot from your live cd and run the partition editor.

Partitions can't be altered when they are mounted. So thats why you need to boot from a live cd.

Try expanding your partition. If something goes wrong, then run

testdisk

It will restore the partitions.

Revision history for this message
Tom (tom6) said :
#3

lol, we are probably confusing you. I just want to make sure that you haven't tried installing Ubuntu inside Windows. It does usually work quite well but it's much much better to install the proper way like this ...

Boot up off the cd by just putting the cd into the cd/dvd drive and switch the machine off and on again. Take the option to "Try Ubuntu without changes to the machine" (something like that ;) ) This should get you to a working desktop that we call a "LiveCd session", this is what Arun was referring to. This guide should help if you don't get a menu with that option
https://help.ubuntu.com/community/BootFromCD
Have a quick look around and maybe try connecting to the internet using Mozilla Web-browser, perhaps try playing a movie if you have one on your Vista partition. If you have troubles with things like that then please ask us separate questions about those
https://answers.launchpad.net/ubuntu/+addquestion
Note that the LiveCd session will tend to forget even things that you save in the "Documents" folder but you can save stuff onto the hard-drive, even onto the Vista Partition if you try.

Then install Ubuntu either from the LiveCd desktop icon or from the menu that had "Try Ubuntu ...", this guide has specific help about coping with Vista about halfway down
https://help.ubuntu.com/community/WindowsDualBoot

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#4

Ubuntu really needs a lot more than the minimum 8Gb. 15Gb to 25Gb is usually plenty though as it leaves plenty of free space for installing all kinds of strange and wonderful programs but also allows a decent amount of space for files.

Ubuntu (and almost every other linux distro) can read anything you have on Vista or any other Windows. I often keep data such as office documents, movies etc, on my Windows partition so that i can happily watch from either Windows or Ubuntu. Note that the Ubuntu partition will probably be invisible to Windows because Windows can only read "ntfs" and "fat" partitions which are known to be quite flaky. Linux tends to prefer the much more robust primary "ext3" partitions which Windows really can't see and wont be able to set up for you.

Eventually it would be nice to have a separate "/home" partition, as mentioned by Nick but it's not vital and can be left until you are more comfortable with Ubuntu. Even with your "/home" folder on a separate partition i would still urge you to have 10Gb to 20Gb for the bulk of the Ubuntu OS for programs and such like. The "/home" folder is where all data and settings are kept ;)

Hope this helps!
Good luck and regards from
Tom :)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

You can read ext3 from Windows with www.fs-driver.org

I dont use windows at all so haven't tested this personally. You can read and write to ntfs partitions if you use ntfs-3g (available in repos) ntfs is proprietary filesystem from microsoft so ntfs-3g is a best effort attempt. You can write to most places on the file system, if a file has some weird permissions set on it then you will only get read access.

Revision history for this message
Tom (tom6) said :
#6

@ ActionParsnip
I dont think that helps create ext3 partitions from Windows though. Thanks for trying to help un-confuse the situation there

Regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#7

Also ntfs-3g tends to be installed by default when the installer picks-up on the presence of a Windows drive, along with a whole bunch of other stuff to help make it easy to communicate with the Windows side of things :)

Revision history for this message
cparnell (cparnell1128) said :
#8

ok the big problem i have tom, is that when im on the partition editor the unallocated space that i took off my vista partition is not next to the ubuntu partition so i dont konw how to add the 20 gigs of unallocated space i have to vista and also what specific partition should i be adding the space to because there were a couple i wasnt sure about, but my biggest problem is that my free space is not next to my vista partition thanx :)

Revision history for this message
Tom (tom6) said :
#9

Hey, if you have plenty of space then don't worry, just add it in to Ubuntu or else make it into a separate data-storage space for both OS's to use, either way is good. Sadly it is practically impossible to add the space back into Vista easily but you'd have to explore Windows forums about that :( I'm guessing that your partitions are looking something like this?

sda1 Primary ntfs (Vista), quite large with a lot of unused space?

20Gb unallocated

sda2 Primary 4Gb linux-swap

sda3 Primary 20Gb ext3 (for Ubuntu)

Note that the red linux-swap partition should be about 2xRam size at most but just a little bit over Ram size is usually best. When you use hibernate/sleep/suspend mode the contents of Ram gets copied into linux-swap so it needs to be larger than Ram. If it's about like that then it should be easy to make it into the much more perfect ...

sda1 Primary ntfs, keep it the same size and everything. Vista doesn't like changes
sda2 Primary linux-swap, say 4Gb?
sda3 Primary 40Gb(ish) ext3 for Ubuntu

This gives you plenty of room in the future to do interesting technical tweaks like setting up a separate partition for your data and settings. Not really worth doing at this point i think, especially given that you have plenty of space available. If i have got it quite wrong and sda3 can only be 10Gb or so then all is still good, it's only a worry if it has to be less than 10Gb.

Hope this helps!
Good luck and regards from
Tom :)

Revision history for this message
cparnell (cparnell1128) said :
#10

 it wont let me add my unallocated space to ext3 because there is a extended file system before it that has a key next to it and my unallocated space is above this extended file system it seems to be grouping all the linux file systems together but i cant add anything help !!! im stupid

Revision history for this message
Tom (tom6) said :
#11

Nope, it's not you that's stupid! It's the way Windows Partition Editors are setup. Using the LiveCd session you can right-click on the locked partitions to umount them. Then you can delete them and the Extended Partition they are in (there's no data you need to save elsewhere first is there? If there is then try doing that before umounting the partitions ;) ). This then leaves you with a big unallocated space you can setup as i described earlier :)

Don't worry if you want to try some other way. There are lots of ways to choose from in linux! :)
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#12

Errr, i am assuming that the Extended Partition does NOT contain Vista (the ntfs partition). The Vista partition is the only one that i think we have to keep unchanged.

If you could copy out the text info in the bottom half of GPartEd into here then we could give more precise help about this, but i'm sure you know what you are doing now :)
Good luck as always, regards from
Tom :)

Revision history for this message
cparnell (cparnell1128) said :
#13

partition file system label size used unused
dev/sda1 fat16 Dell Utility 94.1 Mib 7.85 mib 86.26mib
dev/sda2 ntfs recovery 10 gib 4.65gib 5.35gib
dev/sda3 ntfs os 263.5gib 96gib 167
unallocated unallocated 19.53gib
dev/sda4 extended 5gib
dev/sda6 ext3 2.33gib 2.32gib 8.24mib
dev/sda7 linuxswap 164.7
unallocated unallocated 7.22mib
dev/sda5 fat32 mediadirect 2.5gib 2.01gib 5.79mib

im trying to add the unallocated below the os partition to ubuntu but the extended partition is what is screwing me up it has a little key after the dev/sda4 and wont let me resize it HELP i dont know what im doing now

Revision history for this message
Tom (tom6) said :
#14

Ok, my last plan isn't going to work. A drive can only have 4 Primary partitions or 3 primary and 1 extended. In your case we are going to have to work entirely within the extended partition, which really isn't a problem but it's just not my personal preference - of course other people think it's a better way, such is the nature of the linux community. There's always (well usually) a different way that has different strengths/weaknesses lol.

The small sizes of the partitions Ubuntu has been given is the reason for most of the troubles you've been having. You could try to squeeze Xubuntu into this space but it would be tricky. Fortunately you have given plenty of space and we just need to tidy things up a bit in order to make use of that - then even the much heavier Ubuntu-main should be fine :)

As these spaces are far too small then i would guess that the 8.24Mb space used or is it 2.32Gb) on sda6 is nothing useful that you'd want to copy onto the Windows partition but if it is some data that you carefully saved there then simply copy it onto a Windows partition using the Places menu on the top taskbar

Try right-clicking on each of sda5, sda6 & sda7 to unmount each of them. For the linux-swap it's called "Swap-off" but means the same thing. When they are all unlocked then you should be able to unlock the Extended Partition too. It will take quite some time to do this because each time you unlock a partition it will have to rescan the entire drive :(

Given the partition sizes and the time it takes to do different things in GPartEd i would suggest just deleting sda6 and sda7. Then click on "Apply" :)

Once that is done it should be easy to right-click on the light-blue border or on the text part of sda4 and choose to resize it. Make sure that the mouse arrow changes from a cross into an arrow pointing left&right only otherwise it will try to move rather than resize the partition ;) The "Undo" button might be useful here until you get it sorted properly, and then "Apply" will finalise this resizing. This again will take quite some time, resizing usually does but it's also worth doing as a separate action before getting into the fiddly stuff we have next ;) Note that Windows partitions often feel the need for an 8Mb buffer zone of unallocated space around them so don't worry if you are left with a tiny odd unallocated space.

Now there should be plenty of space inside sda4 for linux. It's worth keeping the "mediadirect" partition at the end of the drive. Even moving it right to the front of this space is unlikely to make much difference in it's access speed and i would rather give that slight advantage to linux anyway, because linux can make better use of the slightly better performance. Something that does bother me is that the linux-swap was given so little space. Hopefully this is because of the know issue that developers are working on right now but if your Ram is really about 150Mb then you would be much better off with Xubuntu rather than Ubuntu main. Either way we can set up the partitions the same way. If you have 2Gb+ of ram then i would change the order of this but i'm going to assume 1Gb or less. So just create new partitions inside that extended partition starting at the front of the unallocated space there ...

sda6 linux-swap 1Gb
sda7 ext3 filling the remaining space, as much as it lets you anyway :)

Right. That's all set now ready for installing *buntu :)

When you get about halfway through the install you get to the "Partitioning Section", you'll need to choose "Manual Partitioning" rather than "Guided" or anything dumb & confusing like that. It will look a bit scary for a moment but when you click on "Next" or "Forwards" the installer will properly scan the drive (probably very familiar by now!) and should then give a new page with the Partitions all laid out exactly as you made them. You'll need to right-click and edit the ext3 partition to change it's "Mount Point" to "/". If you really want to play around then this would be the place to neatly split the ext3 into 2 so that you could have a separate "/home" partition but as it would have to be 8Gb or less then i really think it's worth avoiding all that kind of complexity at this stage. It'd be better to just let the /home fall within the / naturally on the same partition as this would give you the greatest flexibility for getting used to *buntu and linux generally at this point.

This is what i normally do to install linux. Setting up the partitions in advance rather than leaving it all to the installer, especially in confusing situations like you have on your drive. It means i can be much more certain that i wont accidentally stuff things up badly and gives me much more control over what happens ;)

Hope this helps!
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#15

Given that your partitions have been setup within Windows they are all amazingly neat & tidy. I've been quite disparaging about it but actually it looks like you are much better at all this than most people that have been installing linux for a long time. Usually Windows tries to make a really hideous mess of this sort of thing but your partitions were pretty perfect before starting all this.

Usually Windows only has 1 partition and very occasionally has a 2nd partition like your "recovery" one but it seems like your drive has been split into partitions quite intelligently. Nice one :)

Revision history for this message
cparnell (cparnell1128) said :
#16

so i did the partition thing and now when i turn my computer on I get Grub Error 17 loading please wait and i cant get on to vista either now what do i do now ?

Revision history for this message
Tom (tom6) said :
#17

Ooops, can you boot up into a LiveCd session and give us what Gparted has in the text panel now?

Revision history for this message
cparnell (cparnell1128) said :
#18

in short terms i solved my problems and now i have a new problem connecting to my wireless router dum dum dum

Revision history for this message
Best Tom (tom6) said :
#19

Lol, WoooooHoooo So you've installed *buntu all properly and got almost everything working already? Nicely done and congrats :)))))

Err, you'll have to post the wireless problem as a new question because i am completely clueless about internet and networking
https://answers.launchpad.net/ubuntu/+addquestion

Many regards and welcome to linux-land, especially the Ubuntu corner of it ;)))
Tom :)

Revision history for this message
cparnell (cparnell1128) said :
#20

Thanks Tom, that solved my question.