Archive for the ‘Software’ Category

By default, in windows 7, it automatically fills in the username of the last logged on user. So all that is required to be entered is the password. I would rather the login screen just show an empty username box and password box. Do the following:

Start -> Search -> secpol.msc

Navigate to Local Policies -> Security Options

Interactive logon: Do not display last user name

Change to Enabled.

Using parted to create partitions on 3TB raid on our new server.

[root@server ~]# parted /dev/sdb
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            

Model: AMCC 9650SE-8LP DISK (scsi)
Disk /dev/sdb: 3000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost.
Do you want to continue?
parted: invalid token: gpt
Yes/No? Yes                                                               
New disk label type?  [gpt]?                                              
(parted) mkpart primary 0 -0                                              
(parted) print

Model: AMCC 9650SE-8LP DISK (scsi)
Disk /dev/sdb: 3000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  3000GB  3000GB               primary       

(parted) quit                                                             
Information: Don't forget to update /etc/fstab, if necessary.             

[root@server ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
366215168 inodes, 732406263 blocks
36620313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22352 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@server ~]# tune2fs -c0 -i0 /dev/sdb1
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds

We got a couple of new Supermicro Superservers (sys-5026t-tb) that I was planning to set up as dual-boot computers. I installed windows xp fine and did a kickstart install of RHEL5. The installation went fine, but after rebooting, every time I tried to boot to linux I would get this error:

Unable to access resume device (LABEL=SWAP-sdb2)
mount: could not find filesystem '/dev/root'
setuproot: moving /dev/failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - no syncing: Attempted to kill init', -12000

The problem was that, even though it installed the operating system, it did not load the sata drivers. I had this problem before and could just go in and edit /etc/modprobe.conf to alias scsihostadapter ahci from ata-piix. But the problem I was having now, is that the ahci drivers were never installed. I got a file from Supermicro that was supposed to fix this, but I was having a problem installing it when I boot into rescue mode.

I did find out that the reason that it was not installing the driver was due to the presence of the dvd drive that I was using to boot. So, my solution was to take out the dvd drive and boot from a usb flash drive. I did the installation that way and things worked just fine. I could probably reconnect the dvd drive and use it now, but I’ve decided that I really don’t need it, as I install most software from the network.

The package ttfonts-zh_CN has been replaced in RHEL5 with fonts-chinese.

gcc vme7700_blocktransfer_dma.c -lvme -o outputfile

I had some problems installing rhel5-client on a few of our machines. First off, it wouldn’t automatically register with our RHEL Satellite Server. I was given a file bootstrap.sh from the guy running it which solved that problem. Next, it wouldn’t upgrade because some packages kept having depsolving errors. This was solved by removing the following packages:

gcc-gfortran-4.1.2-46.el5.x86_64
gcc-c++-4.1.2-46.el5.x86_64
libstdc++-devel-4.1.2-46.el5.x86_64

After that, things could be upgraded ok.

I just installed a new RHEL5 (x64) system and got an error when trying to run virtuoso.

[ ~/oa]$ virtuoso
/net/sw/cad.rh/ic/ic61/tools/dfII/bin/32bit/virtuoso: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file o
r directory

Weird that it was complaining about a 32bit version of something when this is a 64bit os.

It was fixed because I didn’t have libelf installed. I also found that I needed to install libXp. Here’s the log of what I did.

[ ~ ]$ yum install elfutils-libelf
Loaded plugins: rhnplugin, security
Setting up Install Process
Package elfutils-libelf-0.137-3.el5.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package elfutils-libelf.i386 0:0.137-3.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================================
 Package                                      Arch                              Version                                   Repository                                     
    Size
=========================================================================================================================================================================
Installing:
 elfutils-libelf                              i386                              0.137-3.el5                               rhel-x86_64-client-5                           
    58 k

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

Total download size: 58 k
Is this ok [y/N]: y
Downloading Packages:
elfutils-libelf-0.137-3.el5.i386.rpm                                                                                                                       |  58 kB     0
0:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : elfutils-libelf                                                                                                                                       
     1/1 

Installed:
  elfutils-libelf.i386 0:0.137-3.el5               

Complete!
[ ~ ]$ virtuoso
/net/sw/cad.rh/ic/ic61/tools/dfII/bin/32bit/virtuoso: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory

[ ~ ]$ yum install libXp
Loaded plugins: rhnplugin, security
Setting up Install Process
Package libXp-1.0.0-8.1.el5.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================================
 Package                              Arch                                Version                                       Repository                                       
    Size
=========================================================================================================================================================================
Installing:
 libXp                                i386                                1.0.0-8.1.el5                                 rhel-x86_64-client-5                             
    22 k

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

Total download size: 22 k
Is this ok [y/N]: y
Downloading Packages:
libXp-1.0.0-8.1.el5.i386.rpm                                                                                                                               |  22 kB     0
0:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libXp                                                                                                                                                 
     1/1 

Installed:
  libXp.i386 0:1.0.0-8.1.el5                                                                                                                                             
         

Complete!
[ ~ ]$ virtuoso

Things started just fine.

Edit /etc/sysconfig/rhn/sources and add the following:

### Dag RPM Repository for Red Hat Enterprise Linux
yum dag http://apt.sw.be/redhat/el4/en/$ARCH/dag

Now can get perl modules here instead of from cpan (which causes me a lot of problems for some reason).

[root@server ~]$ up2date perl-IO-Socket-SSL

Had a weird problem come up today. I reboot one of our systems and it would not come up. Actually, it apparently was working, just ridiculously slowly. I thought it had hung at the Starting udev line, but letting it run for an hour, got it a few lines further down. Nonetheless, something was definitely wrong. I tried my usual ideas of adding apm=off acpi=off noapci noapmd, but that didn’t help. It seemed like the disk was bad, but not with the usual messages that I would get.

I brought out a RHEL installation disk and boot into rescue mode. I did get an error about it not being able to find all of the current linux installations. I then went into the bios and found that this computer was set up to have its sata disks act like ide ones. I’m pretty sure that I did this when I originally installed because it wouldn’t recognize the drives as ahci. However, I’m also sure that they should be ahci, which is newer, instead of acting like the old ide. So I changed this to ahci, even though I was sure this was going to cause more problems. (I was right about the last part.)

I then again, did a linux rescue. For some reason, I no longer got the error about not finding all my linux installations. I could run chroot /mnt/sysimage to get my installation mounted properly. Then, I copied /etc/modules.conf to /etc/modules.conf.SAVE. I knew that I needed to change the modules that were loaded to reflect ahci drives instead of ide ones. So I edited this line:

alias scsi_hostadapter1 ata_piix

to

alias scsi_hostadapter1 ahci

This would work for after the kernel is loaded, but I needed to make sure the ahci module was loaded at boot. For this, I needed to make a new initrd image. I used the following:

mkinitrc --preload=ahci \\
/boot/initrd-2.6.9-89.0.3.ELhugemem.mary.img \\
2.6.9-89.0.3.ELhugemem

Then, I edited /etc/grub.conf to take this initrd file instead of the one it had. And lastly, to make sure it was using the proper disk. For some reason, my disk devices would change from /dev/sda and /dev/sdb to /dev/sdb and /dev/sdc. Instead of putting the device names in /etc/grub.conf, I used the labels.

kernel /vmlinuz-2.6.9-89.0.3.ELhugemem ro root=/dev/sda3 rhgb quiet

I also used the labels in /etc/fstab.

LABEL=/1                   /                       ext3    defaults        1 1
LABEL=/boot	        /boot                   ext3    defaults        1 2

After I reboot and everything worked, I renamed the initrd file without the mary bit, thus overwriting the original.

One thing I was worried about was whether I would have to do this each time I updated the kernel. Fortunately, there was a kernel update ready, so I installed it. The initrd file that came in worked perfectly. I didn’t have to do anything special.

I had to reinstall a computer with XP. It would boot off the cd ok, but then after the “Setup is inspecting your computer’s hardware configuration” message came up, it wouldn’t do anything. It was just a blank screen. I ran memtest to check the memory and it all came up clean. I did notice that the light for hard drive activity would be constantly lit when the screen was blank. However, I had no problem at all in installing linux on this computer. So, I used a live cd of Damn Small Linux (DSL) to boot. Then I ran the following command:

# sudo fdisk /dev/hda

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Command (m for help): w

After this, the windows installation worked fine.