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.
Quick question of how to correct a stupid mistake.
Red Hat has been installed onto a computer with a 40 gig hard drive, however, only 4 gigs of the hard drive was partitioned for the install and the remaining 36 gigs (give or take few or course) is free unpartitioned space.
I have now run into the spot where I am trying to install a large application that needs more space than what I have remaining on my partitioned 4 gig drive ... how can I easily add the remaining free space?
Is it possible without starting over (reformat and re-installing)?
Can I add the space to the existing partition?
Or can I just make a new partition for the remaining space?
Here's what I'd do, but there are probably easier/better ways to do this:
The remaining space is completely unpartitioned, unformatted space (this is my assumption from your post), so you need to partition, then format it. To partition it, you can use many different programs, like fdisk, or Gnu Parted. Most of these types of programs will come with your distro, so you don't really need to go anywhere to download and install them, simply open up an xterm, and type man fdisk for info on how to partition with that. Beware, this can dork your system if you do something wrong, so be careful. I'd rather use something like Parted, which is very nice and isn't as easy to "dork" your system with.
Either way, partition up the space to your desires (maybe 3 equally sized partitions) and then format them.
To format a partition, first you need to know what the partition is, so fdisk -l will list your partitions that you have just created. So lets say you created partitions /dev/hda2 /dev/hda5 /dev/hda6 just for the example. So now you would format them, meaning you put a filesystem on them, we will use ext3 in this example (which is what I would use anyway ):
mke2fs -j /dev/hda2
mke2fs -j /dev/hda5
mke2fs -j /dev/hda6
Now they are usable partitions under linux. Now you need to mount them, so:
mount -t ext3 /dev/hda2 /mnt/part1
And then you can save things there, move things around, and wreak havok as needed. If you also wanted to move something like /usr directory to this new partition, that's a little more effort, and more than I think it'd be worth. But if you really want to do that, it's been addressed before on here and a search will probably provide some good info for you.
Oh, and 1 more thing, lets say you wanted to mount this everytime you boot up, you could place this line in your /etc/fstab file: /dev/hda2 /mnt/part1 ext3 defaults 1 2
btw, you do need to be root to do anything I just suggested, but be careful while being root, you can easily jack up your system even more.
Oh, and 1 more thing, the mount point (in the example is /mnt/part1) needs to exist, so you will have to make that directory:
But I wouldn't user part1, just because that doesn't sound very cool I'd go with something like:
/mnt/movies or /mnt/files (notice I am putting everything in /mnt you don't have to, this is just the common practice I do, not everyone else does though; you could use /files or /home/files or whatever you want, it's just a mount point and a directory)
Ok, so the lines in the fstab file can be found in man mount and man fstab, but to give you a quick idea:
The default entry is just that, default. This is where you specify other options if you want them, such as auto for automount, rw for readwrite, users to allow users to mount/umount the drive and so on, as described in man mount for the given filesystem.
The first number, in this case 1, is fsck, I believe this correlaits (spelling?) to whether fsck checks this drive during boot or not on any given number of boots or errors, and the second is "dump", which, I have no idea what it means, but again the man mount or man fstab might. I am guessing this might be during umount or shutdown, but I really don't know. The number that goes with each is also a mystery to me, other than I know that a 0 should be used for vfat and ntfs partitions so fsck doesn't check them, and dump doesn't touch them either.