Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I am dual booting Windows 7 and Ubuntu Natty and now I had decided to ditch Windows 7 for good. When I launch Disk Utility, below are my current partition layout:

current partition

My question is: how should i move the Ubuntu partition ahead and make it primary OS after deleting Windows 7 partition and the rest of Dell junk without lost of data**?

** backup will always be done prior

share|improve this question
Another thought came into my mind this morning is to use AptonCD to backup all deb packages installed on an external drive, copy all /home contents to external drive. Then, format and reinstall ubuntu using /, /home and /swap all using primary partition and make /swap at the beginning of the drive. Follow by restore /home contents and AptonCD content. What your think of this? – d4v1dv00 Sep 21 '11 at 1:38

Actually, an alternative solution which may be safer and possibly faster but involves more tweaking:

  1. Boot from Ubuntu Live CD
  2. Use any tool to remove Windows partition and "the rest of Dell junk"\
  3. Create a primary partition with Linux system ID and format it as ext4
  4. Mount both your old and new partitions and physically copy data from new to old. It may take some time but an alternative solution (resizing and moving the partition) involves moving at least the same amount of data
  5. Install GRUB on the new partition, modify /etc/fstab to mount the new partition as root etc. See "Chroot" section here -

  6. Boot into your new system

  7. (much later) After you're completely happy with the new install, wipe the old partition and optionally resize the new one so it occupies the whole disk. Or just mount it somewhere.

This way you'll always have a copy of your system in case anything goes wrong.

share|improve this answer
i kinda like this method as well but i have some challenges: * Step 4 - copying 47GB of data might take longer time * Step 5 - not quite sure how to do that – d4v1dv00 Sep 20 '11 at 10:23
I updated the answer – Sergey Sep 20 '11 at 10:57

To fix GRUB use boot-repair

share|improve this answer
would be nice if boot-repair can be included into the ubuntu live usb creation – d4v1dv00 Sep 29 '11 at 7:43
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Imagine the linked site goes down for maintenance or forever - your answer would become worthless. – htorque Sep 29 '11 at 10:32
  1. Boot from Ubuntu Live CD
  2. Use GParted to remove/shrink the windows partition, move the start of the extended partition and to resize the Ubuntu logical partition inside the extended partition. This will take a while.
  3. Moving the beginning of Ubuntu partition will break GRUB. See here on how to fix it.
share|improve this answer
if i move the extended partition to the beginning, i assume the logical partitions (/, /home and /swap) will be moved together. later when i resize the logical partitions, i assume the extended partition will be expanded as well. – d4v1dv00 Sep 20 '11 at 10:19
The point is - GRUB stage 1 stores the number of the physical sector where it can find the second stage, so if a partition is moved GRUB needs to be reinstalled. Simply extending a partition without moving its beginning does not change sector numbers. – Sergey Sep 20 '11 at 10:59
Can be cured. Inside a command prompt from the boot CD, all you have to do is mount / somewhere, chroot into it and perform grub-install && update-grub. – aquaherd Sep 20 '11 at 19:33

Your Answer


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.