3

I know that there are a ton of questions relating to that subject, but after reading a lot of them, I believe that I have another problem.

First, let me tell you my story :)

I have an ASUS laptop that originally had Windows 8 on it. I wanted to have a Ubuntu/Windows 8 dual boot and I even achieved that for a little while. Unfortunately I thought I had destroyed Ubuntu and so I reinstalled Ubuntu, hoping that it would just reinstall Ubuntu and leave the other stuff alone. How wrong I was :)

At the moment I just have Ubuntu and it works fine except for the fact that watching videos on youtube or netflix is a real pain. I searched the Internet for countless hours and even started a thread on this board about that, but nothing helped. That's why I want to have a Windows 7 partition.

I made a Ubuntu 14.10 live CD and opened gparted, but I can't resize the partition! I have three partitions:

/dev/sda1 fat32 /boot/efi 512 MB

/dev/sda2 ext2 /boot 244MB

/dev/sda3 lvm2 pv ubuntu-vg 697,9 GB

I could resize the first two partitions, but the gain is obviously not worth mentioning. The only partition that makes sense to resize is sda3, but when I try that, it tells me that the minimum and maximum size are the same, so I can't do anything there. It's funny, because when I use the Disk Usage Analyzer, it tells me that only 23 GB of the 729,1 GB are used. Is there any way to get a new partition with some 100 GB for Windows without breaking Ubuntu?

The only other way I would see, is to format that partition using gparted from the live CD, create two separate partitions (one of them NTFS), install Windows7 and then install Ubuntu again. But I hope that won't be necessary. Cheers

1

The problem is that you selected to use LVM (Logical Volume Management) when you installed Ubuntu. It provides to functionality to easily resize your Ubuntu partitions. THEORETICALLY! I tried that too on my first install and I found it not so easy.

Well, first of all it creates one large partition with all the space you gave to Ubuntu. Inside this partition it "installs"(?) the LVM which somehow emulates logical volumes (=virtual partitions inside the large one). Now those partitions can be easily resized or whatever within the LVM container using the right tools.

BUT to gParted it looks like the whole partition is full because all space is reserved for the LVM. Therefore: no free space, no resizing the partition.

However, it is somehow possible to do that, according to the answers here.
They either install the GUI tool system-config-lvm or another answer suggests to do the following:

In this example we shrink a partition from 10G to 9G:

First, we unmount. umount /dev/vg_blah/lv_blah
Check the file system. e2fsck -f /dev/vg_blah/lv_blah
Resize the file system. resize2fs -p /dev/vg_blah/lv_blah 9G
Reduce the size of the logical volume. lvreduce -L -1G /dev/vg_blah/lv_blah
Shrink the volume group if desired. vgreduce vg_blah /dev/sdxy

Please VISIT the original post! All quoted commands are from there I did neither find them out nor test them.

| improve this answer | |
  • Thank you so much for your answer. I can't say for sure if it helped. I followed the instructions and installed system-config-lvm, shrunk "root", but when I tried to resize the partition, I still couldn't do it. Everytime I tried to submit the changes for good, the process aborted when trying to shrink the partition. In the end, I got tired of it and got rid of Ubuntu first, created a ntfs partition and an ext4 partition and installed Windows 7. I'll reinstall Ubuntu onto that ext4 partition next week or so. – Curtis Mar 2 '15 at 5:47
  • @Curtis: I would say that the answer helped then as you've got rid of LVM which you don't need! ;-) – Fabby Mar 4 '15 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.