LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using Linux and Windows: How to partition properly? (https://www.linuxquestions.org/questions/linux-newbie-8/using-linux-and-windows-how-to-partition-properly-459116/)

Nucomer 06-28-2006 09:04 AM

Using Linux and Windows: How to partition properly?
 
Hello! I am pretty new to Linux, used it 2 years ago for a year and didn't have this problem because the computer had just 1 hard drive back then. So the main problem ist: I use Windows, and I would like to keep Windows and use it from while to while to play some games which don't work on Linux.
I have 2 hard drives, one which is 40 GB and where there is Windows, and another one which is 120 GB where I have all my Programs installed. Both of them are NTFS. Basically I would like to install Linux on the drive where there is no Windows. Someone recommended me to do it as follows:

- Let the 40 GB drive as it is, just remove it while partitioning the other drive / installing Linux.
- Make 6 Partitions on the other drive:
1. for /boot = 1 MB use ext2
2. for /var = 1 GB use ext3
3. for /usr = 5 GB use ext3
4. for /home = 24 GB use ext3
5. for having acces from both systems = 50 GB use FAT32
6. for the things linked from windows which I will only use from windows (programs etc) = 40 GB let it NTFS
- Install Linux (Debian testing if that matters)
- Replug the 40 GB drive, change boot.ini so I can decide what I want to boot from
- Be happy

Pro:
- save if something happens to a partition, everything else isn't lost
- accesing FAT32 is save from Linux
- I can use Windows as it was, don't have to buy a new hard drive and can use Linux without any problems

Contra:
- Much effort to do
- Degraded performance because of many partitions
- Limit to 4 GB / file on FAT32
- Some links from Windows get lost if I want to use the same data on Linux too.

Now, is it okay so or is there something wrong or something I can do better?

Thanks in advance
Linux newcomer

tamoneya 06-28-2006 10:02 AM

that looks pretty good. you seem to have a pretty good idea of what you are doing. Evnetually it might be possibly to make that fat32 partition NTFS and use linux NTFS drivers which are coming along nicely. They arent 100% reliable yet as far as i know. So unless someone has some minor adjustment i would say go ahead.

lord-fu 06-28-2006 10:11 AM

I would adjust /boot to be larger, why only 1mb when you can obviously offer at least 10-50mb just to be on the safe side.
I have many partitions like you mention and have never noticed a performance hit, look at reiserfs. Other than that nice planning.

rickh 06-28-2006 10:34 AM

You don't specify a / (root) partition. You'll need that. Your /var partition is too small.

Here's what I would do with your disk space. Pick and choose. Number one, reinstall Windows. A lot of people will tell you that's not necessary. I disagree. Pick and choose.

Disk Usage:
On the 120GB drive, install Windows in a 15 GB NTFS partition. That's for OS and programs. Using Windows Disk Management create a 2nd NTFS partition 40-50 GB. That's for Windows data. You'll be able to read it from Linux, but probably not write. Create a 3rd partition, 30 GB, FAT32. (Max FAT32 size from WinXP is 32 GB.) That partition will be completely read/writable from both Windows and Linux. That leaves you some free space ... You could create another partition, or just leave it for future plans.

With BOTH disks installed, Boot the Debian Netinstaller. Tell if to use the entire 40 GB drive. Disk partitioning, thus:

/ -- 1 GB
(swap) -- .5 GB
/tmp -- 1 GB
/usr -- 5 GB
/var -- 3 GB
/home -- 30.5 GB

Grub will install automatically, and you'll be able to choose which OS you want to use for the current session. I recommend that you allow Linux to be the default.

You'll have plenty of opportunity to see Linux in action, and learn it, and hopefully, in a year or so you want to reinstall everything, giving Linux the lion's share of disk space rather than Windows.


Number one,

Nucomer 06-28-2006 12:10 PM

Quote:

Originally Posted by rickh
You don't specify a / (root) partition. You'll need that. Your /var partition is too small.

Thanks for your answer. What is the / partition for? How much do you recommend for /var?

Quote:

Here's what I would do with your disk space. Pick and choose. Number one, reinstall Windows. A lot of people will tell you that's not necessary. I disagree. Pick and choose.
I don't think I will do that. It will be difficult and time consuming enough to configure Linux properly, and I won't use Windows too often then so it will not be necessary.

Quote:

Disk Usage:
On the 120GB drive, install Windows in a 15 GB NTFS partition. That's for OS and programs. Using Windows Disk Management create a 2nd NTFS partition 40-50 GB. That's for Windows data. You'll be able to read it from Linux, but probably not write. Create a 3rd partition, 30 GB, FAT32. (Max FAT32 size from WinXP is 32 GB.) That partition will be completely read/writable from both Windows and Linux. That leaves you some free space ... You could create another partition, or just leave it for future plans.

With BOTH disks installed, Boot the Debian Netinstaller. Tell if to use the entire 40 GB drive. Disk partitioning, thus:

/ -- 1 GB
(swap) -- .5 GB
/tmp -- 1 GB
/usr -- 5 GB
/var -- 3 GB
/home -- 30.5 GB

Grub will install automatically, and you'll be able to choose which OS you want to use for the current session. I recommend that you allow Linux to be the default.
That maybe would be good for you and I appreciate your opinion, but I thought a lot about what I said and I think I will keep it like I thought before if there isn't anything very important that doesn't work with my configuration. But I guess there must be a way to make 50 GB on FAT32? I guess I will use the debian installer (DVD) to do so.

Quote:

You'll have plenty of opportunity to see Linux in action, and learn it, and hopefully, in a year or so you want to reinstall everything, giving Linux the lion's share of disk space rather than Windows.
I hope so, too!

Quote:

Originally Posted by lord-fu
I would adjust /boot to be larger, why only 1mb when you can obviously offer at least 10-50mb just to be on the safe side.

I think I will do that. These 50 MB don't really matter, thanks.

Quote:

Originally Posted by tamoneya
Evnetually it might be possibly to make that fat32 partition NTFS and use linux NTFS drivers which are coming along nicely. They arent 100% reliable yet as far as i know.

That's why I will make it FAT32, I can't afford losing the data on the partition for both Windows and Linux.

haertig 06-28-2006 01:01 PM

Here is a quote (edited) from a post I made sometime back last year. I use LVM and am a big fan of it. No more agonising over getting partition sizes right on the first guess. Adjust them later, as needed. If you are new to Linux, using LVM may be more than you want to bite off and chew. Your original post sounds like you may be new to Linux, but not to computers and partitioning in general. I don't think you'd have any problems learning LVM, and recommend it to you based on your attention to these little partitioning details BEFORE installing Linux. Many people don't even consider these options ahead of time. Kudos for you!

If you're not familiar with LVM ("Logical Volume Management") , see http://www.tldp.org/HOWTO/LVM-HOWTO/

Quote:

I use LVM and take the approach "start small, and enlarge as needed".

I would recommend something like the scheme below. Keep in mind the standard partition table limitation: "Only four primary partitions, one of which may be an extended partition". If this will be Linux only, I'd say just create a single huge extended partition encompassing the entire disk, then divide that up into logical partitions as below:

Physical partitions:
--------------------
/boot 30Mb
swap 512Mb
/ (root) 512Mb

Note: you can put swap on LVM too, if you want. / (root) can theoretically go on LVM as well, but you might have some headaches during upgrades, so I don't recommend it.

LVM partitions:
---------------
Then create another partition, maybe 5Gb or so, and dedicate that to LVM. Then create one VG with these LV's in that LVM partition:

/usr 2Gb
/home 50Mb
/var 1.5Gb
/tmp 512Mb
/opt 50Mb

Optional: Create /usr/local as a symlink to /opt

As you start to run low on space in any of those LV's, create another 5Gb logical partition (PV) and add that to the existing VG and then extend whatever LV needs extending. You probably won't need /opt much (depends on what you install) and you'll probably be needing to extend /home fairly quickly. /var will probably remain lightly used on a one-person desktop setup, except for when you do something massive like a dist-upgrade if you are running Debian or a Debian-based distro.

Probably more complex that most people do things! But I never feel that I've wasted space or misallocated it, since space is only added to a filesystem when the need arises. Most of my disk remains unallocated (unpartitioned). I add new partitions and extend my VG(s) only as I need to.

Nucomer 06-28-2006 01:07 PM

Quote:

Originally Posted by haertig
Here is a quote (edited) from a post I made sometime back last year. I use LVM and am a big fan of it. No more agonising over getting partition sizes right on the first guess. Adjust them later, as needed. If you are new to Linux, using LVM may be more than you want to bite off and chew. Your original post sounds like you may be new to Linux, but not to computers and partitioning in general. I don't think you'd have any problems learning LVM, and recommend it to you based on your attention to these little partitioning details BEFORE installing Linux. Many people don't even consider these options ahead of time. Kudos for you!

Sounds good. Thanks for the post I will see if I can use it. But: what is "swap" and "opt" for? Shall I make for these and "tmp" also new Partitions?

haertig 06-28-2006 02:11 PM

Quote:

Originally Posted by Nucomer
But: what is "swap" and "opt" for? Shall I make for these and "tmp" also new Partitions?

swap is used to allow harddisk space to function somewhat like ram, for when you physically run out of ram. You don't want to do this often - swapping memory to disk will slow your computer to a crawl. The solution is to buy more ram rather than depend on swap. However, swap is your fallback when you don't have enough ram. It can keep your system running, albeit slowly.

A good resource for finding out what type of stuff goes in what filesystem is the Filesystem Heirarchy Standard. Pretty detailed. I think most Linux distros follow the FHS fairly closely. Available here: http://www.pathname.com/fhs/pub/fhs-2.3.pdf

In general, /opt is for locally installed optional applications. i.e., applications and programs not required by the OS, but still required locally. A database or a game might fall into this category. Chances you you won't use /opt too much, but it depends on what you install.

haertig 06-28-2006 02:16 PM

Also, see post #6 by AwesomeMachine in this thread: http://www.linuxquestions.org/questi...d.php?t=458526

Nucomer 07-02-2006 08:11 AM

Hello again!

I've decided to do it like that, please comment it. I won't use LVM because it is too experimental for me I will try it later maybe.

30 GB NTFS for Windows only
50 GB FAT32 for sharing Data between Linux and Windows
30 GB /home using ext3
5 GB /usr using ext3
1,5 GB swap
1,45 GB /tmp using ext3
1 GB /var using ext3
1 GB /(root) using ext3
50 MB /boot using ext2
______________
120 GB total

If anything is missing please tell me so, if anything is not needed also.

I do NOT want to reduce the FAT32 or NTFS partition. I really need them, the NTFS for Windows only Data and the FAT32 for sharing data and not just exchanging them, so it will usually be filled up to ~40GB. If everything is proper then I will unplug my 40 GB drive on friday, make a backup of my 120 GB drive and then begin installing Linux. Thanks to you all!

tnandy 07-02-2006 09:30 AM

I have a similar setup on one of my computers. Rather than two hard drives totalling 160 GB, I have a single, 160 GB hard drive. Here's how I partitioned it:

38 GB NTFS Windows 2K Pro
60 GB vfat Linux /D --FAT32 Windows D:\ shared space
100 MB Ext3 Linux /boot---\
20 GB Ext3 Linux /(root)----} in an extended partition
2 GB SWAP Linux swap-----/

Instead of creating specific partitions for /home, /usr, /tmp, and /var, I simply let all these directories be automatically created under the /(root) partition. Do you have a specific reason for putting these directories into separate partitions? I've always heard it's generally a bad idea to completely fill a partition with data, so you will need to make each one bigger than the amount of data you expect. As it is, you will have a bit of wasted space at the end of each of these partitions. Creating these superfluous partitions also represents a lot of extra work.

I have used Logical Volume Manager (LVM) before, but only if I need to merge space on two physical hard drives into a single logical partition. You don't seem to need to do this.

If I were you, I'd partition my two disks this way:
***40 GB hard drive:
40 GB NTFS Windows (leave as is)
***120 GB hard drive:
100 MB Ext3 /boot
38 GB Ext3 /(root)
2 GB SWAP
50 GB vfat(FAT32) Linux/Windows shared
30 GB NTFS Windows extra space

Why would you unplug the 40 GB hard drive to install Linux? During the install, you should be able to tell Linux not only where to put its partitions, but also to ignore the Windows NTFS partitions. If you leave the hard drive in place, you can install grub boot loader in its master boot record (the Linux install should do this automatically). Using grub will allow you to boot to each operating system without having to fool around with any .ini files.

Good luck!

Nucomer 07-02-2006 11:07 AM

Hey tnandy thanks for your post. The reason to create a partition for each of the files? I asked someone who uses Linux and he says it's saver, faster and more stable than using one partition to put everything there. And I also got told to unplug the drive because there may be some problems when installing. I don't know what I will do, but before doing anything I will do a full back up of my system of course.

Why would you use ext3 for /boot? I thought ext2 is much better for static data.

tnandy 07-02-2006 01:07 PM

Quote:

...it's saver, faster and more stable than using one partition....
I'm using a different distribution than you (Fedora Core 3), but having everything in one partition has caused me no problems so far--at least none I can detect. My personal preference is to keep things simple. I would rather have the boot process take a few seconds longer than have six Linux partitions. My main computer tasks are browsing the internet, writing, and playing Neverwinter Nights and my computers have been quite stable.

I do not understand how multiple partitions could be faster than one. Partitioning claims physical areas on the disk for each partition. If you access a file in a /var partition and then accesses a file in the /usr partition, your disk arm must travel from one disk area to the other. If my /var and /usr are both in the same partition, my disk arm will most likely travel a much shorter distance, especially if the two files were installed at nearly the same time. Disk access takes a very, very long time in terms of CPU cycles and the disk can not read data while the disk arm is seeking the correct cylinder. It seems to me that the less disk seek time spent, the faster the computer runs. But that's just my opinion; I could be wrong....
Quote:

Why would you use ext3 for /boot?
Only because that was the default for FC3. It seems to work just fine.

royeo 07-02-2006 01:24 PM

On the drive with your programs create a partition, (the Windows drive should be left alone, except
maybe to make mount points; if not you can always cancel). Create the partition of the size that leaves the amount of space you want Linux to have. This will then be unused space. I've
installed 2 distributions of Linux and they both provided the option of using the free space and setting up default partitions and swap file. But they both also provided for making the partitions and swap file the size you want, also out of free space.

royeo

pokemaster 07-02-2006 07:39 PM

ext2/ext3-- it doesn't make much of a difference. ext3 is not radically different from ext2, except that it adds journaling support (which is great, but unnecessary for static data)

Also, ext2 has undelete. As far as I know, in a journaled file system, there is no way to implement a reliable undelete. So, in that sense it can be very good. Or bad for the security of your deleted data. However you'd like to look at it.


All times are GMT -5. The time now is 01:41 AM.