LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-11-2002, 12:47 PM   #1
dfu23
LQ Newbie
 
Registered: Nov 2002
Posts: 2

Rep: Reputation: 0
Partitioning Question


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?

Thanks in advance for the help!

Wally Atkins
 
Old 11-11-2002, 02:28 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64


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.

HTH

Cool
 
Old 11-11-2002, 02:34 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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:
mkdir /mnt/part1
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 again, HTH

Cool
 
Old 11-11-2002, 03:27 PM   #4
dfu23
LQ Newbie
 
Registered: Nov 2002
Posts: 2

Original Poster
Rep: Reputation: 0
Very cool!

That helps out a lot!!! Thanks for the tip about how to get it to mount there whenever it boots up ... very handy indeed.

Quick question about that (the fstab file that is):

The information that is entered into the fstab file make sense except for the last three things ... could you help explain what the remainder does?

/dev/hda2 # My device / partition
/mnt/part1 # The directory to use
ext3 # The file system type
default # ???
1 # ???
2 # ???

I ask this because there is also a MS Windows 2000 machine that I hook into using SAMBA every once in a while and if I could stick the information into the fstab file ... well, that would be cool.

Thanks again for your time and help,

Wally Atkins
 
Old 11-11-2002, 03:48 PM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Hi, no problem

Since earlier I forgot my manners: Welcome to LQ

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.

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Partitioning Question Wamzlee Mandriva 5 02-14-2005 05:11 PM
partitioning question pablowablo Linux - General 2 02-13-2005 12:38 AM
re-partitioning question shilo Slackware 8 07-16-2004 05:36 AM
Question re: partitioning Seventh Linux - Newbie 6 01-04-2004 02:32 PM
Partitioning Question MrJBot Linux - Newbie 12 10-21-2003 08:36 PM


All times are GMT -5. The time now is 03:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration