How do I remove Windows 7 from a dual-boot install with Ubuntu

2

So I've been running Ubuntu alongside Windows 7 for a year or so.

Is there a way to remove Windows 7 from my system without having to reinstall Ubuntu from scratch so I can use all the disk space?

Or would it be faster just to reinstall Ubuntu?

FLY

Posted 2011-11-23T08:37:04.003

Reputation: 123

Answers

3

Off topic, but anyway:

The simplest way is to

  • get rid of the windows installation (just reformat the related partition)

  • run sudo update-grub

Done. Alternatively, you could hand edit the grub config (/etc/grub.d/*) but I don't recommend it.

Edit You COULD leave everything as is, and edit the default in /etc/default/grub

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=1
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3

(assuming Ubuntu is the first in the grub menu). This will prevent the boot selection menu from showing up, without actually changing the dual boot config

sehe

Posted 2011-11-23T08:37:04.003

Reputation: 1 796

thnx for your answer. Can i format the windows partition that is on the same disk as my ubuntu install from ubuntu? and if so how? – None – 2011-11-23T08:45:02.340

1

@FLY yes; (1) be careful, don't wipe the wrong stuff (2) use gparted GUI partitioner or (2b) blkid to spot the partition, mkfs.ext4 /dev/sdXY (where sdXY is the partition found earlier).

– sehe – 2011-11-23T08:47:12.413

so the windows partition shows up as /dev/sdXY with partition and file system unallocated? – None – 2011-11-23T09:08:33.917

@FLY: you mean, after that? Yes/no: in fact it will be formatted as an empty (ext4) filesystem), that won't be mounted if that is what you mean. You can do whatever you want with the space (including, say, mounting it). See http://askubuntu.com/ or http://superuser.stackexchange.com for general partitioning guidance

– sehe – 2011-11-23T09:14:26.890

nope I mean after I open gparted GUI. I have 2 locations /dev/sda and /dev/sdb . /dev/sda contains 2 partions /media/sytem reserved and /host in /dev/sda1 /dev/sda2. /dev/sdb contains an unallocated partition. my questions is how do i find out which one is my windows partion or does it mean i have 2 hdd in this pc? – None – 2011-11-23T09:27:54.097

@FLY: it will basically just 'tell you' (usually because it it NTFS, which is the windows filesystem, but likely also because of the volume lables). Like I said, post that question on superuser (include a screenshot or the output of sudo blkid) – sehe – 2011-11-23T09:35:20.670

Aah i see now stackoverflow is only for program / code related questions. will update the question. thnx! – FLY – 2011-11-23T12:00:09.080

0

It depends how you want to use the space that your old operating system used; if you want to make it another filesystem that you mount via /etc/fstab, then you can simply reformat it with mkfs(8), add the appropriate mount(8) options to your fstab(5), and go for it.

If you want it to be part of your /home or / partition transparently -- which is nice for not having to manage your storage explicitly -- then a complete re-install is the easier approach.

My suggestion is to use it as a /movies or /home or something until it is time to buy a new drive -- but that's primarily because I'm lazy.

sarnold

Posted 2011-11-23T08:37:04.003

Reputation: 2 988