Jump to content

Linux Tips and Tricks


Junior

Recommended Posts

Installing Gentoo is not as hard as you think

Ok, first tip. Never install Gentoo, you will fail miserably. :P

Ok, I wasn't serious. Installing gentoo can be real simple, that is if you take your time, and following the Manual which can be found both online, or on the CD.

To access the Manual from the cd from the gentoo live CD, type

links2 /mnt/cdrom/docs/html/index.html
But it's always recommended you use the online manual, as it will be more up to date than the CD version. If you already have your Network up and running, then it's as easy as pointing your links browser to the following link.
links2 http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
Now if you're installing for another arch, then you can use the following as a substitute for 'x-86' sparc, amd64, ppc, ppc64, alpha, hppa, mips Another great resource if you have networking enabled, is the Official Gentoo IRC channel. The live CD has a great IRC client available to you called irssi. to access the Official Gentoo IRC channel connect like this.
irssi --connect=irc.gentoo.org
- This may be the incorrect syntax, I'm forgetting it right now, if you need help, irssi --help will bring up the list of correct flags. Once irssi is up and connected, type in
/join #gentoo
Irssi also supports multiple server connections, so if You don't wanna just chat in the Gentoo channel, you can connect to your favorite IRC server and chat while you compile. Just use:
/connect <serveraddress>

Well thats it for the quick Gentoo tips, Remember, Gentoo is all about choices. So don't think it's harder than it is. Because it really isn't hard at all.

Link to comment
Share on other sites

Optional Hard Disk Performance Tweaking

If your linux Operating System has hdparm (Which I do believe all do), then here is a Safe and Quick optimization.

First type in the following to get a baseline test.

hdparm -tT /dev/hdX
Where X= your Hard Disk you want to use, e.g. a,b,c etc. Now by default DMA should be enabled, but if it is not, it will enable it for the drive you use this command to. As with any linux system, you can get help on any flag by usually typing the flags -h or --help. but here is the command for Safe Performance Enhancing options.
hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hdX
Again replace X with the letter of the drive you are working with. Now the -a 64, you can play with this number a little, 64 should be fine, but you can use 128, 256, 512, etc.. It depends on which will work best for your drive. When changing these options, be sure to run
hdparm -tT /dev/hdX

To test and see if you improved from the baseline.

Some values you can not play with, again using the -h or --help flags will let you know which ones are taboo.

That's it.

Link to comment
Share on other sites

Fdisk Made Easy

Ever wonder about fdisk with linux? Always using the safe method to partition your disk? Don't worry, fdisk isn't that bad. Yes it can destroy data when used improperly, but remember one thing, if you mess up, as long as you don't write anything, you will lose nothing.

A few pointers to remember

When setting up a linux system for the first time, you will need to remember three things.

*Boot, Root, Swap, Home, Var. What do i need???:

When setting up your partitions, you are only required at a minimum to use 3 paritions, unless you have copious amounts of RAM, then a swap partition is optional, but still recommended.

If you want to Set other folders like /var, /usr, /home, etc. To another partition, you can set those up as well, But remember, you only need 3 minimum.

It is best to set all extra partitons on extended partitions, but it is not necessary. This is to keep the file system clean and so you can separate the MAIN partitions from the optional.

*Always Set your boot partition Active:

When setting up your boot partition, you need only enough space to hold your kernel boot image, system.map, kernel config and if necessary, your initrd, 64 Megs should be plenty for your boot partition, but you may as always, use as much as you like. Many people have booted after setting up a Linux system, and booted to nothing, all because they simply forgotten to set the Boot partition as active.

To Set the boot partition active within fdisk, press a, and then select your boot partition from the list.

*Don't forget the swap:

Not necessary for systems with LARGE amounts of ram, but if you choose to set up a swap partion, then you will need to tell fdisk which partition your swap partition will be. So after you choose a size, it's Recommended between 1/2 to 1 1/2 your RAM, depends on how much ram you have, if you have 1gig + of RAM, then I suggest you use 1/2 to the amount of your ram upto the amount of ram you have, half your ram size would be good for 2 GB's of ram, if you have more, then consider disabling your swap space all together. it is still recommended you have a swap partition, but it's not necessary to have a large swap with large amounts of RAM.

To set the partition to "swap", press t, select the drive, then the type, which is 82 for swap.

A side note:

If you choose to set other optional partions, such as mounting /home on it's own partition, I always suggest you set up an extended partition, and then set up your optional partitions within the extended partition.

That's all i can think of for now.

Link to comment
Share on other sites

How big is gentoo? I think I have a copy of pretty much most of the distros, but I don't think I have that one. I might take the 10GB hdd I am working on and install Linux on it.

Link to comment
Share on other sites

How big is gentoo? I think I have a copy of pretty much most of the distros, but I don't think I have that one. I might take the 10GB hdd I am working on and install Linux on it.

<{POST_SNAPBACK}>

The live CD itself is only 1 CD, unless you choose to download the packages CD, which I don't recommend, because portage will always contain an update tree of software.

A typical gentoo install will work on 10 GB drive. Portage over all will need a working directory of about 2 Gigs (portage will use the /var/portage directory to work in),the actual OS isn't that large, If you choose Only one GUI, you can save alot of space, especially if you choose not to install Open office. (which will save about 100 megs or better) all in all it should only take about 3 - 7 gigs for it depending on what you choose to install along with portage. The boot drive will only need from 32 - 64 Megs depending on if you choose to compile your own kernel or use an initrd and Genkernel (Then I would suggest anyways that you remove whatever modules You absolutly will not need. Issue genkernel --menuconfig all, and it will allow you to compile what moduls and kernel options.)

Always remember to save compile time, never compile or bootstrap with java, So edit your use flags to exclude java like so

USE="-java"
or appending to any emerge command you do, the following.
USE="-java"
then type in emerge <options/flags> <pakagename> The best feature about emerge is you are able to check and see what use flags, and dependencies it will use by issuing the following flags to the emerge command.
emerge -pv <packagename>
the -pv will tell portage to Pretend to install and calculate all dependencies(v = verbose), this will also help you determine any blocks in some packages. Like a common one would be the ATI drivers, when you emerge ATI-drivers. You would most likely get a opengl-update-2.x.x is blocked by ATI-<driver version>. Simple fix is to append
ACCEPT_KEYWORDS="~x86"
Of course substituting x86 if you are using a different arch. I believe the arch for the Athlon 64 would be amd64, I'd have to double check. you can always check use flags by typing
man emerge
or
man use

This is only after you chroot in to your gentoo envrionment.

But eliminating the java use flag, and compiling your own kernel (Which is extremely simple, If you know what modules you actually need), Choosing the right software, and use flags, like if you're wanting to use gnome you'd set the "gnome gtk, gtk2 alsa" etc... emerge ufed early to allow for you to use ncurses to enable a GUI for setting use flags. Just not some are not necessary in the beginning. You save alot of time and space.

See if you choose say both KDE and Gnome use flags, most likely you'll encounter something that may want to install both GUI's, and if you only wanted to use one, you of course don't want this to happen. also using too many use flags in the beginning can slow down compile time. The beauty is you can always use the above command to select and deselect use flags while emerging ALL packages.

Gentoo is all about choices, so you need only install what You want. It's not like Mandrake or Red Hat/Fedora where they choose for you for alot of packages.

You know prolly a little too much info for what you're looking for. But it's helpful, and can help you in determining what you may need or not need.

As for storage of files, You can always download files to your windows drive while in windows, and mount them under linux. And the 2.6 kernel has experimental Write support for the NTFS filesystem.

Link to comment
Share on other sites

Thanks, mang. Looks like gentoo it is then.

Link to comment
Share on other sites

Thanks, mang. Looks like gentoo it is then.

<{POST_SNAPBACK}>

Good Luck. :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...