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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-19-2007, 02:47 PM
|
#1
|
Newbie
Registered: Mar 2007
Posts: 0
Rep:
|
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.
|
|
|
03-19-2007, 03:44 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
03-30-2007, 01:23 AM
|
#3
|
Newbie
Registered: Mar 2007
Posts: 0
Original Poster
Rep:
|
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
|
|
|
03-30-2007, 02:01 AM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,437
|
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.
|
|
|
03-30-2007, 11:54 AM
|
#5
|
Senior Member
Registered: Sep 2003
Posts: 3,171
Rep: 
|
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.
|
|
|
03-30-2007, 08:43 PM
|
#6
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,437
|
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."
|
|
|
03-30-2007, 11:07 PM
|
#7
|
Member
Registered: Oct 2006
Posts: 41
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:12 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|