How to remove windows partition and incorporate the free space into linux?

User Name

Remember Me?

Password

MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.

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.

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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

gives an example of usage to shrink partitions. In your case, one would unmount and delete the ntfs partition and create swap, /var2, /home2 or whatever in the blank space. Format ONLY those new partitions. Then you can reboot and copy files, edit /etc/fstab, edit /etc/lilo.conf as necessary.

As always, before surgery, backup any data on any partition you wish to preserve in case of a mistake. Things like /etc and /home come to mind...

Thanks for the reply. I'm fairly clear on how to use that to delete the NT partition, but I have a few questions.. (sorry if there are obvious answers to these!)

Firstly, how big should the swap partition be? 500Mb? 1Gb?

How would it be possible for me to retain only the operating system stuff on the current partition (9Gb), and move stuff like the /home directory to the new partition - would linux recognise that users home directories had moved to a new partition? Or would I have to specify that somewhere?
Also, if I wanted to install new software, programs etc, would installing them to the new partition be a reasonable course of action - for example if i ran out of space on the 9Gb partition?

Originally posted by Ragnaar
...
How would it be possible for me to retain only the operating system stuff on the current partition (9Gb), and move stuff like the /home directory to the new partition - would linux recognise that users home directories had moved to a new partition? Or would I have to specify that somewhere?
Also, if I wanted to install new software, programs etc, would installing them to the new partition be a reasonable course of action - for example if i ran out of space on the 9Gb partition?
...

That's what I like! Concise, precise questions are easily answered with the appropriate commands:
Suppose your new partition is /dev/hda2 (substitute for the appropriate device and partition)
As root
#telinit 1 (useful when doing brain surgery in case other processes are doing stuff)
#mke2fs -j /dev/hda2 (will make a journalling filesystem on the new space. Skip if already there)
#mkdir /newhome (make a temporary connection between the new partition and the old fs)
#mount /dev/hda2 /newhome
cd /home
cp * /newhome
When you are satisfied that the files in /newhome are OK edit the line in /etc/fstab refferring to /home to mount /dev/hda2. If there is no such line, add
/dev/hda2 /home ext3 defaults 1 2
Then
#cd /
#umount /newhome
#mount /dev/hda2 /home
#rmdir /newhome
This leaves your original /home stuff still on the drive. If you wish to delete it, put

#rm -fr /home/*

just before the line #mount /dev/hda2 /home
#telinit 3 or 5 or whatever your usual run level is. Next time you reboot, /home should mount

Most user software is installed in /usr. If you have space, you could create a partition for a larger /usr and do the above. Another possibility is to mount a new partition on /usr/local
I hope this helps. Brain surgery is very scary. You can kill the patient with a little mis-typing.

All my Mandrake boxes are running 512MB ram (even the server) with a 512MB swap partition and to be honest, I've never seen the swap partition used AT ALL. Now, I'm not saying that you should not set up a swap partition, but from some folks I've heard the number 1.5x your amount of RAM. I can't see that ever being necessary.