Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Hey everyone,
I have been using linux on my work computer for about a year and a half now and am fairly comfortable with it. I have my computer set up with a dual boot with fedora 8 and Vista. I have been challenged by my coworkers to move my laptop to a linux only machine. I have decided to take them up on this challenge and remove windows completely. I want to run fedora core 11 as I think it will give me the best starting foundation to build on to get everything working on my machine with linux. I would like to use this thread as a way for me to get advice from all of you as to the different approaches to tackle the many obstacles that might come my way while moving over to linux.
My first question:
I want to create a custom partition layout. I have a 250GB hard drive and was wondering what was the best layout for running a linux only machine. how much space should I allocate for /, /root, /home, /etc, swap, and are there any other partitons that I need to set up. I am fairly new to the partitioning of the disk so any advice would be greatly appreciated.
Hey everyone,
My first question:
I want to create a custom partition layout. I have a 250GB hard drive and was wondering what was the best layout for running a linux only machine. how much space should I allocate for /, /root, /home, /etc, swap, and are there any other partitons that I need to set up. I am fairly new to the partitioning of the disk so any advice would be greatly appreciated.
Thanks in advance!
SimGuy
Basically linux need at least three partition like /, swap and /boot.
/boot for install boot loader, so this partition need 100mb this size is more than enough.
swap for you have give double the ram size.
basically if you create only / partition, then automatically reset of the directory also include.
If you need extra partition means /usr, /home and other then linux partition.
basically I used "/ 25GB", "/boot 100MB" , "swap 4GB(I have 2GB ram)", "/usr 30GB", "/data 60GB(This is non linux partition)", "/home 40GB".
I hope this will be give some idea about how to partition.
Partitioning is sometimes very personal along with the task at hand. Sure for a Desktop a swap along with another for '/' will suffice but I personally like to setup my system with multiple partitions. I use the first as a working primary then the second as a swap. With the third being a experimental primary with about 20GB - 50GB. I then use the forth as a extended that I will setup multiple logical partitions to support that system, look at the following sample;
Code:
:~# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf5b5f5b5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sda2 3825 4074 2008125 82 Linux swap
/dev/sda3 4075 10300 50010345 83 Linux
/dev/sda4 10301 60801 405649282+ 5 Extended
/dev/sda5 10301 10425 1004031 83 Linux
/dev/sda6 10426 11671 10008463+ 83 Linux
/dev/sda7 11672 12668 8008371 83 Linux
/dev/sda8 12669 12918 2008093+ 83 Linux
/dev/sda9 12919 13915 8008371 83 Linux
/dev/sda10 13916 15161 10008463+ 83 Linux
/dev/sda11 15162 16407 10008463+ 83 Linux
/dev/sda12 16408 28856 99996561 83 Linux
/dev/sda13 28857 41305 99996561 83 Linux
Code:
cfdisk (util-linux-ng 2.13.1)
Disk Drive: /dev/sda
Size: 500107862016 bytes, 500.1 GB
Heads: 255 Sectors per Track: 63 Cylinders: 60801
Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------------
sda1 Boot Primary NTFS [] 31453.48
sda2 Primary Linux swap 2056.32
sda3 Primary Linux ext3 [/spare1] 51210.60
sda5 Logical Linux ext3 [/] 1028.16
sda6 Logical Linux ext3 [/home] 10248.70
sda7 Logical Linux ext3 [/usr] 8200.61
sda8 Logical Linux ext3 [/var] 2056.32
sda9 Logical Linux ext3 [/tmp] 8200.61
sda10 Logical Linux ext3 10248.70
sda11 Logical Linux ext3 10248.70
sda12 Logical Linux ext3 102396.52
sda13 Logical Linux ext3 102396.52
So maybe a good idea would be for me to set up my main working partitions with /, /home and swap and then set up an extended partition to include a partition for personal data and a second fedora OS that I can use to experiment and not destroy my working fedora partition.
Any suggestions on the best way to set this up? For my second fedora OS partition will I need a second swap partition for that?
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
Quote:
Originally Posted by SimGuy
So maybe a good idea would be for me to set up my main working partitions with /, /home and swap and then set up an extended partition to include a partition for personal data and a second fedora OS that I can use to experiment and not destroy my working fedora partition.
Any suggestions on the best way to set this up? For my second fedora OS partition will I need a second swap partition for that?
what ever partitioning you're are going to use.
To make a backup of you're data is always wise
Do you need a second swap file.
It depends if you are to hibernate suspend and so on.
How big you're swap file should be depends on you're amount of RAM
My RAM is 8 GB and using X86_64 I have the impression that my swap is not used at all
Why do you want to have multiple file systems? Only when you know what you want to achieve can you choose the "best" amongst the many options available -- it's "horses for courses" and there's no "one size fits all".
Since it isn't a server, just /, /home and swap will do. 15GB should be plenty for / (never understood why people waste dozens of gigabytes on it...) and a couple of GB for swap should be more than enough. I used to split my directory out into all sorts of filesystems but in my experience, the advantages are nothing compared to the wasted space if you allocate too much space or the endless resizing if you do not allocate enough.
Since I want my laptop to double as a stable work environment and an experimental environment I want to have the flexibility to run a working OS that will be set up with everything I need on a daily basis and I also want a second OS that I can use to experiment with new programs and settings and such so that if I mess it up I can simply rebuild that partition and my working OS is not compromised.
That being said here is how I think I will set up my FC11 working OS partitions:
Primary1 / (ext4) 15GB (working OS)
Primary2 /home (ext4) 50GB (working OS /home partition)
Primary3 swap 2GB (swap used for both OSs)
Extended1 /data (ext4) 100GB (personal data partition)
Freespace 83GB
I want to allocate the /home partition for my working files so that I can easily backup my data.
The /data partition will be more for personal files (pictures, movies and documents that dont pertain to work)
When I have done this I will use the 83GB of free space to set up my FC11 experimental OS partitions:
I need some advice on this...to set up a dual booting system I will need to create a separate / partition and I can just use the single swap partition for both OSs correct?
So my final partitioning set up for the Extended partition will look something like this:
Extended1 /data (etx4) 100GB (as seen above)
Extended2 / (ext4) 15GB (second OS)
Extended2 /home (ext4) 50GB (second OS /home directory)
Freespace 18GB (leaves room for any modifications later)
Is there anything in the above set up that I should leave out or anything I should consider adding?
Why do you need to do anything? Don't you already have a working system? It seems pointless, and not just a bit dangerous, to reorganize everything just to prove a point to your coworkers. If you really must do this, then why not just eliminate the boot parameter for Vista from your menu.lst and format the Vista partition to XFS or EXT3?
Why do you need to do anything? Don't you already have a working system? It seems pointless, and not just a bit dangerous, to reorganize everything just to prove a point to your coworkers. If you really must do this, then why not just eliminate the boot parameter for Vista from your menu.lst and format the Vista partition to XFS or EXT3?
My main working environment is Linux. I work for a company that develops flight simulators and we use opensource where ever we can, so I do my development work in linux.
Let me clarify, I HAD a working setup until I got a virus on my windows partition and needed to rebuild. I have backed up my files and now want to build a system that will work better for me. This is not just to prove a point it is to make myself more productive (not having to swap back and forth from windows to linux) and to learn more about linux. I understand the potential dangers of doing something like this so that is why I have backed up my files and I am asking questions to clarify the steps along the way.
OK, well just be aware that occasionally people will run off in the "let's make a partition for everything" direction and then wind up with no space left on / or /home or some other needed partition. Don't go in that direction. Unless you know what you need a separate partition for, don't make one. My suggestion is only "/" and "swap". Unless you have a really large drive, nothing else is necessary. If you do have a very large drive, then dedicate 20GB to "/", 1GB to swap, and the rest in "/data". Just my meager opinion.
OK, well just be aware that occasionally people will run off in the "let's make a partition for everything" direction and then wind up with no space left on / or /home or some other needed partition. Don't go in that direction. Unless you know what you need a separate partition for, don't make one. My suggestion is only "/" and "swap". Unless you have a really large drive, nothing else is necessary. If you do have a very large drive, then dedicate 20GB to "/", 1GB to swap, and the rest in "/data". Just my meager opinion.
There's nothing wrong with a partitioning layout like onebuck suggested earlier. Searching LQ for partitioning scheme threads will get you qualitatively good advice (some of which by people who actually have experience running such layouts) on which to base your decision, as opposed to "just opinions".
Searching LQ for partitioning scheme threads will get you qualitatively good advice (some of which by people who actually have experience running such layouts) on which to base your decision, as opposed to "just opinions".
No doubt. And, due to the bell curve, it may get you much more bad advice than you do good. This is one of those questions that, IMO if you have to ask, you shouldn't be doing it. However, it is up to the OP and his perceived needs.
IMHO it's one of those issues that shows computing is easy: either you have a distinct need or you dont. (OK, or you don't know you have any.) If you do then you want to make an informed decision.
I stated before that partitioning can be very personal. See what has happened again. But the way your machine is to be used or function then that should dictate how you partition for the system along with the filesystem(s).
Anyone can state a scheme they feel works for them. It may for the system they have it configured for their use but someone could point out a variant that may assist to improve the system.
I for one would not setup a system with a 'swap' and just a root '/'. My systems are generally setup for experimentation or test benches. Therefore the schemes are set to recover if for god knows a screw up occurs. I haven't borked a system for a long time. When I did it was recovered because I knew the system scheme. Therefore by having the block counts along with some utilities a recovery was made. I document everything for my systems and this tool alone has saved my a$$ more than once.
Now for my server(s) I do setup for security the partition scheme to allow me the tightest system possible. Yes, the partition scheme for a server is different than for a desktop. I keep my '/var', '/tmp' along with '/home' on different storage media within partitions separate from the '/' and '/usr' which are on separate medias. I'll not get into my reasoning as this will just start another debate.
Plus I'm paranoid when it comes to my server schemes.
The server scheme is modified to the type of server and filesystem(s) selected. Yes, I mix filesystem(s ) when necessary. Another debate for another thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.