fdisk
is an interactive partition table editor, so the only argument it needs is the hard disk device you want to work on.
If you resized the partition /dev/hda1
, then yes, sudo fdisk /dev/hda
is all you need. Or if you resized /dev/sdb2
, then you need to run sudo fdisk /dev/sdb
.
Once you get fdisk
running, you'll have to delete the partition you resized, then recreate it with the new size. Make the new partition slightly larger than the size you requested in the ntfsresize
step.
Remember, if you don't think you've done it right, you can always quit fdisk
without writing the changed partition table, and restart fresh. Don't write out the new partition table until you're sure you've gotten it right.
Here's the list of commands to use from inside fdisk
:
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes <------ use this if unsure
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit <------ don't do this until you're certain
x extra functionality (experts only)
Agree with @quack quixote to keep a working drive :) I seriously recommend you do it via GParted if you're in any way new to all this, because it helps avoid several nasty mistakes, even when it uses the same CLi applications under-the-hood. Otherwise here's a detailed memo to do ntfsresize+fdisk
– tuk0z – 2015-07-27T13:40:24.550