Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-10-2004, 12:24 PM   #1
LQ Newbie
Registered: Nov 2004
Location: Greece
Posts: 7

Rep: Reputation: 0
Installation (resizing partitions)

Hi, I'm new in this forum and in Linux generally. I have installed Suse 9.1 on an old PC and now I want to install it on a normal one. I have Windows XP Home on a 37,25G partition and I want to resize it to 30G so that I can create a swap partition and a 7G (or something less) ReiserFS partition. I used ntfsresize in the old PC, but I damaged all partitions (cause I didnít know how to use ntfsresize; I hadnít found the guide below), so now I am asking you if everything I am going to do is right before I proceed (I want to do it manually and not with Partition Magic cause I donít have it).

# ./ntfsresize --size 30000M /dev/hda1
ntfsresize v1.7.1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 20390432768 bytes (20391 MB)
Current device size: 20390436864 bytes (20391 MB)
New volume size : 10999996416 bytes (11000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use : 7851 MB (38.5%)
WARNING: Every sanity check passed and only the DANGEROUS operations left.
Please make sure all your important data had been backed up in case of an
unexpected failure!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
NTFS had been successfully resized on device '/dev/hda1'.
You can go on to resize the device e.g. with 'fdisk'.
IMPORTANT: When recreating the partition, make sure you
1) create it with the same starting disk cylinder
2) create it with the same partition type (usually 7, HPFS/NTFS)
3) do not make it smaller than the new NTFS filesystem size
4) set the bootable flag for the partition if it existed before
Otherwise you may lose your data or can't boot your computer from the disk!

# fdisk /dev/hda

Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 2480 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2479 19912536 7 HPFS/NTFS

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
e extended
p primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-2480, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2480, default 2480): +30100M

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS)

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 2480 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1403 11269566 7 HPFS/NTFS

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Is it correct?
What should I be careful at?
What about bugs in ntfsresize?

Anyway, this mini-guide can be used by others like me who donít know how do resize a partition using Linux.

Thanks in advance.
Old 11-10-2004, 12:55 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,667

Rep: Reputation: 217Reputation: 217Reputation: 217
It looks OK. What is risky is ntfsresize. So I'd recommend to copy your most important files somewhere... ntfsresize works for most people. That's all I can say.
The second part, with fdisk, can be repeated or fixed when something goes wrong (and at this strage it shouldn't).

Note that 'normal' reisize of partition does not look that way. Linux partitions can be resized more easily (using parted or its frontends). The only problem is with NTFS.
Old 11-11-2004, 08:17 AM   #3
Registered: Jan 2003
Distribution: Fedora, Gentoo, SUSE, Mandriva
Posts: 127

Rep: Reputation: 15
Ntfsresize is very mature and safe but resizing an NTFS partititon requires resizing BOTH the filesystem and the partition.

Unfortunately the partitioning resizing part, depending on the partitioning tool, can be error-prone, moreover many softwares have or had minor or major bugs that resulted unbootable Windows or lost partitions independently of the filesystems in use (FAT32, NTFS, ext3, reiserfs, etc).

The partitioning problems are always recoverable if you saved your original partition table. Hence it's important that if you don't trust yourself then save your partition table. But do so otherwise as well ;-)

Here are some more info about the NTFS resizer reliability

Potential troubleshooting help if you or your partitioning software damaged something:

SUSE 9.1 partitioner problem:

Mandrake 10.0 partitioner problem:

Fedora partitioner problem:

Solution if Linux 2.6 kernel and Parted damaged you partition table:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing Partitions dokunut Linux - Newbie 2 06-18-2005 08:56 PM
Resizing Partitions ece30675 Linux - General 3 12-12-2004 07:47 PM
resizing partitions jayakrishnan Linux - General 5 05-06-2002 01:32 AM
Resizing partitions..can it be done? dj_relentless Linux - General 5 01-27-2002 05:16 PM
resizing partitions suselinux Linux - General 7 09-07-2001 07:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration