LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun! NOTE: All new threads will be moderated. Political threads will not be approved.

Notices


Reply
  Search this Thread
Old 03-19-2007, 02:47 PM   #1
NewLeaf
Newbie
 
Registered: Mar 2007
Posts: 0

Rep: Reputation: 0
Question Shrink ext3 partition and convert to ntfs?


Hello,

I'm dual booting with two hard drives:
hda -120GB runnning WinXP
hdb - 80GB running Mandriva 2005 LE

I want to back up my data files onto hdb. Currently I'm using only 10% of the /home partition. So I figured I can resize the it and allocate about 40GB to Windows. I've read about GParted and DiskDrake but before I attempt to use either of them I'd like to know if what I'm attempting to do is wise. Can DiskDrake convert unallocated free space to NTFS and will Windows recognise it after rebooting.

Thanks in advance,
NewLeaf.
 
Old 03-19-2007, 03:44 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you can use resize2fs and such like to shrink file systems, but there's no logic in converting blank space to NTFS. doesn't really make sense. what you'd do is leave unpartitioned space at the end of the drive, and then in windows create a partition in that space as normal. note though that hdb is not going to be a single partition, and you may have trouble if the "free" space you wish to have is in the middle of the devices. an "fdisk -l /dev/hdb" would be useful to see what the structure actually looks like.
 
Old 03-30-2007, 01:23 AM   #3
NewLeaf
Newbie
 
Registered: Mar 2007
Posts: 0

Original Poster
Rep: Reputation: 0
Thumbs up GParted worked

Thanks for your reply. I used GParted and was able to easily reclaim the space I wanted. GParted provided a means of resizing and converting the partion to ntfs and did so without fault. The whole procedure took under ten minutes and I now have a 23G linux partition and a 57G windows partion (which windows recognises as drive G: )

These are the before and after results of fdisk /dev/hdb:
Quote:
Before
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 764 6136798+ 83 Linux -root
/dev/hdb2 765 9729 72011362+ 5 Extended
/dev/hdb5 765 904 1124518+ 82 Linux swap
/dev/hdb6 905 9729 70886781 83 Linux
After
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 764 6136798+ 83 Linux
/dev/hdb2 765 9729 72011362+ 5 Extended
/dev/hdb5 765 904 1124518+ 82 Linux swap
/dev/hdb6 905 2209 10482381 83 Linux
/dev/hdb7 2210 9729 60404368+ 7 HPFS/NTFS
-NewLeaf
 
Old 03-30-2007, 02:01 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,437

Rep: Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203
You were fortunate with the arrangement of your partitions.
Keep Chris' warning in mind for future attempts when things may not go so well. Simple example - if they had all been primary partitions, what you attempted would not work.
 
Old 03-30-2007, 11:54 AM   #5
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by syg00
You were fortunate with the arrangement of your partitions.
Keep Chris' warning in mind for future attempts when things may not go so well. Simple example - if they had all been primary partitions, what you attempted would not work.
Are you sure of that? You can have 4 primary partitions; OP had 2. If all 4 had been primary partitions, then clearly OP would be out of space in the partition table. Equally clearly, an attempt to shrink his second primary partition (hdb2) which is hosting extended partitions would have led to some really bad consequences.

But if, for instance, OP had 3 primary (and no extended) partitions, then made space between, say, the first and the second partition, I *think* that the space would have been allocated as hdb4 in the partition table, even though its location on the HD is between hdb1 and hdb2.
 
Old 03-30-2007, 08:43 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,437

Rep: Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203Reputation: 4203
Poor choice of words on my behalf. I meant:
"Simple example - if your original configuration had been all primary partitions, what you attempted would not work."
 
Old 03-30-2007, 11:07 PM   #7
creativename
Member
 
Registered: Oct 2006
Posts: 41

Rep: Reputation: 15
Always be careful when messing with multiple partitions though. I have once ruined a computer doing that (wouldn't boot), had to wipe both XP and the Slackware that was on it at the time. Turned out to be a blessing in disguise, but that's another story.
 
  


Reply


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
convert ntfs to ext3? supersucker Linux - Newbie 9 08-24-2009 06:36 PM
How to convert a EXT3 formatted HD to NTFS/FAT ohjeez Linux - Newbie 9 07-23-2006 10:56 PM
All data on HD lost after convert NTFS to EXT3 vladimir4 Linux - General 8 12-19-2005 04:07 PM
Convert from NTFS to Ext3 zillah Fedora - Installation 13 08-24-2005 11:44 PM
how to convert ext3 to ntfs? cannot even see ext3 partition parv Linux - Hardware 1 12-31-2004 02:56 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 06:12 PM.

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