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 have two partitions on my disk:

/dev/sda1  30G
/dev/sda3  270G

Somehow I've installed Ubuntu 12.04 on each of the two partitions. So now I have two Ubuntu installations which are both listed on the grub boot menu. I would like to erase one of the partitions (/dev/sda3) and use it just for data backup. I would also like to have only one entry for Ubuntu in the grub menu so that I don't have to choose it every time I reboot. How can I achieve this?

share|improve this question
    
Install Gparted and repartition the area you want to repartition? I do not 100% get what you are aiming at. –  Dr_Bunsen Jan 4 '13 at 21:12
    
Are you saying that you have a separate install on each partition? Please elaborate a bit on what your installation environment is like. –  ionyx Jan 4 '13 at 21:15
    
I have updated my question. thanks –  icn Jan 4 '13 at 21:18
add comment

1 Answer 1

up vote 2 down vote accepted

You do not have to format the partition, just delete the files on the partition you don't need. It is already formatted as ext4. Assuming it is mounted at /media/disk:

sudo rm -rf /media/disk/*

(or just run Nautilus as root using gksudo Nautilus and delete everything in a nice GUI-way).

If you insist on formatting the partition, you need to unmount it and do

mkfs -t ext4 /dev/sda3

After that you'll need to update your bootloader so it sees that there's no OS on the second partition anymore and removed the entry from the boot menu:

sudo update-grub
share|improve this answer
    
thanks I followed your approch I got this. error: file not found. grub rescue. Could you help? –  icn Jan 4 '13 at 21:55
    
Arrgh, I thought that might be the case... seems like your "270Gb" Ubuntu was installed second and GRUB was actually using the files from the 270Gb partition. If you haven't rebooted yet (the system probably won't boot right now) - try running sudo grub-install --boot-directory=/boot /dev/sda. If you already rebooted, you'll need an Ubuntu LiveCD/USB, boot from that and use Boot Repair program –  Sergey Jan 4 '13 at 22:09
    
@icn: See this for details: help.ubuntu.com/community/Boot-Repair –  Sergey Jan 4 '13 at 22:12
add comment

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.