Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So basically as it stands I have a laptop which has no cd/dvd drive, and I don't have a usb drive.

The laptop has windows 7 installed with ubuntu 11.04 installed through wubi.

What I want to do is remove windows completely, and make ubuntu the only OS installed on the system.

Is there a way to do this without re-installing ubuntu? (i.e. can I take my wubi install away from windows?)

or is there a way to from inside ubuntu have it run the ubuntu iso somehow so I can just wipe the system and install it fresh? (even if it means I need to have an e.g. 2gb partition just for the image to reside in).

share|improve this question
2  
Is this just a theoretical exercise or you really can't actually buy a 1GB, 5 bucks USB stick or borrow one from a friend? – MestreLion Aug 31 '11 at 6:04
possible duplicate of Is it possible to install without a CD or USB drive? – belacqua May 15 '12 at 23:01

6 Answers

up vote 3 down vote accepted
  1. Use Windows 7 to shrink one of your partitions (you can shrink a mounted partition while running Windows). If you already have 4 primary partitions you'll need to remove one of them first.
  2. Boot wubi and install GParted and create an extended partition in the free space you created, and then 2 logical partitions, one an ext4 partition large enough to contain your Wubi install, and optionally 1 swap partition (> size of RAM).
  3. Migrate wubi to the partition, installing the grub bootloader at the same time
  4. Boot the migrated Ubuntu and format the Windows partition, which you can then reuse as a separate /home or you can use the same migration script to move the migrated Ubuntu to it.

This solution doesn't require a live CD/USB (although it's always a good idea to have one.

share|improve this answer

If your laptop supports it, you should be able to do a net install using PXE. Most laptops will allow you to "boot from the network" at startup. You might have to hit ESC or something like that during boot to get in the right menu.

This does require you to do a bit of setup on another machine in your network, which will serve the Ubuntu installation media. See https://help.ubuntu.com/community/PXEInstallServer

share|improve this answer

If you have an Ethernet connection to the machine, and it supports it, you may be able to network boot/install. That is, use the drive on another machine to install Ubuntu over your local network.

Check out the Ubuntu community doc for it over here.

Edit: Wow, jelmer, beat me to it while I was typing.

share|improve this answer

Please make a backup before testing this because I'm not 100% sure it will work flawless.

I think the way to do it is something like this (untested):

  1. Format one partition that will be your destination for the installation (I suggest you to choose the ext4 format)

  2. Copy the your files and folders from wubi to the new partition

  3. Make sure you have a folder named /boot/ with at least two files like initrd.img-2.6.38-10-generic and vmlinuz-2.6.38-10-generic

  4. Than you will have to install grub:

These instructions were adapted from: https://wiki.ubuntu.com/Grub2#Recover

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD (in your case the wubi installation) treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later) (Open Ubuntu at Wubi). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal - Applications, Accessories, Terminal. 3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run

df -Th 
Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt  
# Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition: sdYY is the /boot partition designation (for example sdb3)

sudo mount /dev/sdYY /mnt/boot 

6) Mount the critical virtual filesystems:

sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys 

7) Chroot into your normal system device:

sudo chroot /mnt 

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub 

9) Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX 

10) Verify the install (use the correct device, for example sda. Do not specify a partition):

sudo grub-install --recheck /dev/sdX 
11) Exit chroot: CTRL-D on keyboard 12) Unmount virtual filesystems:

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys 

13) If you mounted a separate /boot partition:

sudo umount /mnt/boot 

14) Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr 

15) Unmount last device:

sudo umount /mnt 

16) Reboot.

sudo reboot 
"

share|improve this answer
This is awesome but it can't be done without a spare partition already existing on the drive. So if there's a single large NTFS partition from which the machine is booted from - something need to be done first. – Sergey Aug 31 '11 at 1:45
If he doesn't have a spare partition, he could shrink the Windows partition from inside Windows, right? ;-) – desgua Aug 31 '11 at 2:00
Is it possible to shrink the "root" Windows partition while booted in Windows? I don't thinks so. – Sergey Aug 31 '11 at 2:43
I'm not 100% sure because it was some years ago but I think I've done that with Windows 7. – desgua Aug 31 '11 at 11:02

Move the hard disk to another computer and install it, then move it back.

share|improve this answer
1  
I don't think that this is going to work, since the "other" computer most probably is going to have different hardware specifications (arch, graphic card, etc...) – pl1nk Jun 27 '12 at 23:11
2  
you think, but this is not Windows, try and come to discuss – jet Aug 10 '12 at 14:48
1  
I Haven't mentioned anything about windows, if you think that this is the way to go fairly well, your opinion. – pl1nk Aug 10 '12 at 14:53

Well, theoretically, if you already have more than one partition on your disk or some unallocated space, you could boot Ubuntu using wubi, create a new partition from there, install Ubuntu on that partition, reboot, remove the Windows partition.

The point is - you can't modify partitions or install Ubuntu on a partition you booted from, so you need more than one. Wubi does not count as a separate partition - it resides on the Windows partition so you can't touch that.

But, honestly, USB drives are very-very cheap these days - make a small investment and save you some time :)

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.