1

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 http://img51.imageshack.us/img51/2816/parions.png

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

d4v1dv00
  • 171
  • 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 01:38

3 Answers3

1

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 - https://help.ubuntu.com/community/Grub2

  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.

Sergey
  • 43,665
1

To fix GRUB use boot-repair

kriom
  • 31
  • would be nice if boot-repair can be included into the ubuntu live usb creation – d4v1dv00 Sep 29 '11 at 07: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
0
  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.
Sergey
  • 43,665
  • 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