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.

Hello can someone give me short tutorial how to:

  1. Remove Windows 7 from my dual boot system (Ubuntu/Windows7)
  2. Let me use free space as new partition for data (so I dont need to extend ubuntu itself here)
  3. Remove windows 7 option from boot screen

Thanks

Update:

Thanx to Lekensteyn answer I succesfully deleted windows. Now I created new partition (formatted to ext4), but I can not use it. I cannot copy files there, only as root.

Also when booting, Ubuntu complains it didn't find /windows partition (of course it didn't, I removed it). I feel like I should update some tables or what, any ideas?

share|improve this question
    
A bit of information which may potentially be useful for others: when I was removing Vista, having booted into it not one single time after almost a year, I was somewhat worried by the fact that the NTFS partition had the "boot" flag set; I didn't want to stop my machine from booting. I was assured that this wasn't what the system used (the MBR is, of course, the important thing) and that this boot flag was only used by Windows itself. This proved to be the case; after removing the NTFS partition it all continued to work as before (and I was able to stretch my ext4 partition from the Live CD). –  Chris Morgan Jun 4 '11 at 10:38
    
instead of creating a new partition in place of the old windows one as @Lekensteyn suggests. You can boot into a live-cd and have gparted resize your ubuntu partition to fill the entire drive. –  crasic Jun 4 '11 at 17:39
    
@crasic: I didn't want that :) –  Xorty Jun 4 '11 at 21:48

2 Answers 2

up vote 8 down vote accepted

These instructions are only valid if you're not using a Wubi installation

  1. Start a disk manager (GParted or Gnome Partition Manager will be fine)
  2. Select the Windows partition (be sure to select the right one!, if you're selecting a partition with the ext* filesystem, you're wrong. A partition with the NTFS filesystem is more likely to be your windows partition)
  3. Remove the windows partition
  4. Windows 7 installs its bootloader to a 100MB partition, the first one. If this partition exists, remove it.
  5. Create a new partition for your data and format it with the ext4 filesystem
  6. If you're using Gnome Partition Manager, you will be offered to take the ownership of the partition. Otherwise, close the partition manager, mount the partition, open a terminal and run:

    sudo chown "$USER": /media/name-of-your-partition
    
  7. Since the windows partition is missing, GRUB's OS prober won't find it when detecting OSes. To remove the windows boot entry, open a terminal and run:

    sudo update-grub
    

    This assumes that GRUB is your bootloader which is always the case if you installed Ubuntu after windows 7.

If you've previously configured Ubuntu to auto-mount your Windows partition, you need to remove that. Edit the /etc/fstab file as root and remove the line regarding windows. Beware that you do not remove other lines as it may render your system unbootable which can be recovered with a Live CD only! Such a line may look like:

/dev/sda2 /media/windows fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0
share|improve this answer
    
Hi I successfully removed Windows 7. Now the new partition wont auto-mount and grub is not updated (still has Windows 7 as option). Any suggestions? –  Xorty Jun 4 '11 at 10:01
    
@Xorty: I've added a new step between 3 and 4. –  Lekensteyn Jun 4 '11 at 10:18
    
I can confirm that there is no more Windows 7 option. However, another problem arises. See my update. –  Xorty Jun 4 '11 at 10:35
    
I changed owner of new partition so it works now. The last remaining thing is complaining about unexisting partition. –  Xorty Jun 4 '11 at 10:53
    
@Xorty: check your /etc/fstab file, see my addition to the answer. The key is automount. –  Lekensteyn Jun 4 '11 at 10:59

Just adding to what Lekensteyn said:

Edit /etc/fstab as follows-

  1. Remove the line about your old Windows partition.
  2. Copy the line about your / partition to a new line.
  3. Edit this new line to have the UUID of your new ext4 partition (type 'sudo blkid' in the terminal to find out the UUID of the new ext4 partition). Also, edit the mount point to something like /media/DATA.

Again, the steps are:

  1. gksudo gedit /etc/fstab
  2. Remove the line about your old Windows partition.
  3. Add a line similar to this one:

    UUID=uuid /media/DATA ext4 errors=remount-ro 0 2

Here, substitute uuid with the UUID of your ext4 partition. You can find this from 'sudo blkid' or from GParted, Gnome Partition Manager etc. 4. Save the document and restart.

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.