Updates; disk space

Asked by Ed DeWan

I have a 320 gb secondary hard disk, which I formatted, and on which I then installed Ubuntu 10.10. After learning the system (mail, etc.), I downloaded and installed VMware, with the aim of creating two virtual machines, one for Windows XP, and one for Windows 7. First I created the XP virtual machine, using my CD distribution. This install failed for some reason, i.e., got hung up during the last phase, so I suspended the machine. Next I created a virtual machine for Windows 7, and this process went without any problems. However, during this installation, Ubuntu decided to upgrade my system, and I let it have its way. This process completed, and now when I boot I get a choice of 2.6.35-27 and 2.6.35-28, which looks to me like two separate Ubuntu installs. Anyway, when I re-opened the Windows 7 virtual machine, the system interrupted me with the complaint that I was out of disk space, and in fact had only 2 gb left. What I want to know is, where did all my disk space go? How much does the Ubuntu system use? Did the upgrade duplicate the original, in terms of disk space usage? Something seems terribly wrong here, and on reading some of the messages about the upgrade system, it appears that the system shouldn't be using more than a gigabyte or so, so I should have plenty left over. I need to get this question resolved before I commit to using the Ubuntu system, which I like very much in other respects. If it continues to gobble up disk space when it upgrades, then it certainly will not be a viable alternative to Windows, something which I devoutly desire!

---------------

Thanks for the prompt and useful replies. I'm new at this, so I hope this is the right way to continue the discussion. First, thanks for the instructions on how to remove the extra kernel installations. That's not a major concern right now, but I will need to know it later on.

Second, each virtual machine used the default space of 40 gigabytes. That's a total of 80 for the two virtual machines, plus whatever Ubuntu uses. By the way, when I boot into Windows, it sees a large amount of free space on the Ubuntu disk, so Ubuntu must be reporting falsely for some reason. Also, I have no problem with wiping the disk and starting over, which I will do after some questions are cleared up.

Question information

Language:
English Edit question
Status:
Solved
For:
Wubi Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
Tim Casey (tjcasey) said :
#1

How much space was allocated to the Windows 7 virtual machine you created?

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2

"This process completed, and now when I boot I get a choice of 2.6.35-27 and 2.6.35-28, which looks to me like two separate Ubuntu installs."

Those are two separate kernel versions, not OS installations. Whichever you select, you boot into the same Ubuntu system. Older kernel versions are retained in case there's a problem (for example, with a hardware driver) when you boot from the newer kernel. Unless you have a specific reason to do otherwise, you should boot from the newer kernel. Once you verify that the newer kernel works, it's fine to retain the older kernel, but if you wish to remove it (or wish to remove some older kernels but not others), you can do that by uninstalling the package that provides it. One way to do that is with System > Administration > Computer Janitor.

For information on what the kernel is, see http://en.wikipedia.org/wiki/Kernel_(computing) and http://en.wikipedia.org/wiki/Linux_kernel.

Regarding your overall question, since a second Ubuntu system was *not* installed, you probably just don't have a whole lot of disk space (or you created too-big fixed-sized virtual disks for your Windows virtual machines). The updating process can cause more disk space to be used up than was previously used. Besides removing unused packages as described above, there may be other (possibly more substantial) ways for you to free up space. But those will depend on details that you have not yet provided. To reveal information useful to figuring this out, please open a Terminal window (Applications > Accessories > Terminal, or press Ctrl+Alt+T) and run this command (by pasting it in, or by typing it in exactly, and then pressing enter):

dpkg -l | grep linux-; du -hs ~/vmware; df -h; mount; sudo fdisk -l

That command should be on one line when you copy it to the clipboard (for pasting into the Terminal). If you're reading this in your email and it's split into two lines, you can come to the page for this question in Launchpad's web interface (https://answers.launchpad.net/ubuntu/+question/149977) and copy it from there, where it should fit on one line.

When you run that command, you may be asked for your password (after part of the command has run). As you enter it, you won't see any placeholder characters (like *). That's OK--just type it in and press enter.

Then select all the text from the Terminal (Edit > Select All), copy it to the clipboard (Edit > Copy), and paste the text here (in your post). Please also provide the answer to Tim Casey's question.

Revision history for this message
delance (olivier-delance) said :
#3

"system shouldn't be using more than a gigabyte": if I remember well, around 2.7GB of disk.
One day, I had around 7 kernels installed. It's more an issue because at boot Windows choice was very low on screen.
I you need more space, use Applications->Accessories->Disk Usage and report which folder use much of space. After I will be able to tell you how to clean-up system. There exists also a software whose name looks like "janitor", but I never used it.
To remove useless kernel:
----
How to remove kernels from Grub2 menu.

--------------------------------------

In the Grub menu, you have for each kernel two lines:

- first one for normal boot

- second for recovery boot (usefull to manage issues like graphic driver)

Each time update-manager install a new kernel, it keeps the previous kernel.

Sometimes a new kernel doesn't support your hardware, and to be able to boot and fix issue, you need to use previous kernel. Unfortunately, it means that after some times you get lot of kernels in menu.

The best solution is to uninstall via packet management the previous kernels.

The solution is provided in:

   http://www.go2linux.org/clean-linux-kernel-images-grub-menu

Revision history for this message
Ed DeWan (ejdewan) said :
#4

OK, I didn't comply with Eliah's instructions above, inadvertently. I have since done the following, which may make that unnecessary. First, I deleted VMware, and then uninstalled Ubuntu from Windows, whence it was installed in the first place. Next, I re-installed Ubuntu, and during this process I noticed that you get a choice of the install size, which defaults to 17 gb. I set that to the maximum allowed, 30 gb, and proceeded with the installation. Now when I open Computer under Places, and then select File System, I see that I have 24.7 gb of free space.

Note: Somewhere in the re-installation process, I saw a message that it couldn't find the VMware directory. The uninstall process is apparently kind of sneaky, since after uninstalling Ubuntu and re-installing, it still was looking for VMware. Perhaps it's best not to dig too deeply into that one!

Now, I am puzzled about two things. First, Ubuntu apparently cannot see beyond the 30 gb boundary set by the installer. Does that mean that in order to use the entire 320 gb, I have to partition the disk, so it can see the remainder as a separate drive? Also, what happens when Windows stores files on that drive? Windows apparently thinks the entire disk is free. Secondly, what happens when I install a virtual machine using VMware, and give it the default 40 gb file space? This is larger than has been allotted to Ubuntu, and is probably the source of my problems with disk space. Should I avoid VMware altogether? I like the idea of being able to fire up Ubuntu and then start a Windows session from there.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#5

You installed Ubuntu inside Windows with the Wubi installer. This is not the standard way to install Ubuntu--Wubi is primarily to make testing out Ubuntu easier (because you don't have to modify the partition layout of your disk), and for some specialized purposes. If you know you wish to continue using Ubuntu, then I highly recommend that you (again) uninstall Wubi, and install Ubuntu alongside (rather than inside) Windows by booting from the Ubuntu install CD and selecting the option to do that. This will shrink down your Windows partition to make room for your Ubuntu partition and, unlike with Wubi, your Ubuntu system will not depend in any way on your Windows system to function.

The way your Wubi Ubuntu system works is that it uses a disk image file inside your Windows partition, which contains your Ubuntu system, and it maintains an entry in the Windows boot menu to enable you to mount and boot from that disk image, as an alternative to booting from Windows normally. (This is not the same kind of disk image as a .iso or other CD/DVD image--this kind if disk image is intended to be written to once mounted, and the changes made to its contents persist across reboots.)

Your 30 GB limitation is the limitation on the size of this Wubi disk image. There is no such limitation if you install Ubuntu in the normal way, by booting from the Ubuntu Desktop Install CD. So in a sense, to "use" the rest of the disk, you do have to partition the disk...in that partitioning the disk is part of the normal installation process. However, if you were to partition the disk differently and still use Wubi, that would not solve your problem.

However, the truth is that right now, you *can* access the rest of your hard disk from your Ubuntu system. An Ubuntu system using Wubi contains a folder called /host which represents the Windows drive--you can save and access files inside the WIndows drive in this way. Therefore, you can share documents, videos, etc. between your Wubi and Windows systems by storing and accessing them somewhere inside /host (perhaps inside /host/Users/your-username, which is the logical place for them in your Windows system; replace "Users" with "Documents and Settings" if your Windows system is XP or earlier).

If you were to install a fully-fledged Ubuntu system (not a Wubi system as you now have), you would not be able to access your Windows partition as /host, but you would still be able to access your Windows partition--you could mount it in /media. For example, the computer I'm at right now has a windows partition whose volume label is Wingardium. I am in an Ubuntu system (which is not a Wubi system), and I can select that drive in the Places menu, and it mounts automatically in /media/Wingardium. That is to say that the folder /media/Wingardium represents my Windows system in essentially the same way as /host represents your Windows system. (If your volume label is different than Wingardium, which I presume it is, then of course the mount point for your Windows drive in a fully-fledged, non-Wubi Ubuntu system will be different from /media/Wingardium. There's nothing special about the name "Wingardium"--it's just the volume label I chose for my Windows drive, in Windows.)

I think that answers all of your questions except those relating explicitly to VMware. If it is in any way unclear how that answers all of your non-VMware questions, however, then please post again, requesting specific clarification(s).

Now, onto your VMware-related questions...

"Note: Somewhere in the re-installation process, I saw a message that it couldn't find the VMware directory. The uninstall process is apparently kind of sneaky, since after uninstalling Ubuntu and re-installing, it still was looking for VMware. Perhaps it's best not to dig too deeply into that one!"

You'll have to be more specific, to get an answer to this...but if you're putting your VMware virtual machines on some *other* drive besides the Ubuntu virtual disk, then they could persist across uninstallation and reinstallation of Wubi.

"[W]hat happens when I install a virtual machine using VMware, and give it the default 40 gb file space?"

That depends on a number of factors. First, by default the GNU/Linux (or "Linux") version of VMware (which is the version that runs on Ubuntu) puts virtual machines in the vmware subfolder of your home folder (so if your username is ed, then they would be in /home/ed/vmware). That is inside the 30 GB (or less) Wubi virtual disk image. But you can change where virtual machines are stored, either generally, or for individual virtual machines. If you were to store your virtual machines inside /host (or on another drive/partition, mounted inside /media, such as an external USB hard drive), then you wouldn't have the 30 GB size limitation.

But let's suppose your virtual machines are stored in /home/ed/vmware (replace ed with your actual username). Then it still might be OK that their VMware virtual disks are "larger" than the size of your Wubi disk image--that depends on what kind of VMware virtual disks you have created. A VMware virtual disk can be fixed size, which means that the .vmdk file representing it it takes up almost exactly the same amount of space as its maximum capacity, all the time. However, it is more common for a VMware virtual disk to be of variable size, which means that the .vmdk file representing it is only about as large as the amount of data actually being stored on the VMware virtual disk, at any given time. When you create a virtual disk (including as part of the process of creating a virtual machine), that second option (for the disk to be of variable size) is the default, and it is the option that most people choose. There are sometimes reasons to opt for fixed-size disks (they often perform slightly better, they never cause problems by expanding because the files representing them never change in size, and they are more readily viewed and mounted by other tools and accessed and converted by competing virtualization products such as Oracle VirtualBox). But usually opting to use automatically expanding VMware virtual disks are the way to go.

Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#6

(Sorry, I had meant to submit that as an answer rather than a comment.)

Revision history for this message
Ed DeWan (ejdewan) said :
#7

Great! Thanks for the detailed information. I will need to chew on it a bit, but I will mark this as solved for now.

Revision history for this message
Ed DeWan (ejdewan) said :
#8

Thanks Eliah Kagan, that solved my question.