Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I can't format my hard disk for Ubuntu installation. It has Fedora installed in it. I wonder how to unlock the locked partition to delete and format it, since I am stuck at installing Ubuntu. I am now using a livecd to do the task. No options are available for me to use.

Screenshot: enter image description here

share|improve this question
    
have you considered deleting the partition from Fedora ? –  Srinivas Gowda Nov 15 '12 at 13:03
    
I am trying to delete it, but it is locked. –  owl Nov 15 '12 at 13:29
    
Force unmount the partition. Look into my answer below. –  Srinivas Gowda Nov 15 '12 at 13:34

3 Answers 3

up vote 11 down vote accepted

If it's an LVM partition, you will need to deactivate it using the command lvremove which will remove the lock.
Only then can you delete the partition using gparted.

Use lvscan to view the volume.

Use lvremove to remove it.

Check man pages man lvscan and man lvremove for details.

share|improve this answer
3  
This was the solution for me! –  Mike Turley Apr 11 '13 at 2:45
1  
This is a very useful answer. Using these commands only deactivate lvm2 partitions which then means it is possible to delete the lvm2 partitions through gparted. Fancy having a go at updating your answer to provide a fully working and brilliant answer? –  geezanansa Aug 24 '13 at 10:36
    
Didn't know about lvscan and lvremove. Worked great. Thank you! –  wulftone Aug 24 '13 at 23:04
    
This should be the answer –  jkurtisr32 Dec 17 '13 at 0:45

Open a Terminal on Ubuntu (live cd) and force unmount the partition.

sudo umount -f /dev/sda2
share|improve this answer
    
unmount doesn't exist, you want umount. –  Mike Turley Apr 11 '13 at 2:45
    
Using 13.04 liveDVD and gparted view->file system support shows lvm(2) is not supported. Using sudo umount /dev/sdaX confirms LVM partition is not mounted to beigin with. This answer is not useful. –  geezanansa Aug 24 '13 at 10:18

Open the Ubuntu Installer and click "Install Ubuntu", then continue untill you see "Erase disk and install Ubuntu". It will erase the entire disk and use all of it for installation. Ubuntu will automatically partition your disk and proceed with installation. For more information about installing Ubuntu, you can visit this page. You don't need to format the hard disk before you install Ubuntu, the installer does it automaticaly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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