Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: Master of Reality on 16 March 2002, 10:16

Title: I NEED HELP!
Post by: Master of Reality on 16 March 2002, 10:16
i need some help... I'm already into the Linux-Mandrake installation:
here's my problem with partitioning:
i have 2 partions on my hard drive
Linux Native 1.7 GB
linux swap 245 MB (is that a good size, i have no clue)
what the hell am i supposed to set as a mount point??: /, /home, /usr, /var, ETC.
what are mount points?


...i wonder if anyone can tell i don't usually play around with partitions (or Linux)
     

   :confused:      :confused:      :confused:

[ March 16, 2002: Message edited by: Druaga ]

Title: I NEED HELP!
Post by: Master of Reality on 16 March 2002, 10:37
looks like i'm gonna have to do this tomorrow...
i have to awaken in... 5 hours!!!!

I need answers!!
Title: I NEED HELP!
Post by: mskarl on 16 March 2002, 12:26
Swap space is usually sized to be double the available RAM if there are fewer than 128MB, but if you have more that 128MB of ram the use that size.  I got this from a book so I'd trust it.
Title: I NEED HELP!
Post by: Calum on 16 March 2002, 18:42
isn't the mount point the name of the partition?
so if you had a partition called hda1 with windows on it, and one called hda2 with linux (nearly) on it, and one called hda2 for linux swap, your mount point would be hda2, is this right guys?
Title: I NEED HELP!
Post by: voidmain on 16 March 2002, 18:45
Yes, Anti M$ has the general rule of thumb right. But I try and make sure I have enough RAM in the machine so that swapping is "rare", depending on what I am using my Linux machine for.  For instance, on my desktops I use a minimum of 256MB of RAM but try for at least 512MB of RAM. Because I strive to not swap by having a lot of RAM, the need for double the RAM size for swap space really isn't necessary. I usually make the swap the same size as the RAM. On servers depending on the role I might only need about 128MB of RAM (or less if they are light duty web servers or Samba servers), then I will set up multiple 128MB or 256MB swap partitions spread out across as many disks/controllers as possible (swap performance increases significantly if you spread it out). I don't run Xwindows on servers or memory intensive graphical apps so the requirements are usually less. Now if you want to run a large database on the server and performance is a must, then much more RAM is desireable. Small web databases don't require a lot of RAM though.

On the other hand, I have one server with 4GB of RAM as the app is very memory intensive and because it needs as much RAM as it can get and built for ultimate speed it doesn't swap, therefore I get by with only two 256MB swap partitions (and that is overkill because the swap space has never been used).

[ March 16, 2002: Message edited by: VoidMain ]

Title: I NEED HELP!
Post by: dbl221 on 16 March 2002, 20:38
Partitioning the non-swap stuff:

At a minimum you need /boot, / and /swap

/boot of 300MB or so is fine....plenty of room for playing around and learning more about Linux.

/swap....read Voidmains stuff

/    you can put everything else under this to keep things simple...most distros do this.

if you want to get more advanced then you can created /var /home and the rest.

The optimal size of /var /opt /home and the rest is a matter of what you are doing with the box and much debate....there is no right or wrong answer.

If you want to learn more just install Linux a few time with varous sizes or /var /home and the rest.

The mount point has nothing to do with the name of the partition....partition names are hda1, hda5 and what not....the mount point is the directory name...ie your windows fat32 partions is  mounted as a vfat to /mnt/win or /winblows.

good luck and let us know how it goes
Title: I NEED HELP!
Post by: Master of Reality on 17 March 2002, 00:23
its too late for your help.
Thanks to the easy Linux-Mandrake setup, i figured it out and as of 3:15 Pm i have been logged into my new linux machine and am writing this from it.

i finally got too pissed off at windoze and my machine is currently windoze-free.
that freaking windows setup program got into a "loop of stupidity" (just like scandisk does when its set to perform write testing) when i tried to re-install, i said fuck it and got out my linux-mandrake CD and... well here i am on my linux machine.

P.S.
cant i get the trillian messenger for linux?

[ March 16, 2002: Message edited by: Druaga ]

Title: I NEED HELP!
Post by: Master of Reality on 17 March 2002, 02:19
can i use files that are on my Fat32 (wiindows) hard drive?
such as playing MP3's in Linux that are stored on my Fat32 partition?

also...
 Is there some sort of "Remote Administration" i can use in Linux to control another (windows) computer on my network?

[ March 16, 2002: Message edited by: Druaga ]

Title: I NEED HELP!
Post by: Master of Reality on 17 March 2002, 03:53
well, i'm on my crappy old win machine, to ask questions about linux. *sigh*

how do i re-install the lilo boot from the command  line?
(you dont want to know, what i did to it)
Title: I NEED HELP!
Post by: voidmain on 17 March 2002, 05:05
Wow, so many questions..

First you don't need 300MB for a /boot, 20MB is plenty. It's only there to hold the kernel and initrd. In fact it's entirely possible that you don't even need a /boot partition depending on your hard drive and BIOS, but you can't go wrong if you create one regardless of whether it's necessary.

Second, you can use VNC to remote control Windows machines.  You'll need to install the VNC server on the windows machine and then use vncviewer under Linux to remote control.

Third.  Assuming you mean reinstalling LILO from the Linux command line, and assuming you have your proper "/" partition mounted from your hard drive, just run "/sbin/lilo" (assuming you have not made any changes to your /etc/lilo.conf file. If you want to change the LILO boot menu you would change it in /etc/lilo.conf.  After every change you have to run /sbin/lilo to make the changes active.

If you screwed up your boot menu, you can always use a boot disk or your CD to bootstrap your "/" partition on your hard drive. To do this, boot from the alternate media (CD/Floppy) and at the LILO: prompt type "linux root=/dev/hda2" (assuming your linux "/" partition is on your second partition of your hard drive).  Once booted you can fix your lilo.

[ March 16, 2002: Message edited by: VoidMain ]

Title: I NEED HELP!
Post by: Master of Reality on 17 March 2002, 06:02
ya thats what i did for the lilo thing, and i used some command like "sbin/lilo"
it worked.
Title: I NEED HELP!
Post by: dbl221 on 17 March 2002, 06:06
Well if the fat32 partition is on the same box as the hard drive you installed Mandrake on, Mandrake will recognize this drive or partition as vfat/fat32 and mount it for you.  Mounted and mountable stuff is in the /etc/fstab file.

The fat32 partition is permission 777, and is listed in fstab as vfat.

If its not listed in fstab...edit it in there and remember to create the mount point.  You just use mkdir to create the directory/mount point.

20MB is fine for a single kernel but if you are doing kernel development go big...try it its fun.
Title: I NEED HELP!
Post by: voidmain on 17 March 2002, 08:23
I do kernel development and currently have 6 different kernels in /boot along with the grub boot loader. I don't have room for any more on that 20MB though. 40MB or 50MB would surely be more than anyone should ever need.  I don't put the source code there though, that should go under /usr/src/linux. If you were to put the source tree there (which you shouldn't) then you would likely want more than 300MB.

[ March 16, 2002: Message edited by: VoidMain ]

Title: I NEED HELP!
Post by: dbl221 on 17 March 2002, 22:51
Thanks Void, I will try putting my src there insteaed.
Title: I NEED HELP!
Post by: Master of Reality on 18 March 2002, 04:12
whats a good messenger for linux-mandrake, that can load ICQ?
i want something like the trillian messenger, that can load different messengers (such as ICQ)

[ March 17, 2002: Message edited by: Druaga ]

Title: I NEED HELP!
Post by: Master of Reality on 18 March 2002, 07:47
okay... what the hell is going on?
my clock jumps back, only in hours, when i'm not looking!!
it said 10:30 i turned my back to put on a tape, looked back and it says 5:30.
whats wrong????
Title: I NEED HELP!
Post by: voidmain on 18 March 2002, 21:02
Uh, been dropping acid again? Or maybe a close encounter, in reverse?  Usually only a second passes in earth time when days can pass on the alien vessel.  (http://smile.gif)

[ March 18, 2002: Message edited by: VoidMain ]

Title: I NEED HELP!
Post by: Calum on 18 March 2002, 14:02
wow! i could never be bothered to use the computer if i had dropped acid! well done, you must have a staunch brain indeed!

I used to find that there was a windows/linux clock problem, are you dual booting? i think i fixed it by telling linux to get the time directly from the bios...

if you aren't dual booting in between the clock changing around then i haven't a clue what's up, but tell me where you got that acid from will you?
Title: I NEED HELP!
Post by: Calum on 18 March 2002, 14:04
quote:
Anti-Ms said:
I got this from a book so I'd trust it.

i just liked this line so much i had to quote it!
Isn't it odd how a lot of people trust anything that's written in a book, just because it has been written in a book?

Anti-MS, i am not trying to pick a fight, i know exactly what you meant, but i just thought the wording was a little amusing!   :D
Title: I NEED HELP!
Post by: Master of Reality on 19 March 2002, 01:10
i think my computer IS on acid (i gotta find out where it keeps its stash)

the archiver program just displays a whole bunch of odd symbols (not unlike encryption) when i open a certain file, its the unreal tournament demo.
it worked once to open it, the next time i tried, it did the screwed up shit. has anyone else had this type of problem?

 
quote:
Anti-Ms said:
I got this from a book so I'd trust it.  

i got a book here, and i dont trust it one bit. (i think it got into my computers stash of acid)

[ March 18, 2002: Message edited by: Druaga ]

Title: I NEED HELP!
Post by: voidmain on 19 March 2002, 05:23
The book wasn't titled "VoidMain's Registry Tricks for Dummies" was it?
Title: I NEED HELP!
Post by: Master of Reality on 19 March 2002, 05:56
i dont think i would be using a book on the registry, if i'm using linux....i think its called "the acid linux revolution"
Title: I NEED HELP!
Post by: Master of Reality on 19 March 2002, 07:14
this book i have explains permissions, but doesnt tell me the command to change permissions.
It tells me that after the command i use things like: dr-x----.
so, what is the command for setting user permissions?
Title: I NEED HELP!
Post by: voidmain on 19 March 2002, 07:32
The command is "chmod" (see: man chmod). You can also do it from the Konqueror file manager (right click->properties->permissions), although I don't believe I have *ever* used konqueror to change file permissions.  (http://smile.gif)   If you have any questions about chmod or are confused by the man page I can describe it in detail that may help you understand it a little better.  Sometimes the man pages are a little light.
Title: I NEED HELP!
Post by: Calum on 19 March 2002, 13:25
VoidMain, maybe that permissions thing you are thinking of posting for us newbies could be submitted as a feature article when you get round to it?
I am still a little shaky on permissions (although your reply was very informative last time i asked about it), and i think a lot of new linuxers will want to read your proposed article, so maybe it should be a feature article rather than get lost in the backlog swamp of the forums after a couple of weeks...
Title: I NEED HELP!
Post by: voidmain on 20 March 2002, 04:37
Well, like most UNIX people, I'm lazy so here are a few articles that look to get the basics down:

For basic file permissions and octal representations but not including special attributes or ACLS:
http://www.perlfect.com/articles/chmod.shtml (http://www.perlfect.com/articles/chmod.shtml)
http://www.mast.queensu.ca/~mastop/Unix/access-control.shtml (http://www.mast.queensu.ca/~mastop/Unix/access-control.shtml)
http://www.webmastervault.com/tip-chmod.shtml (http://www.webmastervault.com/tip-chmod.shtml)

The above links only cover 3 of the 4 octal numbers regarding permissions that can be changed with "chmod".  They only talk about the rwxrwxrwx portion. Well there is a 4th bit that controls whether the file is SUID/SGID and the "sticky" bit.  And if you used octal notation this bit is actually the first of 4 numbers you would pass to "chmod" rather than the typical 3 numbers:

Normally to set a normal file rwxrwxrwx you would do either a "chmod a+rwx filename.dat" or in octal it would be "chmod 777 filename.dat".  If you add the 4th octal it would be "chmod 0777 filename.dat" to get the same permissions.  The first octal actually controls SUID and SGID. The same example above but with the "SUID" bit turned on in octal would be "chmod 4777 filename.dat", or "chmod u+s filename.dat" to add the SUID bit. I would have to strongly urge that you *NEVER* have a file with 4777 permissions. 4755 is common but 4777 would allow anyone to change the file and then execute it as the owner of the file (good trojan). However, Linux and hopefully other OSs will turn off the SUID bit after another person edits the file.

SUID means that when the file is run it will run with the permissions of the user that owns the file, no matter who executes it.  Some *NIXs only allow the SUID on binary files but many allow it on scripts as well.  The SGID bit means that when the program is run it will run and have the same rights as the group associated with the file, regardless of if the user running the program belongs to the group or not. The "sticky" bit is for directories. When you set a directory with permissions "1777" which means everyone has read/write/execute permissions to that directory and anyone can create files in that directory but only people who can delete a file from that directory are the owner of the file, the owner of the directory and "root". /tmp is set with the sticky bit on. It shows up with a "t" in the end of the permissions "drwxrwxrwt".

See http://www.cs.umass.edu/rcfbbl/bbl_security_050395_utils.html (http://www.cs.umass.edu/rcfbbl/bbl_security_050395_utils.html)

Another thing that I don't believe I saw mentioned in the above links is the fact that directories must be set "executable" (or have the "x" bit turned on) in order to be able to change into those directories (all parent directories above it must also be set executable). This is just a side note that can bite n00bies.

Now, ACLs (or Access Control Lists) allow restrictions or allowances on a file or directory above and beyond the basic UNIX (chmod) capabilities. For instance, you may want to make a directory owned by a particular user, and assign it to a specific group and give permissions to only the owner and group and no permissions for anyone else.

Say the /var/www/develop directory is owned by root and is assigned to the "www" group (chown root:www /var/www/develop). You have all of your web developers in the "www" group and they all must be able to change or add files to that directory but you want no one else messing with it. The directory would look like this:

drwxrwx--- root www size date time /var/www/develop

Now say you wanted to add user "joe" to this directory but not give him access to all of the other directories that the "www" group has access to. You can't add him to the "www" group and you don't want to have to create an entire other group just for this directory.  Here's where ACLs come in.  You can give it the above permissions, and add "rwx" for user "joe" and "r-x" for user "sally", etc, using the ACL editing tools.

Now most Linux distros do not come with ACL support, in fact I know of none, but they will be coming with it in the future.  For now, you can download the ACL patch and the appropriate Kernel source and apply the patches, compile the kernel and install it.  You'll also need the ACL modified fileutils and other packages.

See http://acl.bestbits.at/ (http://acl.bestbits.at/)

I've applied the above patch and it works well, it even allows me to use NT domain users and extended ACL permissions on my files and shares that I have shared to windows machines using Samba.

This is "most" of what there is to know about file permissions but there is more. If you want to get into special files like pipes, sockets, etc, or if you wonder what the first letter you see in the permissions mean like "-","b","c","d","l", etc (as in "brw-rw---- root disk" on /dev/hda) I would surely be happy to discuss. And of course we did not discuss recursively changing permissions and the implications...

Have fun...

[ March 19, 2002: Message edited by: VoidMain ]