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've been playing around with ubuntu a lot lately, and I want to use it as my primary OS. When I first downloaded it, I think that grub2 became the boot master instead of the windows 7 bootloader. Every time I tried to boot windows 7, it would fail. The windows 7 disk didn't come with my desktop, so I couldn't find a way to fix it. I like ubuntu more though so I'm ok with that. I downloaded GParted to delete the windows partition and make ubuntu the primary partition, and this is where I'm stuck.


This is what is showing up on GParted:

  • /dev/sda1

    • FILE SYSTEM: fat32
    • MOUNT POINT: /boot/efi
    • LABEL: SYSTEM
    • SIZE: 100 MB
    • USED: 21.89 MB
    • UNUSED: 78.11 MB
    • FLAGS: boot
  • unallocated

    • FILE SYSTEM: unallocated
    • SIZE: 263.28 GB
  • /dev/sda5

    • FILE SYSTEM: ext4
    • MOUNT POINT: /
    • SIZE: 182.03 GB
    • USED: 16.21 GB
    • UNUSED: 165.82 GB
  • /dev/sda6

    • FILE SYSTEM: linux-swap
    • SIZE: 3.58 GB
  • unallocated

    • FILESYSTEM: unallocated
    • SIZE: 16.78 GB

I don't know what to do next. I unmounted sda1 and sda6, but can't unmount sda5, which is the partition for ubuntu that I'm using right now. When I try to unmount it, it says:


Could not unmount /dev/sda5

The partition could not be unmounted from the following mount points:

/

Most likely other partitions are also mounted on these mount points. You are advised to unmount them manually.


I've unmounted everything else though I think. I can't create a partition table because of that either. I would try more things but I don't know what to do. I don't want to mess up anything either. Any Ideas?

share|improve this question
add comment

2 Answers

You could give SystemRescueCD a try: http://www.sysresccd.org/Download

The idea is to boot a LiveCD to allow to manipulate the HDD partitions without having any partition mounted. This LiveCD comes with GParted so you should be familiar with the rest of the resizing procedure.

HTH, Simon

share|improve this answer
    
Ok great, thank you. I'll try that out. –  JChand Oct 4 '12 at 19:44
add comment

Creating a new partition table will destroy all the data on your hard drive. You might want to resize your /dev/sda5 partition to use the 263.28GB unallocated space. To achieve this you could use the PartedMagic LiveCD ( http://www.partedmagic.com). Note that resizing and moving your system partition is most likely to destroy your bootloader so you might want to use supergrubdisk2 (should be included in PartedMagic, but you're safer when having it on a separate CD) after resizing to start your system and reinstall the bootloader with the following commands:

sudo update-grub
sudo grub-install /dev/sda1

If that doesn't work, boot again with supergrubdisk and install grub to /dev/sda instead of /dev/sda1.

share|improve this answer
    
Installing grub on a partition (sda1) is not advised. It's better to have it in the MBR (sda). –  Simon Deziel Oct 5 '12 at 16:02
    
@Simon Deziel Yes, but sda1 is the current boot partition –  FSMaxB Oct 5 '12 at 16:07
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.