LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 10-16-2003, 07:42 PM   #1
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Rep: Reputation: 15
Resize existing windows ntfs partition in mandrake


Hi,

I would like to know if it's possible to resize an existing NTFS partition. My problem is that I want to download the Mandrake 9.2 CDs (via bittorrent) but I do not have 2 Gb of free "linux writable" parititions. I do have about 12 Gb free space of the NTFS partition.

Hence, I would like to free up about 3Gb on the NTFS partition and format it as FAT32 (e.g.). I did try it with DiskDrake as follows:

- Backup current partition table
- Unmount the windows partition
- Resize the windows partition
- Format the freed up partition (about 3Gb)
- Change lilo.conf

But when I rebooted Windows would not start up. When I rebooted in linux the /mnt/windows/ was empty (panic? .. nah not me ). So I went back to DiskDrake and restored the backed up partition table and changed lilo.conf back. This luckily (? ) made Windows boot again.

I am aware I could use something like paritition magic in windows, but I'd like to do it from within linux really.

I think I am quite close but I guess I am missing that one bit of configuration that makes the windows partition look empty in linux and not boot.

Anyone out there tried this and knows how to solve it?

Stoic
 
Old 10-16-2003, 07:50 PM   #2
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Yes, you can resize NTFS using Mandrakes cd - you'll really need to go into XP and defragment it first and turn off hibernation support,virtual memory ie Swap in XP - (OBviously back up fist anything in XP ) - then resize using disk drake.

Last edited by Skyline; 10-16-2003 at 07:54 PM.
 
Old 10-16-2003, 07:55 PM   #3
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
did you defrag your ntfs partition? Diskdrake cannot move filles around on an ntfs partition so it's important that there is continuous free space at the end of your ntfs partition. It helps to disable virtual memory and hibernation support before defragmenting b/c the two features reserve huge amounts to hd space somewhere on the ntfs partition that the windows defragmenter is not able to move. Maybe it'll work this way.

You could also try to start the installation process, go up to the point of selecting partitions where you can choose to resized the ntfs partition, let it do it, and then abort the installation. This should leave your linux untouched - but you should defrag your ntfs partition and make backups (it's always a bit risky and even PM can screw things up badly).
 
Old 10-16-2003, 07:56 PM   #4
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
oops, sorry, basically the same reply twice
 
Old 10-17-2003, 04:41 AM   #5
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Second try :-)

I think I did not tell you all the info you need. Here goes again :-).

Some weeks ago, I successfully installed Mandrake 9.1 next to Windows XP by resizing the NTFS partition during the Mandrake setup (great job ). So I ended up with 4 partitions:

- linux root: ext3
- linux swap: ? (probably ext3)
- linux home: ext3
- windows: NTFS

Everything worked like a charm. However, after some time my home partition, where I store all my data, became quite full. I had about 1Gb free space on there.

Yesterday, I wanted to download Mandrake 9.2 (powerpack) which is about 2 Gb. So I needed 1 Gb more space on the home partition.

My idea was to resize the NTFS partition (i.e., make it smaller) from within linux and use the extra partition to download the new Mandrake on. And so I did. I started up DiskDrake and performed the following:

- unmount /mnt/windows
- resize this partition (make smaller)
* this resulted in an extra partition - the previous partition numbers (hda5, hda8, etc) all shifted in numbers (so I got hda6, hda7, etc).
- format the extra partition as FAT32 (which had become hda5, which used to be my linux root partition number)
- change lilo.conf as follows:
>replace all hda5 with hda6 (as hda6 had become my root (I think))
- run lilo -v
- Reboot
- Select windows

Result: Windows did not start at all (stopped immediately after showing the windows XP logo for about half a second)

- Reboot
- Select linux
* Linux booted just fine, however did complain about hda5 not being ext3 or something during boot

Once in linux console I looked at /mnt/windows, but it was empty. So I decided to restore the backed up partition in DiskDrake (so I basically did a rollback of all my actions above). And everything was as it used to be ...

Now, I might have overlooked something during this process. I already mentioned that the hda numbers shifted. May be /dev/hda1 on which windows resides, changed as well?

I will try it again this night and carefully look at what happens to the windows partition.

In any case, if anyone had done this before he/she can tell me how to do it properly.

Stoic

PS: I did defragment within Windows XP prior to this.

Last edited by Stoic; 10-17-2003 at 04:48 AM.
 
Old 10-17-2003, 12:02 PM   #6
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
if the partition numbers change, you need to edit /etc/fstab as well so that the partitions get mounted at the right place.

I noticed that when I try to resize the ntfs partition from inside mandrake, it tells me that I'm going to lose all data on that partition. It doesn't say that when doing it during install. Wonder why that is. You might have better luck trying to do it from the installation CD. Just abort the install after it's done with the resizing.
 
Old 10-17-2003, 12:08 PM   #7
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by quatsch
if the partition numbers change, you need to edit /etc/fstab as well so that the partitions get mounted at the right place.
Afaik DiskDrake updates /etc/fstab itself (it asks for it). But I should check the result of that.

Quote:

I noticed that when I try to resize the ntfs partition from inside mandrake, it tells me that I'm going to lose all data on that partition. It doesn't say that when doing it during install. Wonder why that is. You might have better luck trying to do it from the installation CD. Just abort the install after it's done with the resizing.
Indeed, DiskDrake gives such a warning, but I did not lose anything on my NTFS partition after the resize. (I think as long as you make sure you did a defragment on the NTFS partition prior to the resize, you are relatively safe.). I might give it a go with the Installation CDs.

Thanks for your patience and replies :-)

Stoic
 
Old 10-17-2003, 12:11 PM   #8
domenico_ceglia
LQ Newbie
 
Registered: Oct 2003
Posts: 2

Rep: Reputation: 0
I suggest the Partition magic ,it is cool for it.

bye
 
Old 10-17-2003, 12:18 PM   #9
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by domenico_ceglia
I suggest the Partition magic ,it is cool for it.

bye
It's commercial
 
  


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
i need to non-destructively resize a windows ntfs partition hedpe Linux - General 4 09-02-2005 08:17 PM
resize existing partition w/o losing data rebelscum Slackware 8 07-21-2005 06:44 PM
Resize existing and add another partition with LVM donv2 Linux - Newbie 3 04-27-2005 05:23 AM
ntfs resize - xp partition - files in the way jonnycarlos Linux - Software 3 02-28-2004 10:41 PM
resize an ext3 partition with coexisting ntfs partition andy_g Linux - Newbie 1 02-03-2004 06:38 AM


All times are GMT -5. The time now is 04:05 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration