Archive for the ‘Machine Specific’ Category

Go to the elog website and log into one of the logbooks (say DRS4).

Go to “Config”

Go to “Change config file”

Select “Create new logbook”

Give it a name and use template or template_password as the template.

Under “Config” you can add a new user. Don’t check any boxes by subscribe to logbooks. This sends these people email each time a post is made.

Our VME system is somewhat old, running Scientific Linux 4.7. Unfortunately, I was never able to get a newer version of the operating system working with these computers.

I needed to compile a program on this system. And the first attempt gave me tons of errors:

[root@wahcrate koto]# gcc adclossless.c -o adclossless -lvme
In file included from /usr/include/stdio.h:28,
                 from adclossless.c:1:
/usr/include/features.h:1: error: stray '\31' in program
/usr/include/features.h:1: error: stray '\139' in program
/usr/include/features.h:1: error: stray '\8' in program
/usr/include/features.h:1: error: stray '\2' in program
/usr/include/features.h:1: error: stray '\3' in program

Since I can’t really update this program, my hack to get this working was to copy any header files that were causing errors from a different computer. I copied the following files from a system running Red Hat Enterprise Linux, version 5.

/usr/include/features.h
/usr/include/gconv.h
/usr/include/alloca.h
/usr/include/errno.h
/usr/include/fcntl.h
/usr/include/getopt.h

In case this caused any problems, I renamed the old files first to .OLD. Lastly, the compilation complained about the file /usr/include/endian.h not being present. So I copied that file too.

After that the compilation worked.

[root@wahcrate koto]# gcc adclossless.c -o adclossless -lvme
/tmp/cc5q5khk.o(.text+0x270): In function `main':
: warning: the `gets' function is dangerous and should not be used.

I was also able to start the program.

[root@wahcrate koto]# ./adclossless 

 *************************************************** 
 *****     Beam Test Program for FADC Board     **** 
 *************************************************** 

(Slot:4 type:"none")>>help


    Commands:   read 
    Commands:   write    < value> 
    Commands:   read_vme  slot_number address 
    Commands:   write_vme slot_number address value 

    Commands:   run lb  <2.5, 3.125> 
    Commands:   run dc  
    Commands:   run db  
    Commands:   run ec  
    Commands:   run rnt  

    Commands:   reset_reg     
    Commands:   set slot_number   <1-21>
    Commands:   show
    Commands:   Exit,exit,q 


(Slot:4 type:"none")>>q

Unfortunately, at this point, I have no idea if it will work, since I don’t know how to use it. I will wait and see if it works for the student.

Matt requested that /proc/sys/vm/overcommit_memory is set to 2 on some nodes. To do this, edit /etc/sysctl.conf. To the end of the file, add this line:

vm.overcommit_memory = 2

To make it take effect without rebooting, run:

sysctl -p

After a drive failure on one of our servers, I had to remake the quota info. Here’s what I did:

[root@serv1 home]# touch /local/home/aquota.user
[root@serv1 home]# chmod 600 /local/home/aquota.user
[root@cppc home]# quotacheck -vgum /local/home
quotacheck: WARNING -  Quotafile /local/home/aquota.user was probably truncated. Can't save quota settings...
quotacheck: Scanning /dev/sda1 [/local/home] |

Now I could just reset all the user quotas for things to work.

[root@serv1 home]# setquota -u user1 1000000 1500000 200000 300000 -a

I had already mounted the disk with the correct options, but make sure /etc/fstab looks like:

/dev/sda1		/local/home		ext3	defaults,usrquota	1 2

I also then also restarted nfslock, which may or may not have needed to be done. This could have been a totally unrelated problem we were having at the same time.

Some csh and tcsh users get automatically logged out of systems after 60 minutes of inactivity. To disable this, add to .cshrc file:


# Disable the autologout
unset autologout

You can see the current settings by running the set command.

The elog program wants a server.crt and server.key file. We can make both with the Makefile in /etc/pki/tls/certs. However, these files will have a passphrase on them. This is bad because we want the elog program to start automatically at boot. If a passphrase is required, this won’t work. So we need to take the passphrase off.


make server.key
mv server.key server.key.withpassphrase
openssl rsa -in server.key.withpassphrase -out server.key
make server.crt

We have a computer running linux that we’d like to make dual-boot. Normally when I do this, I install windows first and then linux, so the grub works on the master boot record. By installing windows second, it’s going to screw up our mbr and we won’t be able to boot to linux without some changes.

We have a second problem, in that, I could not get the windows installation disk to run with the linux disk connected. (My initial plan was to keep linux on the first sata disk and install windows on a second sata disk.) This was solved by disconnecting the linux disk and hooking up a blank disk to use for windows. With just the new setup, the windows install proceeded as it normally does.

Ok, windows is installed and I’m booting into rescue mode on an RHEL 5 disk. First problem, it doesn’t like the disk I’m using. Solution is to not say the disk is local, but to use a network image from our RHEL Satellite Server. This means that I have to set up networking now too. Small delay…

It took a while to boot, but it finally came up. First problem was that it didn’t like any of my other disks, one of which, is where I installed windows. So I had to say ‘No’ to initializing all these disks because it would erase my windows installation. Now at sh-3.2# prompt, need to do:

sh-3.2# chroot /mnt/sysimage

In my /etc/fstab, the / and /boot filesystems are mounted using their label, so I don’t need to change anything there. Fdisk -l /dev/sda, shows that this is the windows disk. So, I want to install grub on /dev/sda. First edit /etc/grub.conf and add WinXP section.

title WindowsXP
  rootnoverify (hd0,0)
  chainloader +1

and change all the root(hd0,0) in the linux sections to root(hd1,0) because I switched the order of the drives in the computer.

Then, install:

sh-3.2# grub-install /dev/sda

Got an error that /dev/sdb1 does not have any corresponding bios drive. So need to edit /boot/grub/device.map.

# this device map was generated by anaconda
(hd0) /dev/sda
(hd1) /dev/sdb

Rerun grub-install:

sh-3.2# grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not.  If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(hd0) /dev/sda
(hd1) /dev/sdb

Reboot and grub starts. WindowsXP is a selection. First, check if linux will boot. Worked ok. Check Windows, works ok too. Now can go in and install drivers and everything else required for Windows.

First, needed to install git. Can get it with yum if have rpmforge installed.

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

The above command installs rpmforge-release. Now can install git with yum.

[root@server yum.repos.d]# yum install git
Loaded plugins: rhnplugin, security
rpmforge                                                                                                              | 1.1 kB     00:00     
rpmforge/primary                                                                                                      | 3.5 MB     00:01     
rpmforge                                                                                                                           9732/9732
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.i386 0:1.5.2.1-1.el5.rf set to be updated
--> Processing Dependency: perl(SVN::Ra) for package: git
--> Processing Dependency: perl(SVN::Core) for package: git
--> Processing Dependency: perl(Git) for package: git
--> Processing Dependency: perl(SVN::Delta) for package: git
--> Running transaction check
---> Package perl-Git.i386 0:1.5.2.1-1.el5.rf set to be updated
--> Processing Dependency: perl(Error) for package: perl-Git
---> Package subversion-perl.i386 0:1.6.6-0.1.el5.rf set to be updated
--> Processing Dependency: subversion = 1.6.6-0.1.el5.rf for package: subversion-perl
--> Running transaction check
---> Package perl-Error.noarch 0:0.17015-1.el5.rf set to be updated
---> Package subversion.i386 0:1.6.6-0.1.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================
 Package                              Arch                        Version                                Repository                     Size
=============================================================================================================================================
Installing:
 git                                  i386                        1.5.2.1-1.el5.rf                       rpmforge                       27 M
Installing for dependencies:
 perl-Error                           noarch                      0.17015-1.el5.rf                       rpmforge                       27 k
 perl-Git                             i386                        1.5.2.1-1.el5.rf                       rpmforge                       18 k
 subversion-perl                      i386                        1.6.6-0.1.el5.rf                       rpmforge                      2.3 M
Updating for dependencies:
 subversion                           i386                        1.6.6-0.1.el5.rf                       rpmforge                      6.5 M

Transaction Summary
=============================================================================================================================================
Install      4 Package(s)         
Update       1 Package(s)         
Remove       0 Package(s)         

Total download size: 36 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): perl-Git-1.5.2.1-1.el5.rf.i386.rpm                                                                             |  18 kB     00:00     
(2/5): perl-Error-0.17015-1.el5.rf.noarch.rpm                                                                         |  27 kB     00:00     
(3/5): subversion-perl-1.6.6-0.1.el5.rf.i386.rpm                                                                      | 2.3 MB     00:01     
(4/5): subversion-1.6.6-0.1.el5.rf.i386.rpm                                                                           | 6.5 MB     00:02     
(5/5): git-1.5.2.1-1.el5.rf.i386.rpm                                                                                  |  27 MB     00:14     
---------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                        1.8 MB/s |  36 MB     00:19     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : subversion                                                                                                            1/6 
  Installing     : perl-Error                                                                                                            2/6 
  Installing     : subversion-perl                                                                                                       3/6 
  Installing     : git                                                                                                                   4/6 
  Installing     : perl-Git                                                                                                              5/6 
  Cleanup        : subversion                                                                                                            6/6 

Installed:
  git.i386 0:1.5.2.1-1.el5.rf                                                                                                                

Dependency Installed:
  perl-Error.noarch 0:0.17015-1.el5.rf           perl-Git.i386 0:1.5.2.1-1.el5.rf           subversion-perl.i386 0:1.6.6-0.1.el5.rf          

Dependency Updated:
  subversion.i386 0:1.6.6-0.1.el5.rf                                                                                                         

Complete!

In our RHEL5 monitoring station with 10 monitors, we’ve been having some problems with crashes. Turns out that the kernel we were using, which was the standard kernel, would not access all of the ram in our system. (Currently 4GB) By installing and running the PAE (Physical Address Extension) kernel, we are now able to get all the ram in our system.

Old kernel and ram:

[~]# more mem1.txt
Linux monstation 2.6.18-164.2.1.el5 #1 SMP Mon Sep 21 04:37:51 EDT 2009 i686 i686 i386 GNU/Linux
total used free shared buffers cached
Mem: 2265 938 1327 0 191 605
-/+ buffers/cache: 141 2124
Swap: 1027 0 1027
Total: 3293 938 2355

New kernel and ram:

[~]# more mem-PAE.txt
Linux monstation 2.6.18-164.2.1.el5PAE #1 SMP Mon Sep 21 04:45:05 EDT 2009 i686 i686 i386 GNU/Linux
total used free shared buffers cached
Mem: 4043 837 3205 0 65 569
-/+ buffers/cache: 202 3841
Swap: 1027 0 1027
Total: 5071 837 4233

I’ve ordered four more gb of ram for this system, so we’ll have it maxed out at 8gb.

On one computer, I was having some problems running yum upgrade. It would complain that a dependency wasn’t installed. However, I could rpm -q that dependency and it showed up fine. To fix this, simply uninstall the package that was the dependency and then run upgrade. That should cause the dependency to be automatically downloaded and installed.

[root@server rhn]# yum upgrade
Loaded plugins: rhnplugin, security
Skipping security plugin, no data
Setting up Upgrade Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package dmraid.i386 0:1.0.0.rc13-53.el5 set to be updated
--> Processing Dependency: dmraid-events for package: dmraid
---> Package fetchmail.i386 0:6.3.6-1.1.el5_3.1 set to be updated
---> Package firefox.i386 0:3.0.14-1.el5_4 set to be updated
---> Package net-snmp.i386 1:5.3.2.2-7.el5_4.2 set to be updated
---> Package net-snmp-libs.i386 1:5.3.2.2-7.el5_4.2 set to be updated
---> Package nspr.i386 0:4.7.5-1.el5_4 set to be updated
---> Package xulrunner.i386 0:1.9.0.14-1.el5_4 set to be updated
--> Running transaction check
---> Package dmraid-events.i386 0:1.0.0.rc13-53.el5 set to be updated
--> Processing Dependency: sgpio for package: dmraid-events
--> Finished Dependency Resolution
dmraid-events-1.0.0.rc13-53.el5.i386 from rhel-i386-server-5 has depsolving problems
  --> Missing Dependency: sgpio is needed by package dmraid-events-1.0.0.rc13-53.el5.i386 (rhel-i386-server-5)
Error: Missing Dependency: sgpio is needed by package dmraid-events-1.0.0.rc13-53.el5.i386 (rhel-i386-server-5)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
[root@server rhn]# rpm -e sgpio
[root@server rhn]# yum upgrade
Loaded plugins: rhnplugin, security
Skipping security plugin, no data
Setting up Upgrade Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package dmraid.i386 0:1.0.0.rc13-53.el5 set to be updated
--> Processing Dependency: dmraid-events for package: dmraid
---> Package fetchmail.i386 0:6.3.6-1.1.el5_3.1 set to be updated
---> Package firefox.i386 0:3.0.14-1.el5_4 set to be updated
---> Package net-snmp.i386 1:5.3.2.2-7.el5_4.2 set to be updated
---> Package net-snmp-libs.i386 1:5.3.2.2-7.el5_4.2 set to be updated
---> Package nspr.i386 0:4.7.5-1.el5_4 set to be updated
---> Package xulrunner.i386 0:1.9.0.14-1.el5_4 set to be updated
--> Running transaction check
---> Package dmraid-events.i386 0:1.0.0.rc13-53.el5 set to be updated
--> Processing Dependency: sgpio for package: dmraid-events
--> Running transaction check
---> Package sgpio.i386 0:1.2.0_10-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package                  Arch            Version                         Repository                     Size
==============================================================================================================
Updating:
 dmraid                   i386            1.0.0.rc13-53.el5               rhel-i386-server-5            718 k
 fetchmail                i386            6.3.6-1.1.el5_3.1               rhel-i386-server-5            527 k
 firefox                  i386            3.0.14-1.el5_4                  rhel-i386-server-5             12 M
 net-snmp                 i386            1:5.3.2.2-7.el5_4.2             rhel-i386-server-5            696 k
 net-snmp-libs            i386            1:5.3.2.2-7.el5_4.2             rhel-i386-server-5            1.3 M
 nspr                     i386            4.7.5-1.el5_4                   rhel-i386-server-5            119 k
 xulrunner                i386            1.9.0.14-1.el5_4                rhel-i386-server-5             10 M
Installing for dependencies:
 dmraid-events            i386            1.0.0.rc13-53.el5               rhel-i386-server-5             22 k
 sgpio                    i386            1.2.0_10-2.el5                  rhel-i386-server-5             11 k

Transaction Summary
==============================================================================================================
Install      2 Package(s)         
Update       7 Package(s)         
Remove       0 Package(s)         

Total size: 25 M
Total download size: 25 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): nspr-4.7.5-1.el5_4.i386.rpm                                                     | 119 kB     00:00     
(2/6): fetchmail-6.3.6-1.1.el5_3.1.i386.rpm                                            | 527 kB     00:00     
(3/6): net-snmp-5.3.2.2-7.el5_4.2.i386.rpm                                             | 696 kB     00:00     
(4/6): net-snmp-libs-5.3.2.2-7.el5_4.2.i386.rpm                                        | 1.3 MB     00:00     
(5/6): xulrunner-1.9.0.14-1.el5_4.i386.rpm                                             |  10 MB     00:01     
(6/6): firefox-3.0.14-1.el5_4.i386.rpm                                                 |  12 MB     00:01     
--------------------------------------------------------------------------------------------------------------
Total                                                                         5.3 MB/s |  25 MB     00:04     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : nspr                                                                                  1/16 
  Updating       : xulrunner                                                                             2/16 
  Updating       : net-snmp-libs                                                                         3/16 
  Installing     : sgpio                                                                                 4/16 
  Updating       : net-snmp                                                                              5/16 
  Updating       : fetchmail                                                                             6/16 
  Updating       : firefox                                                                               7/16 
  Updating       : dmraid                                                                                8/16 
  Installing     : dmraid-events                                                                         9/16 
  Cleanup        : nspr                                                                                 10/16 
  Cleanup        : net-snmp-libs                                                                        11/16 
  Cleanup        : firefox                                                                              12/16 
  Cleanup        : net-snmp                                                                             13/16 
  Cleanup        : xulrunner                                                                            14/16 
  Cleanup        : fetchmail                                                                            15/16 
  Cleanup        : dmraid                                                                               16/16 

Dependency Installed:
  dmraid-events.i386 0:1.0.0.rc13-53.el5                      sgpio.i386 0:1.2.0_10-2.el5                     

Updated:
  dmraid.i386 0:1.0.0.rc13-53.el5     fetchmail.i386 0:6.3.6-1.1.el5_3.1       firefox.i386 0:3.0.14-1.el5_4  
  net-snmp.i386 1:5.3.2.2-7.el5_4.2   net-snmp-libs.i386 1:5.3.2.2-7.el5_4.2   nspr.i386 0:4.7.5-1.el5_4      
  xulrunner.i386 0:1.9.0.14-1.el5_4  

Complete!
[root@server rhn]#