VectorLinux

Vectorbie Station => Vectorbie Questions => Topic started by: reb on December 22, 2007, 01:52:06 pm

Title: Controling HD partition information
Post by: reb on December 22, 2007, 01:52:06 pm
Hi people,

I have a HD prtition information problem. 

First bear in mind that as a long time ms-win user, I am saturated with the "Windows Explorer" and its listing of partitions, dirs, sub-dirs and files.  Now that I am into linux, I find that there is little in common with the ms-win system, and now I am completely confused.

I partitioned my HD into three partitions, Sda1, Sda2, Sda3.  I thought I was setting up so I would have the VL  OS on Sda1, and all added programs on Sda2.  This way I would not lose programs and data if I screwed up my OS; something that frequently happens with ms-win.

I have an 80GB HD; and I followed recommended sizes to isolate the OS on Sda1 and progams and date on Sda2.
Sda1 = 6GB
Sda2 = 68GB+
Sda3 + 2GB  (swap)

I like games so, I downloaded the following.  Wine, Cedega, installer for "Cal of Duty, GOY" and "Cal of Duty. UO".  I then Installed "CoD GOY" , played the game and it was great, but  when I tried to install "CoD UO",  I got the error mesg "not enough room".  Much to my consternation, Sda1, which I thought would be just VL OS, jumped from approx 3GB used to close to 5.5GB used.  I didn't notice any increase in Sda2.

So why did everything I installed go on Sda1 instead of Sda2 where my /home partitions is located.  I still have 68.068GB free space on Sda2, and obviously I would like all the non OS data, programs, and games on Sda2.  I know there is a way to move all this info, but first I need to find it all, and then know how to move it.  Last but not least, How do control the location to  where something is installed?

If you need more info, jut ask.

reb

Title: Re: Controling HD partition information
Post by: Triarius Fidelis on December 22, 2007, 02:09:33 pm
The installer for Call of Duty certainly chose to install in a directory outside of /home. Since I generally try to avoid games altogether, could you tell me where you downloaded the installer?
Title: Re: Controling HD partition information
Post by: lagagnon on December 22, 2007, 02:23:58 pm
So why did everything I installed go on Sda1 instead of Sda2 where my /home partitions is located.  I still have 68.068GB free space on Sda2, and obviously I would like all the non OS data, programs, and games on Sda2.  I know there is a way to move all this info, but first I need to find it all, and then know how to move it.  Last but not least, How do control the location to  where something is installed?

Reb: there is a Linux Filesystem Heirarchy. Most installed applications go to places like /usr/share or somewhere similar, not to your home, just as when you install a Windows program it goes to C:\Program Files, not your "My Documents" folder. This is because most of the time you want the applications to be available to all users of the computer, not just yourself. It also gets very complicated to have applications in your /home directory.

Thus your first partition should have been made bigger, to account for installing extra software. This is stated in our Installation Manual in the second paragraph. You should run a Live Linux CD (VL, Ubuntu, Slax, Knoppix) and run "gparted". With gparted you should be able to shrink the sda2 partition and make sda1 larger. Good luck. 
Title: Re: Controling HD partition information
Post by: Triarius Fidelis on December 22, 2007, 04:29:08 pm
It also gets very complicated to have applications in your /home directory.

For a single user it might be manageable. He could certainly try to install CoD on /home.
Title: Re: Controling HD partition information
Post by: bigpaws on December 22, 2007, 07:07:52 pm
The thought is correct the problem you have is
that mentioned above the games installed in
another place.

Placing home on a seperate partition will work as
you have seen.

Games generally install in /usr/local/games

Find the games and where they installed and
then make your partitions.

Bigpaws
Title: Re: Controling HD partition information
Post by: reb on December 23, 2007, 03:28:24 pm
Ok people,

I have just one more question before the holidays.  How do I find out what files I have loaded on Sda1 and Sda2.  With all the poking around, I still have not been able to find the answer to this question.  ???

To all of you good people,  MERRY CHRISTMAS !

reb
Title: Re: Controling HD partition information
Post by: Triarius Fidelis on December 24, 2007, 10:11:24 pm
I have just one more question before the holidays.  How do I find out what files I have loaded on Sda1 and Sda2.  With all the poking around, I still have not been able to find the answer to this question.  ???

What does 'df' say? I can interpret the output of that.

BTW, God Jul och ett gott nytt år to you as well.
Title: Re: Controling HD partition information
Post by: bigpaws on December 25, 2007, 07:06:57 am
Check /var/log/packages

Bigpaws
Title: Re: Controling HD partition information
Post by: reb on December 26, 2007, 05:38:57 pm
hanumizzle,

Here is the output of df:
Quote
vector:/~
rebel:$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              4883572   4204520    679052  87% /
/dev/sda2             71310348   1587904  69722444   3% /home
tmpfs                   515104         0    515104   0% /dev/shm


It tells me how much in on each partition, but it doesn't tell me 'what'.  If you have a crystal ball, let me know what it is.   :D

reb
Title: Re: Controling HD partition information
Post by: reb on December 26, 2007, 05:46:53 pm
Hi Bigpaws:

The output from /var/log/packages contains close to 240 files.  They are all colored green with a (*) following them.  If that is what a package looks like then there are a bunch.  What am I looking for?

reb
Title: Re: Controling HD partition information
Post by: reb on December 26, 2007, 06:32:11 pm
Hi lagagnon:

Quote
Thus your first partition should have been made bigger, to account for installing extra software. This is stated in our Installation Manual in the second paragraph. You should run a Live Linux CD (VL, Ubuntu, Slax, Knoppix) and run "gparted". With gparted you should be able to shrink the sda2 partition and make sda1 larger.

The only VL cd I have is the iso I burned to disk with my wifes' windows machine.  Is a 'Live Linux CD' the only way to obtain 'gparted' ?

Also, since my HD is only 80GB, what do you recommend for the size of sda1 and sda2.

Finally, Can you move files from one partition to another?  If so, how?  I'm use to the mindless "drag and drop" of ms-win.

hanumizzle:

I downloaded the installers to my 'dwnldbin'.  Here is the path:  /home/rebel/dwnldbin/... When I installed the game I don't remember if I had a choice to choose where it was installed but the game was installed to:  /home/rebel/cod/.  cod is the game "Call of  Duty".

I hope this is enough information to get things going again.  I'm still spongy from my part in fixing Christmas dinner.  We served over 30 people consisting of our parents, brothers and sisters, grand children and great grand children, which included all their girl friends and boy friends as well.
.  :-\   It was fun, but I'm really glad the whole thing is over.  I intend to sleep through "New Years"   :D

reb
Title: Re: Controling HD partition information
Post by: exeterdad on December 27, 2007, 04:55:09 am
Glad to hear you were with loved ones during Christmas Reb, have to admit I was wondering about that  ;)  Don't envy you hosting the event, as fun as it may be.

I haven't any advise on this issue, these guys here are to be trusted though.  I do want to explain the live disk thing to you though. 

You need to be running gparted on a live disk because gparted and the Linux system running it will be running completely in ram.  You can't be running Linux on the partitions you are about to be shifting around.  I have used this TINY live cd with gparted in the past and loved it. http://gparted-livecd.tuxfamily.org/  Remember to burn as a ISO rather then data cd as you will be booting from it.

Good luck my friend, you'll be fine  ;)
Title: Re: Controling HD partition information
Post by: reb on December 27, 2007, 09:02:06 am
lagagnon and anyone else who has ideas about partition sizes.

I downloaded the gparted live cd from  Sourceforge, and burned it to an image.  Now I would like to tap your knowledge for partition sizes.

I have an 80GB sata HD and I need to resize my sda1 and make it larger and shrink my sda2.   What are your suggestions on the sizes.

At this point I'm open to any and all suggestions.  :)

reb
Title: Re: Controling HD partition information
Post by: bigpaws on December 27, 2007, 09:51:31 am
From your original post you were asking about
where the extra things you installed went.

The best thing to do is to find these things.

You can use locate to do this. Open a terminal
su then updatedb.

Then exit as root and then locate <name of game> for
example. This will give you an idea where things are going.

From there you can then decide to partition so if your
games are in /usr/local/games you can create a partition
for them then if you lose the OS you have the data.

I have 8 partitions on my system to accomplish the
above.

HTH

Bigpaws
Title: Re: Controling HD partition information
Post by: Freston on December 27, 2007, 11:41:56 am
Hypothetically speaking, and please correct me if I'm wrong... But wouldn't it be possible to symlink /usr/local/games to /home/subdir?

Or... again hypothetically, mount /dev/sda2 on two places. /home and /usr/local/games?

That way reb doesn't have to splice off his drive any further.

Note! I know these are possibilities, but I am completely unaware of what may happen as side effects. I don't consider such a route to be inherently safe. Proceed with caution  ::)

Title: Re: Controling HD partition information
Post by: uelsk8s on December 27, 2007, 01:03:01 pm
good idea freston

Reb can make a dir on /dev/sda2
Code: [Select]
mkdir /home/GAMESthen mount that dir in /usr/local/games
Code: [Select]
mount -o bind /home/GAMES /usr/local/gamesnow anything installed to /usr/local/games is actually residing on /dev/sda2.

a problem with that that i can foresee is that anything in  /usr/local/games before the mount is hidden by the mounted dir.
like this
Code: [Select]
root:# ls /usr/local/games/
KKD/
root:# mount -o bind /mnt/hdd2/GAMES/ /usr/local/games
root:# ls /usr/local/games/
ut2004/
root:# umount /usr/local/games/
root:# ls /usr/local/games/
KKD/
Title: Re: Controling HD partition information
Post by: reb on December 27, 2007, 02:27:43 pm
Well Alright !!

bigpaws:
Freston:
uelsk8s:

Between the three of yu, I think I'm beginning to see a lot more of the whole Linux picture.  I have to admit that the linux hierarchy is quite different from that in ms-win.  However to make a short story longer,  I will try the suggestions  Freston and uelsk8s pointed out and see how it works.  I'm in a learning situation now anyway.  I have already re-loaded VL twice, so no matter what happens, if it works I'm ahead of the game, if it doesn't I just reload VL linux.   :D  So I see it as a win win situation.  One way or another I will learn a lot more. 

Give me some time to work on this and I'll get back to yu.   Thanks bunches.

reb
Title: Re: Controling HD partition information
Post by: reb on December 27, 2007, 03:40:30 pm
OK, :
Before I go and make any changes,  would, or would it not, be advantageous to go ahead and resize my partitions now since my sda1 is already just about full.  I ask that because in the future if I need more space in sda1, wouldn't it be better to make some more room now, rather then wait, or just wait till I need more room, an then add what I need.

You guys have a lot more experience in these matters than I.   So once again, I am open to suggestions. :D

reb
Title: Re: Controling HD partition information
Post by: Freston on December 27, 2007, 05:05:31 pm
Quote from: uelsk8s
a problem with that that i can foresee is that anything in  /usr/local/games before the mount is hidden by the mounted dir.
Yeah, that is one of the things I am afraid off. But that is easily solved by adding en entry in fstab. The best time to solve problems is before login (which applies equally well to marriage ;))
One other thing also is what happens to all data already present in /usr/local/games. It will remain present, but it wont get moved to the /dev/sda2 partition. I never looked into that. It'll keep under sda1, that I know... and new data gets written to sda2. But what if there is a config file or a safe file (some games do have 'm ;)) that gets written to. Will that change partition? And now we're discussing file system theory (at least as far as I'm concerned).

Quote from: reb
Before I go and make any changes,  would, or would it not, be advantageous to go ahead and resize my partitions now since my sda1 is already just about full.  I ask that because in the future if I need more space in sda1, wouldn't it be better to make some more room now, rather then wait, or just wait till I need more room, an then add what I need.
That is a very good question, and I'm glad you ask it before you make changes (I didn't say "proceed with caution" for nothing ;)) You will manually have to lift all your files off of sda1 and put them on sda2. If that makes enough room then there is no need to repartition.

In my experience it's best to have a root partition of 7.5GB. That is the perfect size for when I run a PC the way I want it. But the computer I'm running of right now has a hard disk of 4GB... And it's half empty. So it's very personal how you partition your disk. With a 6GB root, and a huge sda2, I would still repartition even though that takes longer than the mounting scheme we just set up. Or do them both ;)

But as I said, it's very personal.
Title: Re: Controling HD partition information
Post by: GrannyGeek on December 28, 2007, 07:03:44 pm
I never bother with multiple partitions. I use a swap partition of about 512 megs and make all the rest into / . Home is a directory off root (/). This way I don't have to worry about running out of room on one partition and having too much on another.

As I see it, the best reason for having /home as a separate partition is to preserve your settings and data in the event you reinstall or install a new version of Linux. I achieve the same thing by using an external hard drive formatted with a Linux file system. You *must* have a partition formatted with a Linux file system on the external hard drive if you want to preserve permissions and file ownership the easy way. I simply copy my /home onto the external drive as user, then I su to root and copy other files I want to have for reference (some in /etc, some in /opt, some in /usr). After I install or reinstall, I copy 'em back as desired.

You'd better have USB2 for this (or FireWire), because USB 1.1 is WAY too slow. Intall a USB2 card in a PCI slot if you don't have USB2 on the motherboard.
--GrannyGeek
Title: Re: Controling HD partition information
Post by: reb on December 31, 2007, 07:17:18 pm
GrannyGeek, thanks for this input.  I would have gotten back to you sooner, but the holidays got in my way.  ;)

I like the overall concept of separating the operating system from data in order to avoid disastrous loss of data.  I can pretty well see what you have done, but I'm not clear on the details of how to do it because I'm still fuzzy on the overall hierarchy of the linux tree.  I still have a couple of tweaks and wrinkles to iron out before I can work on this.  Please let me get back to you later on this.   :)

reb
Title: Re: Controling HD partition information
Post by: LeeDB on December 31, 2007, 10:07:44 pm
Hi all,

I like Freston's suggestion of using symlinks.  My work laptop has an encrypted home partition, but the root is not.  Recently I wanted a few of the directories in the root partition to be encrypted, and the easy way to solve it was to move the original directories from the root to a location of choice in the home, and then create symlinks in the root that pointed to the home locations.

Assuming for this example the games are installed in /usr/local/games, one could do the following to move the existing files to the home directory, which is in the spacious partition, and then create a symlink in the original location so that any programs that look for data in /user/local/games will still find it.

At a command line with root privileges:

mv /usr/local/games /home/games

ln -s /home/games /usr/local/games

My work laptop is running openSUSE, but I just tested the above in VL 5.9, and it worked.

You can do this with multiple directories in case your programs were installed in multiple locations in your root partition.