I have the following situation:
I want to resize the ntfs partition. Specifically I want to add it 15 GB. What is the best sequence of steps to do?
The output from
sudo fdisk -l /dev/sda and
sudo fdisk -l /dev/sdb
before proceeding, be prepared to have an unbootable system. Get a
Ok, here is what should be the simplest solution. Resize
Win7 shouldn't have problems in booting from a logical partition at the end of the disk if
Make sure your backups of documents and other important files are current. You might make a mistake, or data loss could occur during dynamic partition resizing. Once that's done, boot from an Ubuntu live CD/DVD/USB, select Try Ubuntu, and run the GParted Partition Editor.
Taking space from
You won't necessarily have to reinstall Ubuntu's GRUB2 boot loader to the Master Boot Record, but you might as well, as long as you're already booted into the live environment. (Otherwise, you might have to boot back to the live CD/DVD/USB to do it, after discovering that GRUB is not working well enough to boot Ubuntu...or to boot anything.)
Open a Terminal window (Ctrl+Alt+T) and run these commands to reinstall GRUB2 to the MBR (it's this technique, but with the correct values for your system filled in):
It's theoretically possible that your Windows system will also need to be repaired, but very unlikely, because:
In the event that your Windows system did stop booting and you had to repair it, you could do it from the recovery console on a Windows install DVD/USB, including a trial DVD/USB.
But you probably don't need to resize your partitions at all.
Now that I've presented detailed instructions for resizing your partitions, I'd like to suggest an alternative.
I'm guessing you want to expand your Windows primary partition because you need to fit more into folders that are supposed to be located on that partition and not some other partition.
However, you have another NTFS partition (a logical partition, in the extended partition, to the right of Ubuntu's partitions) with plenty of free space.
So you can make NTFS junctions in your small-ish Windows partition, with their target folders in the big-ish logical NTFS partiton.
For example, a folder from inside
Or take a look at "How to create and manipulate NTFS junction points," which explains how to use the
NTFS directory junctions are a lot like symbolic links in ext4 and other Unix-style filesystems. But be careful! Directory junctions are parsed like directories, even in situations where *nix symlinks would be parsed like files. For example:
NTFS junctions don't cause problems in Ubuntu. NTFS-3G, Ubuntu's NTFS filesystem driver, is compatible with them (though they're treated like Unix-style symbolic links, which means they behave a bit differently than on Windows).
For details or advice on creating and managing junctions (or other forms of symbolic links, as were added in Windows 7) within Windows, you should ask somewhere Windows is supported, such as Super User. (And, at least in my opinion, you should use Windows to make them if you decide to use them, even if it's theoretically possible to do so in Ubuntu.) But I wanted to present what may be a good alternative to resizing your partitions.