I love Linux so much and my favorite distrubtion is Gentoo. I love Linux so much that I have refused to install Windows on my workstation at work because I would rather have that friendly penguin in my computer at work. Our servers unfortunately run Windows 2003 with Terminal services providing access to our POS.
Initially we used CITRIX to share our POS and setting that up was fun, and I found that printing worked a lot better in Linux than it did with Windows. Just recently we implemented a VPN that uses Netextender from SonicWall. Currently I have not been able to get my Linux Box to jive with the VPN because I am not sure of how our Admin has set everything up. I assure you this, the day will be mine soon!
In the mean time I figured I’d blog about how I installed Gentoo Linux on my workstation. In this fine machine I have:
- AMD Athlon 64 3500+
- Asus A8V Motherboard
- 4×512 (2GB total) DDR400
- ATI Radeon 9600XT
- 80 GB HD, 120GB HD, 250GB HD, 320GBHD SATA Drives
Why all the hard drive you ask? I have so many for storage of CD images, Drivers, and VMs
First things first, we do the basic install of Gentoo, the guide can be found here.
Now that I have the base system installed it’s time to install and configure the system.
My workstation at work holds a lot of files. I would also like to share these files with my co-workers just because I’m a nice guy. In order to do this I had to set up a SAMBA server. Installation is pretty simple a simple:
Is all that it takes. After SAMBA is installed the next thing we have to do is configure it. There are three ways of doing this; by hand, using Swat, or webmin. I personally like webmin because not only does it administer SAMBA, but other services that I have on my workstation.
Under the global section you’ll find some important sections:
- workgroup – is the wrokgroup that the computer belongs to.
- netbios name – is the name of the computer. Whatever your host name is should be fine here.
- server string – is the text that’ll be displayed beneath the name of the computer.
- security – possible values are: share, user, server, domain and ads. To easily set up anonymous accounts, use share otherwise user will require user names.
My server doesn’t hold any secret data or anything and I could leave it as nothing more than a public share for everyone (everyone being me and my manager.) to dump files to. I figure it’s better safe than sorry.
First we want to set the guest account to an alias:
guest account = guest user
Next, we set up users:
# useradd -m -G users paulus
Add the user to the SAMBA database:
# smbpasswd -a paulus
Some say that sharing files on a Linux box is as easy as a Windows box. I personally think it’s easier. I personally think editing a config file is better than working with dialog boxes.
# echo "net-misc/ntp caps" >> /etc/portage/package.use
# emerge ntp
Edit the /etc/conf.d/ntp-client file:
NTPCLIENT_OPTS="-b -u north-america.pool.ntp.org"
Now we have to make sure the ntp client is run at startup:/etc/init.d/ntp-client start
rc-update add ntp-client default
It’s a good idea to make sure that the clock is accurate during shutdown so the next time the system boots up it’s going to be accurate before the ntp-client starts. Edit the /etc/conf.d/clock file:
The card that I have in my system is an ATI Radeon 9600XT. ATI isn’t really a bad company and recently I’ve grown kind of fond of their cards. The only down side to their cards is that their driver support is something to be desired. In Linux you really have to dink around with X and depending on if the card is in the laptop you may need to change some of the options in the BIOS.
Because I’m using an older ATI card that still uses the AGP interface I have to make sure that I have the AGP drivers compiled as modules. I’ve chosen to compile them as modules because for whatever reason, if I compiled them into the kernel I have run into problems in the past.
Under Loadable Module Support:
[*] Enable loadable module support
[*] Module unloading
Under Processor type and features:
[*] MTRR (Memory Type Range Register) support
Under Device Drivers->Character Devices:
[M] /dev/agpgart (AGP Support)
[M] AMD Opteron/Athlon64 on-CPU GART Support.
[M] VIA Chipset Support.
If the gentoolkit has not been installed yet, install it now and then run the equery command to make sure that xorg-x11 is not compiled with the dllloader use flag.
# emerge gentoolkit
# equery uses xorg-x11
Now we download the ATI drivers:
# emerge x11-drivers/ati-drivers
# env-update && source /etc/profile
Make sure that the drivers are loaded when the system boots. This is done by adding the module name in the /etc/modules.autoload.d/kernel-2.6 file:
Load the module into memory and switch to the ATI OpenGL Subsystem:
# modprobe fglrx
# eselect opengl set ati
Now comes the fun part of configuring XOrg. This is the part where if the config file isn’t written correctly X will start and mock you with a blank screen. I ran the aticonfig program:
# aticonfig --initial --input=/etc/X11/xorg.conf.example --output=/etc/X11/xorg.conf
In order to get my Acer AL1916 monitor working I had to add the HorizSync parameter or else it would just keep telling me that the input was out of range. The complete xorg.conf file can be downloaded here. You may need to change the BusID option in the Device section. Here’s what my Device section looks like:
Identifier "** ATI Radeon (generic) [radeon]"
Driver "fglrx" VideoRam 262144
Option "VideoOverlay" "on"
Option "UseFastTLS" "2"
I am aware that the 9600XT does have dual heads and it is possible for X to be set up to use both heads. Given that my desk is only so big and the fact that I do not have a need for more than one monitor I did not configure X to use more than one monitor. The VideoOverlay option makes it so programs such as mplayer can videos full screen.
At the end of the xorg.conf file I added some additional configuration for 3d acceleration and for beryl:
Option “Composite” “Disable”
Now comes the part where we get to emerge the Window Manager. I personal like gnome.
# emerge gnome gedit xscreensaver gdm gnome-system-tools gnomebaker ooqstart-gnome gnome-sepll gnome-applets gnome-vfs gnome-volume-manager gnome-audio gnome games gnome-utiles gnome-alsamixer gnome-netstatus gnome-nettool gnome-themes-extras smoothgnome
ATI + Beryl
As I said earlier ATI video cards aren’t bad cards. They just a little more delicate. In order to get Beryl working on an ATI card you will need to install XGL on the system. Unlike nVidia, ATI currently does not offer these XGL features in their closed source drivers.
The first step to installing Beryl is installing subversion with webdav enabled. By default this is disabled:
# echo "dev-util/subversion -nowebdav" >> /etc/portage/packages.use
# emerge subversion layman
# echo "source /usr/portage/local/layman/make.conf
# layman -a xeffects
After emerging the layman package we need to add the source to the portage overlay in the make.conf file. Once that’s done you can add the xeffects portage into the overlay. Next, add the following packages to the package.keywords and package.unmask files located in the /etc/portage directory.
Cairo needs to have glitz and svg enabled.
# echo "x11-libs/cairo glitz svg X" >> /etc/portage/package.use
Emerge pango and gtk+ against the new cairo package.
# emerge cairo pango gtk+
Check to make sure that glproto and libdrm are installed.
# emerge -av glproto libdrm
Now we install the actual server:
# emerge -av xgl mesa
After everything is done cairo should be a dependency on the system. You can check to see if everything worked by typing:
# equery d -o -p cairo
To update the overlay simply issue the following command:
# layman -s xeffects
After xgl is installed we can test it by starting X and issuing this command in a terminal:
$ Xgl :1 -ac -accel glx:pbuffer -accel xv:pbuffer -fp /usr/share/fonts/misc
$ DISPLAY=:1 xterm &
If everything goes right then we now must configure GDM. This can be done one of two ways. The first way can be done by logging in and running the gdmsetup program or at the GDM login screen:
Under Actions, put in the root password.
Click on the Security tab.
Click on the Configure X Server button.
Delete the existing Server under Servers to Start by highlighting it, and clicking the Remove button.
Click on the Add/Modify button to use a new server. Give it VT1, give it the Standard profile with no options.
Under Server Settings change the name to Xgl and edit the command: /usr/bin/Xgl -ac -accel glx:pbuffer -accel xv:pbuffer
Save and close.
Even though I have an Athlon 64 in my computer, I chose not to use the x86_64 achitecture. The main reason for this is because sometimes it’s a pain to get things working. Plus, I only have 2 GB of RAM.
# echo "www-client/mozilla-firefox java" >> /etc/portage/package.use
# echo "dev-java/sun-jre-bin nsplugin" >> /etc/portage/package.use
# emerge netscape-flash mozilla-firefox sun-jre-bin
Let the programs download and install. When they’re done. In the event that you are using the x86_64 architecture, then you should use the blackdown-jre:
# echo "dev-java/blackdown-jre nsplugin" >> /etc/portage/package.use
# emerge blackdown-jre
Make sure that the JRE or JDK is selected:
# eselect java-nsplugin list
# select java-nsplugin set sun-jdk-1.6
Of course, the version that is being selected will differ as updates are installed.
# locate javaplugin_oji.so
Create a link so that the JVM can use the Java plugin:
# ln -s /opt/sun-jdk-1.6.0.02/plugin/i386/ns7/libjavaplugin_oji.so /opt/netscape/plugins/
Auto Mount with ivman and gnome-volume-manager
This allows the system to automatically handle the event of someone plugging in an USB storage device. Make sure that the hal use flag is used in the make.conf file.
# emerge gnome-volume-manager ivman Since gnome 2.12 users must be a part of the plugdev group in order removable media to be mounted upon insertion.
# emerge -1 linux-headers
# emerge -1 glibc
# rc-update add hald default
# rc-update add dbus default
# rc-update add ivman default
# gpasswd -a paulus plugdev
Replace paulus with your user name. That’s it, pretty straight forward. You can use the either the udev or the ivman to perform specific tasks depending on what hardware you connect. I will save that for another post.
All files that were mentioned in the blog can be downloaded by clicking on their link: