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 installed red hat linux 9.0 without creating a swap partition. While installing it i did not get an option to create a swap partition.I have arround 1gb free space for the swap partition. Now i want to create a swap partition. How do i do it?
1 GB is a lot for swap. If you want, before you go too far, you can reduce this (you'll have to repartition the linux and the swap and hence you'll lose everything in the linux partition). Otherwise, run "fdisk /dev/hda" as root. Then have a look around: press "p" to print the table, "m" the print the available commands. When you're bored of this press "p" again to see where the free space is. Then press "n" to create a new partition. Select primary partition from the next prompt and tell it to use all the remaining space (unless you want to use some of that space for something else). When it asks you what kind of partition to make it, say swap (you'll have to choose the number corresponding to swap). Press "p" again and write down the name of the partition you just created (something like /dev/hda2).
Once all this is done, edit your /etc/fstab file. and add in the following line just after the first entry:
/dev/hda2 none swap sw
The spaces are arbitrary (one press of the spacebar will do). Reboot. Presto! you now have a swap partition.
i ran fdisk but it is not showing me free space when i print the partition information. I have a 40 gb hard disk which i have partitioned as c:,d: for windows and /*,/*boot for linux Now i have 1 gb free space which i want to use as a swap partition. Even when i installed linux and used disk druid to create the partitions, it did not allow me to create a swap partition saying that there was insufficient space....
How many total sectors does fdisk says the disk has?
You might have free space on the end of your drive but your problem is that you can not create a partition for swap because:
1. You already have 4 parimary partitions and can not create another one.
2. hda5 is using up all of the space in your extended partition hda2 and therefore can not create another logical partition.
You will need to resize hda2 but to do this hda3 and hda4 need to be moved to the end of the drive. parted may or may not work depending on what kind of filesystem systems they are. See parted documentation for limitations.
Partition Magic will probably work.
Do you need a swap partition? How much RAM do you have? Like the previous post says 1gb is a lot of swap for an ordinary user unless you have RAM intensive apps or running a high volume server of some type. Most people can get by with 512mb.
You can create a swap file on your root partition. It will not be as fast as a partition.
Yes that's correct. Only 4 primary partitions are allowed per disk. What you should do is create 3 primary partitions:
Then LOGICALLY partition Linux into / and /boot and then LOGICALLY partition Windows into C: and D:. This should solve your problem. You can use the programs suggested by michaelk or you'll have to reinstall everything.
One more thing... I have 256Mb of RAM. My swap is the same size. I almost never hear my computer swapping and whenever I checked my swap partition, it was unused. Mind you, I use Debian which runs a little lighter than Red Hat but it shows you that you don't need ANYWHERE NEAR the amount of swap sapce under linux as you do under windows.
It's a good practice to maintain your swap file, though. I mean, it has to be there. But, like, if you don't think you need it, you don't have to make it as big as the ram. Some people make it twice as big as the ram.
If, in future situations, you want to maKe your swap smaller, you can probably do that.
Originally posted by dsuniln i ran fdisk but it is not showing me free space when i print the partition information. I have a 40 gb hard disk which i have partitioned as c:,d: for windows and /*,/*boot for linux Now i have 1 gb free space which i want to use as a swap partition. Even when i installed linux and used disk druid to create the partitions, it did not allow me to create a swap partition saying that there was insufficient space....
Just to let you know, I ran into the same problem. I have actually found a few others that did the same thing. It sounds like we might have hit a limit of some sort when trying to create a "5th" partition. I have winme, and older system, that I wanted to install RH9 on. I created root and boot, then tried to create swap, but disk druid would not go it. The auto completly failed, but disk druid allowed me to create / & /boot
My system works just fine, but after bootup, I only have about 70MB free (out of 256MB) from free command. It shows 0 0 0 for swap, and I am here to look for suggestions. I just came from www.justlinux.com and kinda got flammed for asking a question before looking it up. There is so much out there it just gets overwhelming, and I did not want to have to install everything from scratch again. Its funny, with just a few posts from you guys, it sounds like the answer is there. I had to go to politics of newbie this and newbie that and I still was confused. Thanks for taking the time to answer questions without all the BS.
<- begins to suck after a few days of getting no where!