So, of course the "OS" partition eventually filled up with user data. A few months ago I moved the main user's Documents and Settings folder to the data drive, and used a junction point in the original location to point to it. That only staved off the disk filling up for a while -- this week I finally got around to deploying Office 2007, and the system didn't have enough space to install it.
I wanted to delete the "data" partition and consolidate everything into one partition. The old version of Partition Magic we had wouldn't boot the system for some reason, so I needed to find another tool to do it.
The answer: a Ubuntu 9.04 Desktop CD. The process is pretty simple. In summary, backup the data, delete all the NTFS partitions, recreate a single NTFS partition in the same cylinder space, then use ntfsresize to fix the NTFS partition.
- Boot the system from the Ubuntu CD. At the boot menu, select "Try Ubuntu".
- Open a terminal (Applications, Accessories, Terminal) and sudo to root with
sudo -s
- Figure out which disk is the one you want. Likely candidates are /dev/hda (IDE) or /dev/sda (SATA). If you're not sure, use
dmesg | less
to find the disk device. - Start fdisk on the device (e.g. fdisk /dev/sda), and print the existing partition table. Note the cylinder numbers for where the current NTFS partitions start and end (especially the start of the first NTFS partition, and the end of the last NTFS partition).
- Delete all of the existing NTFS partitions. Then create a single new partition, starting at the same cylinder as the first partition, but ending at the cylinder number for the last NTFS partition.
- Mark the NTFS partition as bootable! Exit fdisk.
- Resize the partition to its maximum size using ntfsresize. Read the ntfsresize man page to learn how. You may also refer to this page on shrinking an NTFS volume (starting at step 8). For example, if the device size is 32079 MB, you may try
ntfsresize -n -s 32079M /dev/sda
If you don't get any errors, proceed by removing the -n option. If you get an error that the partition size cannot exceed the device size, reduce the size by 1MB (e.g. 32078M). - Reboot the system with reboot. Windows will run chkdsk, reboot, and then everything should work as before.
- Restore the data from the lost partition (D:).
No comments:
Post a Comment