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!
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.
Click Here to receive this Complete Guide absolutely free.
I have a 120 GB Seagate SATA harddisk which I'm going to make a multiboot drive. I like to fiddle with multiple partitions. The following is what I've in my mind.
hda2: / (for FC6)
hda5: swap (1GB)
hda6: /usr (or /usr/local or both?)
hda10: /test (for any other distros)
hda4: 10GB-keeping it free for the moment. Will b used for Unix(FreeBSD or Solaris)
I'm confused as to how much space to allocate for linux esp for the /usr, /var, /tmp partitions. The PC is mainly going serve me as a learning tool. Not gaming or video editing system.
Secondly, How can I have a FAT32 partition(D drive). Can I create it while installing linux or should I create it from windows itself?
most distributions will tell you exactly how much a "FULL INSTALL" will take up.. make sure you make /var and /tmp high seeing as after time /var/log and a 'temp' directory will produce alot and require alot of space..
create all your windows partitions with a windows installer.. I would install windows first make your drives and leave the extra space then install linux.. as linux will write a bootloader like lilo or grub to your master boot record.. im sure you can do it vise versa but I havent..
If this is one of your first learning experiences with linux, I wouldn't create so many partitions. Most servers have individual partitions for the filesystem for control. By limiting /tmp to 5 Gb, they save space for elsewhere. Then again, they are sysadmins, and know what they are doing. To learn, I would only create 2 or 3 partitions. Either just / and swap, or /, /home, and swap. That way you can look at each of the core directories (/usr, /var, /bin, /tmp) and issue a command like
du -hs /var (or)
du -hs /tmp
That will show you how much space each of those directories is using.
There is no generic right answer for space to allow. We have servers at work with 90% of their drive space dedicated to /var, we also have servers with 80% space dedicated to /home. Until you figure out what goes where, saying in advance, "I want 10 Gb for /var" doesn't make much sense.
Install, and see how much space you use. Yes /var/log can get big, depending on how verbose you log and how long you keep them. It can also be kept tiny, if you don't log much, and rotate the logs frequently.
I would install windows first as mentioned above, then do a 2 or 3 partiton of linux as I mentioned above, and don't use the full drive, leave space should you want to add another distro later. It doesn't matter if you allow windows to create the fat32 partition or linux. The /test partition doesn't make sense. You want unformatted space for new distro installs, not a subdirectory of an existing install.
Hi Jim, by '/test' I actually meant a 'test partition' not a subdirectory. i.e., making it Linux native partition(83) like hda10,hda11..etc and leaving it blank. Or did you mean that still I cant install another distro like this?
Probably you are right in advicing a novice like me to keep it simple. But apart from my (unwanted?) interest in multiple partitions, I thought of this partitioning scheme as I read something about crackers being able to gain access to our systems through /tmp partition which is a universal write partition, some core dumps stuff etc.
I've been using linux a long time, and for a desktop system, with xserver and gui applications, I partition like this, using Partition Magic 8.0. I make a DOS boot diskette from the linux install DVD using the rawrite program. You can also use dd. Then, I boot with the DOS boot diskette, and take it out of the floppy drive. I insert the second diskette of a Partition Magic set of emergency diskettes, and type PQMAGIC.
I make the first primary partition for linux "/" - 15 GB without format.
I make the second primary partition an extended partiton using the remainder of the drive:
Within the extended partition I make logical drives as follows:
70 GB for linux "/home" without format
7 GB MS Windows XP and format NTFS
1 GB linux swap without format
Just adjust the linux /home partition for whatever size the disk is. You can creat as many partitions in the extended partition as you wish, but there is only room for 4 primary partitions on a disk.
I install MS Windows XP to the logical drive in the extended partition I formatted as NTFS.
I install linux to the first primary partition, specifying the proper /home, and linux will usually guess the right /swap partition.
It is fine to create a partition of nothing, that isn't a problem. I would suggest however that you not format it in any way. The reason for that is it is foolproof to tell the next distro you install to go to the free space on the drive. If you tell it to use the hda11 partition, it well tell you it is formatted, and you need to erase it, causing a loss of all data on it. Then you say yes, and find out what you thought was hda11 was hda12, you'll have a major problem. By not formatting it, and leaving that to the next install, it requires no thought. There is no functional difference, just how easy you make it.
You also seem to be misunderstanding what partitions either are or do. Putting /tmp on its own partition doesn't prevent someone from getting to other partitions on the same machine. If you get an exploit that allows write access to /tmp, you can write to anything that your permissions allow. You seem to be crossing up a partition with a chroot system. A chroot essentially "traps" exploits. Should somebody have an exploit that gets into your ftp server, if it setup in a chroot enviornment, it can't get out of the chroot. But that system can't be easily setup all over your system.
I didnot know about what u told about /tmp and chroot, Jim. I think I should listen to you for now. I'll create just /,swap, and /home and keep one partition free(without formating as u suggested) for another distro. I should first master the basics and be in a position to think sensibly and talk intelligently about linux before experimenting with it.
I certainly am not the only person who posts here being worth listening to! Usually you can judge by the number of posts, but you do sometimes get brilliant answers from somebody with 10 posts, and even now and again one of the 10,000+ posters will misread and suggest something untrue or wrong.
Partitions aren't walls to contain activities, just spaces for things to happen. But getting into any space still allows you to see almost anywhere else, hopefully though the exploit doesn't allow root access, where they could also write things.
One thing linux is certainly great for is experimenting! I do suggest for starters going with a simple install of few partitions, but before you go to work on "real world" servers, it certainly would be a good idea to build several on an old machine at home. A nice thing is that having "badly planned" partitions won't stop a machine from working.