LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Resize existing windows ntfs partition in mandrake (https://www.linuxquestions.org/questions/mandriva-30/resize-existing-windows-ntfs-partition-in-mandrake-104899/)

Stoic 10-16-2003 06:42 PM

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 :p). So I went back to DiskDrake and restored the backed up partition table and changed lilo.conf back. This luckily (? :p) 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

Skyline 10-16-2003 06:50 PM

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.

quatsch 10-16-2003 06:55 PM

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).

quatsch 10-16-2003 06:56 PM

oops, sorry, basically the same reply twice :)

Stoic 10-17-2003 03:41 AM

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.

quatsch 10-17-2003 11:02 AM

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.

Stoic 10-17-2003 11:08 AM

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

domenico_ceglia 10-17-2003 11:11 AM

I suggest the Partition magic ,it is cool for it.

bye

Stoic 10-17-2003 11:18 AM

Quote:

Originally posted by domenico_ceglia
I suggest the Partition magic ,it is cool for it.

bye

It's commercial :p


All times are GMT -5. The time now is 07:39 PM.