3

I have a dual boot PC with Windows XP & Ubuntu which I recently installed. I can't see any of my Ubuntu files in XP. Where is Ubuntu installed on my computer?

While installing Ubuntu, I used the default option and allocated 9 GB for it. In XP, one of the drives which was 15 GB in size now shows 8.34 GB as full capacity & 8.28 GB as free space. Has Ubuntu been installed there? If so, how can I increase the size of my Ubuntu partition from 9 GB to 15 GB (Ubuntu has already been installed)?

Screenshot of GParted:

Alaa Ali
  • 31,535
Rajeev
  • 41
  • 3
  • 10
  • I think what you did was you first freed up unallocated space of 9GB, then you created a partition out of it, then you chose "Install Ubuntu alongside Windows XP" when installing Ubuntu. However, that option will not install to that space you freed up, because you created a partition (you should leave it as unallocated). But instead, Ubuntu installed on some other free space that was unallocated on your hard disk before. Another thing to point out is that you will not see the Ubuntu partition in Windows. If you post a screenshot of the program GParted in Ubuntu, we'll help further. – Alaa Ali Jul 14 '13 at 13:29
  • Also, I don't think your Ubuntu partition is 9GB. If you want to know the size of your Ubuntu partition, click on the "gears" icon on the top right of your screen, then About This Computer, and look at what Disk reads at the bottom. – Alaa Ali Jul 14 '13 at 13:32
  • Thanks for answering my question. I have the screenshot ready but there is no upload button on this page. How do i send it to you? – Rajeev Jul 15 '13 at 09:41
  • You can [edit] your question and click on the img button next to the Bold and Italic buttons. Alternatively, you can upload it to http://imgur.com/ (or any other website) and give us the link. Also, what did Disk say when you went to About This Computer? – Alaa Ali Jul 15 '13 at 09:44
  • http://i.imgur.com/aqTwrD1.png As you will see in the Screenshot, sda12 + sda16 + sda17 = 15 GB, which is the drive L: in XP where i wanted to install Ubuntu. How do i increase my Ubuntu installation from the present 5.16 GB to 15 GB. There is no About This Computer option anywhere. – Rajeev Jul 15 '13 at 11:10
  • i.imgur.com/aqTwrD1.png As you will see in the Screenshot, sda12 + sda16 + sda17 = 15 GB, which is the drive Linux: in XP where i wanted to install Ubuntu. How do i increase my Ubuntu installation from the present 5.16 GB to 15 GB. There is no About This Computer option anywhere. – Rajeev Jul 15 '13 at 11:54
  • 2
    Good grief. Are you using partitions as directories? This cannot be very efficient to store files. Why do you need so many partitions/filesystems? – gertvdijk Jul 15 '13 at 22:51
  • On the contrary, it is very efficient. Small drives are very easy to use, manage, check, clean, defragment & find files. I created all the drives in XP including the Linux: drive (sda 12) & chose the format option while installing Ubuntu. – Rajeev Jul 16 '13 at 11:50

3 Answers3

3

Where is Ubuntu installed on my computer?

It's on a separate partition, with an Ext4 filesystem. You can't see that in Windows as it does not support that kind of filesystem by default. Open a partition editor and you'll see there's a second partition there next to a NTFS one.

how can i increase the size of my Ubuntu partition from 9 GB to 15 GB

You could use a Ubuntu Live CD and start a partition editor to resize the partitions. (GParted for example)

See also:

gertvdijk
  • 67,947
1

Since Ubuntu uses the Ext4 file system by default, which windows can't read. You cannot see the files of your Ubuntu partition on windows.

Windows uses the NTFS file system by default, which can be read by Ubuntu.

So if you want to transfer files between the two partitions I would suggest you boot your machine in Ubuntu and work from there.

Re-sizing partitions should also be done from ubuntu (for example using th partitioning tool GParted which handles ext4 as well as NTFS).

Joren
  • 5,053
  • 8
  • 38
  • 54
1

First of all, ensure that you have a backup of all the data on your hard disk. Playing around with partitions can be dangerous. Just follow the exact steps I mention, and you should be fine

Second, I noticed that you have used 3GB from sda12, which is the partition named "Linux". We will be deleting this partition, and everything in it will be gone. If you need the data on it, please take a copy of it before proceeding. This partition is not your Ubuntu partition, it's just the partition that you see in Windows called Linux.

Third, in Linux, there's a partition that you can create called swap. This partition is optional, but is almost always needed. The purpose of this partition (without getting into detail) is to make Ubuntu work faster, so the following steps will include this partition. We'll be making it 4GB. So in the end, your Ubuntu partition will be 11GB out of that 15GB. You can skip it (which is step 2 in the steps below), although I advise you don't.

Fourth, in the end, when we start the process, it might take a long time to finish. Resizing and moving partitions usually takes time. In your case however, your partitions aren't that large, but still, it might take 1-2 hours or something. If this is a laptop, ensure that it is plugged into a power source.

Fifth, and finally, read the whole answer before doing anything.

Okay, you first need to boot into live Ubuntu. Boot from a bootable USB/CD just like if you were going to install Ubuntu, but choose "Try Ubuntu" not "Install Ubuntu". Open GParted, and follow the steps below:

  1. Right click on /dev/sda12 > Delete
  2. Right click on the now unallocated space > New
    1. In New size (MiB), type 4096
    2. Make sure Free space preceding (MiB) is 0 (it's okay if it's 1, or some small number, and you can't change it)
    3. Change File System to be linux-swap
    4. Click Add (or OK, or whatever the button is)
    5. Now, you should see a swap partition and unallocated under it
  3. Right click on /dev/sda16 > Resize/Move
  4. See the bar on top in this resize window? We need to "expand" it to the left, so drag the left end of it (the little left black arrow) to the left until the end, and click OK (or Resize, or whatever). You should now not see any unallocated space.
  5. Right click on /dev/sda17 > Delete
  6. Right click on /dev/sda16 > Resize/Move
  7. We'll do the same thing in step 4, but expand it to the right. So drag the right arrow to the end, and click OK.
  8. Everything that we've done actually hasn't happened yet. GParted is just recording these "actions", and now we need to apply them. But before we apply them, take a look at your partitions now. You should find that you now have a linux-swap partition (4GB) and under it your Ubuntu sda16 partition (around 11GB). If this is not the setup that you see, then please close GParted and restart from the beginning. (If there is unallocated space of 1MB or something like that, you can just ignore it.)
  9. Once you have checked, double-checked, triple-checked, hit the green "check mark" in GParted to apply all operations.

Alternatively

Do you need your current installation of Ubuntu, or can you delete it and reinstall it? This will make things much easier. If you can delete it, just do this:

In GParted, right click and delete sda12, sda16 and sda17, this will leave a big 15GB unallocated space. Apply the changes in GParted. Now, start the Ubuntu installation. When presented with options, choose "Install Ubuntu alongside Windows XP". This will install Ubuntu into that 15GB space automatically (it will take care of creating the swap partition and all that).


Okay, after the comments, do this:

  1. Delete the unknown partition
  2. Right click and resize your Ubuntu partition sda14. Give it a new size of 16GB (16384 MiB), and make sure that the free space is on the right (don't worry, you shouldn't see the error message about booting problems. If you see it, just ignore it, this time it doesn't really matter because we didn't "move" the Ubuntu partition).
  3. Now, you should see around 4GB of unallocated space. Right click it > New, and choose file system as linux-swap, and hit OK.
  4. That's it. Take a look at the partition table. It should be like the screenshot you added in the comments, but sda14 as 16GB and linux-swap after it as 4GB. Apply. Reboot.
Alaa Ali
  • 31,535
  • Many many THANKS. I will do exactly what you have said and let you know. – Rajeev Jul 16 '13 at 12:20
  • I did exactly what you said & the operations went off without a hitch, but while moving the ubuntu partition to the left, it warned me that the PC would not boot. But i hit the OK button & it completed the process. When i rebooted, the PC failed to boot. So i deleted the partitions including the ubuntu one & freed up 20GB (unallocated) space. Then i installed ubuntu again. This is the link to the picture of my HDD now: http://i.imgur.com/V4ceEod.png?1 Why is the ubuntu partition (sda14) showing 18GB as it's size. What is sda15 (unknown) & where is SWAP installed & what is it's size. – Rajeev Jul 18 '13 at 11:19
  • So before you installed Ubuntu again, there was 20 GB free space, correct? There was no ext4 partition or any "unknown" partition, correct? When installing Ubuntu, you chose the "Install alongside Windows" option? When you chose that option, it didn't ask you to choose the size of Ubuntu, nor did it give you some kind of slider to adjust the size, it didn't ask you anything, right? It just started installing directly (after entering the user info and all that), right? If all of this is true, then I have no idea what this unknown partition is. – Alaa Ali Jul 18 '13 at 12:55
  • @Rajeev also, I don't know why it didn't create a swap partition. We'll manually create it. I've edited my answer, check the last section. – Alaa Ali Jul 18 '13 at 13:05
  • All correct, after i chose the "Install alongside Windows" option, it installed the OS without asking me anything. As in the previous installation, while booting, it gives me the error message: "The disk drive for /dev/mapper/cryptswap1 is not yet ready or not present S to Skip & M to manually recover it". I just ignore it & it boots up after a few seconds. Do we really need the SWAP drive? Ubuntu is running on normal speed even on an old machine as this. If we manually try to create the SWAP, would it damage the installation? I will have to reinstall it again... – Rajeev Jul 19 '13 at 08:13
  • Also, the size of my RAM is 1.5GB. – Rajeev Jul 19 '13 at 09:08
  • You don't have to create swap, it's just preferable. You can leave it this way =). – Alaa Ali Jul 19 '13 at 13:17
  • My brother's home for 2 days & he's going to need the PC. So i will be able to create SWAP only on Monday. I will create it & let you know. Should the size be 4 GB? – Rajeev Jul 20 '13 at 12:50
  • Swap is generally equal to or double the RAM. In your case, I would create it to be 3 GB, especially because your RAM is small. Think of swap as an "extension" for RAM. Swap comes into play when you hibernate your machine, when you open lots of applications that RAM can't handle, etc... Read more about swap here. – Alaa Ali Jul 20 '13 at 13:38
  • Also, since your RAM is 1.5 GB, that "unknown partition" is actually intended to be the swap partition. And since you got an error about cryptswap, I'm guessing you chose to encrypt your Home folder when you were installing Ubuntu, correct? You can visit this, this, and this question. I don't really know much about the home and swap encryption. That's a different issue though, so you should ask another question. – Alaa Ali Jul 20 '13 at 13:46
  • And since your question was "how can I see where Ubuntu installed and how to increase the size of it", and if any of the answers here answered your question, you should accept an answer. – Alaa Ali Jul 20 '13 at 13:49
  • The HELP file says that in 12.04, Hibernation is disabled. So i won't be using it anyway. All the links you gave are all very technical for me. I am a lay user & i won't be using the TERMINAL. Do i need to activate the SWAP partition after creating it?? Is there some other way to do it other than using the TERMINAL? You have been a BIG BIG help & i would certainly vote for you & accept your answer. – Rajeev Jul 21 '13 at 08:08
  • As far as I know, you won't need to activate it, Ubuntu should detect it automatically. Here is a non-tech way to check if it's activated: when you create it and boot into your normal Ubuntu installation, open GParted (install if not installed) and right click on the swap partition. If you see a "Swapoff" option, your swap is activated (don't click on the option =D, we're just looking at it to tell us that it's actually activated). If it shows "Swapon", click it to activate swap. Here's how it looks like on my computer: http://i.imgur.com/O7CLSDx.png, indicating that it's activated. – Alaa Ali Jul 21 '13 at 08:42
  • Many many THANKS for bearing with me & answering all my questions. I will create the SWAP partition tomorrow & let you know along with the screenshot. I will also hit the check mark & vote for you tomorrow (in case this page goes away if i hit it now). – Rajeev Jul 21 '13 at 09:30
  • All the operations went off smoothly. When i right-clicked the SWAP drive, it was SWAPON, so i clicked it & it activated the SWAP. Then i restarted the machine & it showed the SWAP as SWAPON again, so i hit it & it failed to activate it giving an error message http://i.imgur.com/zv6Qj63.png?1 Then i shut down the machine & restarted. The HDD looks like this now http://i.imgur.com/gHVF53n.png Then i tried to format sda15 to linux-swap & it could not do it giving the error message http://i.imgur.com/dRvVo3K.png – Rajeev Jul 22 '13 at 09:03
  • @Rajeev you should post this as another, new question, because your original question was "how can I increase the size of my Ubuntu partition from 9 GB to 15 GB?". On this site, we try to keep it at one question per post, for many reasons, but mainly so that people (in the future) will be able to search for individual problems and find the solution. So ask another question. If you want to, in your new question, you can provide a link to this question so that people know the history of what happened before. – Alaa Ali Jul 22 '13 at 09:40
  • Many many THANKS again Alaa for answering all my questions. I have asked another question http://askubuntu.com/questions/322921/why-am-i-unable-to-create-a-swap-partition-http-askubuntu-com-questions-31993 I will also hit the check-mark and vote for you now. Thanks again... – Rajeev Jul 22 '13 at 09:51