OSes‎ > ‎

CentOS

CentOS Linux Tips

Update (8/17/2017)

Installing CentOS 7 on the Oracle virtual machine.  Taking the DVD won't install GUI at all (compared with others like Ubuntu or OpenSUSE).  See below.

Update (7/22/2011)

Do not install CentOS 6 on Oracle VirtualBox at this time. I encountered so many problems.  GUI install hangs.  Yum update installed the new kernel which could not be booted.  Trying the older version caused panic.   Since CentOS 5 is running fine.  I suspects CentOS 6 is the cause.

Update (7/21/2011)

The issue of running VirtualBoxAddition "CD" was fixed at CentOS 6 so that you just right click on the VirtualBoxAdditions "CD" and run. When I tried to update using GUI (System->Administration->Software Update) after the installation of CentOS 6, the GUI seemed to hang.   On the other hand, the old truthful "yum update" worked fine with lots of info printed on the way.

Update (7/7/2011)
I don't have a separate installation of CentOS anymore.  Instead I have a virtual CentOS 5 hosted by Oracle VirtualBox.   The reason is that the VirtualBox hardware emulation does not require rebuilding kernels to support my hardware.   Essentially I was tired of updating kernels every few months.  CentOS under VirtualBox still needs custom handling compared with Ubuntu.  VirtualBox Guest Addition.iso is mounted, but it does not run due to the shell missing commands.  Open the console, become su, and go to the CD and just run the shell command named "VBoxLinuxAdditions.run". 

The Linux distribution,CentOS www.centos.org, is built from RHEL4 (RedHat Enterprise Linux) source rpms. This is different from Fedora Linux, which is a communitydeveloped version. I found that Fedora is changing too fast. I wanted to have a rather stable version. I'm also used toRedHat way of doing administering Linux and I'm more confortablewith RedHat way than SuSE way. I just discovered that SuSE 9.2distribution as default does not install any development tools likekdevelop and header files.

I upgraded my RedHat9 (which has been updated by Fedora Legacy) to CentOS.I downloaded CentOS 4.1 iso images (4 CDs) from a mirror site. I was nerveous about upgrading, rather than installing. It actually went well, I thought.
Update: I had to retry using CentOS 4.2 DVD iso due to the problem withgrub problem. I tried to use grub for the boot screen and evenwith --force-lba, it fails to boot at /dev/hda10 (root (hd0,9))due to the fact that the grub does not understand LBA. It has been blamedto the BIOS. However, this must be wrong, since my LILO with lba32 canboot without problems. The lesson: if you install CentOS at (hd0,9), youcannot use grub but lilo with lba32 option unless you have FAT32 in the first boot partition.

Update: it is now CentOS 4.4 as of Sept. 4th, 2006. Except version number changes of various software, the following tipsstill work as I worked through all the fixes to make my laptopwork under CentOS 4.4 kernels.

I became too audacious to upgrade my PC to Athlon64 +3500 with ASUS A8N-VM CSM, which uses nForce4. It turned out that this is a very challenging taskin that nForce4 is too new for CentOS4.2 x86_64(Linux 2.6.9 so that there are nosupport for it). In addition, ASUS BIOS 0506 and 0702 are broken for ACPI so that the system is haunted by problems. See below for experiences and solutions.
Update (6/3/2006): finally ASUS fixed the BIOS problem with BIOS 1001.You should update the BIOS to this version to avoid lot of headaches.

Because of the grub problem above, I must CentOS boot installed in the first partition where WinXP resides (fortunately the partition is not NTFS butFAT32) (otherwise CentOS could not boot using grub).

Index


How can I have a GUI desktop for CentOS7?

First you have to connect to network. Do "dhclient" to get connected.This is due to "ONBOOT=No" in /etc/sysconfig/network-scripts/ifcfg-enp0s3 (This is for CentOS 7).Change it to yes. Then do


  # yum -y groups install "GNOME Desktop"  
  # systemctl set-default graphical.target
  
Then reboot. In order to work with Oracle VirtualBox, then you have to install

  # yum install kernel-devel-3.10.0-514.el7.x86_64
  # yum install gcc
  
Then do VirtualBox Guest Addition install. This time kernel modules will be built OK. Now the shared directory is mounted but the permission is screwed. You have to do the following:

  # usermod -aG vboxsf (username)
  
For verification, you look at /etc/group for vboxsf.   In order to install fortran and bz2, you do

  # yum install gcc-gfortran
  # yum install bzip2-devel
  

How can I upgrade RedHat 9 to CentOS?

Download four CD iso images and burn them into four CDs.Download mirror sites can be had from www.centos.org. Currently it is CentOS 4.1.

Do backup the system so that you can get the old system back easily.I use dd (See here) tocopy the entire disk to another disk.

Put the disk 1 into the CD drive and reboot. When it produces the menuyou type the command line as follows:


  linux upgradeany
  

Without this command, you cannot do the upgrade but install fresh, i.e.you have to remove or create a partition for the install.When I did "upgradeany", it detected my RedHat 9 install partition correctly.I tell the installer to upgrade. It complained about foreign packages....(I forgot exact word it told me). I told it to continue.The install went rather smooth. It rebooted fine, except not havingntfs file system driver (SuSE installs it automatically). See below.

Then I tried to update the system using CentOS Network.It complained about three packages:


  galeon-1.2.14-09.90.4.legacy
  php-manual-4.2.2-17.14.legacy
  koffice-1.2.1-7
  
I removed these packages by "rpm -e (packagenames)".

I downloaded the ntfs driver from linux-ntfs.sourceforge.net/rpm/rhel4.htm. I make surethat I download the current CentOS linux version 2.6.9-11.EL, whichis version 4.1 of CentOS (you check by uname -a).

The problem started when I did up2date for all components it recommendedto update. Somehow, it complained about cvs package which does not have thecorrect signature. The mistake I made was to say "continue". The end resultwas that the up2date failed in the middle. The worst thing is that "up2date" thinks that everything is fine. It ended up missing the "fixed" fonts forX and thus X server could not start anymore. I found this out by looking at /var/lob/Xorg.0.log. Fortunately, I had the dd backup.I just dd the old Linux partition from the backup disk to the current disk again, using a CDROM distribution Knoppix.

This time I removed the nvidia driver by issuing


  nvidia-install --uninstall
  
and rebooted the system. I made sure that I won't update the entirething but picking smaller chunk at a time in up2date.

The surprize is that when it booted, I was greeted by "RedHat 9" message.It turned out that the upgrade does not edit /etc/redhat-releasefile. You must forcefully install centos-release-4.2.1.rpm orsimilar (version different) (rpm will complain the file dependencyproblem). If you do, then this rpm will replace /etc/redhat-releasefile to have


  CentOS release 4.2 (Final)
  

Top


How can I add more software?

CentOS uses yum by default. Its configuration file is in/etc/yum.repos.d/CentOS-Base.repo. As default, the centosplus, contrib, and testing are not enabled (enabled=0). You can also add dag wieers site (go there andfind out how to add to the yum list).


  $ yum install $package Example  
  $ yum install gsl  
  $ yum install gsl-devel  
  $ yum list                
  (you can get all available packages listed.)
  

Top


How can I enable IIIMF regardless of locale

CentOS4/RHEL4/Fedora4 come with the new language input method calledIIIMF. The easiest way is to set your language at thelogin screen. Sometimes you want to enable IIIMF regardless of localein the current environment. Here is how:http://fedora.redhat.com/project/i18n/iiimf-faq.html#R2.


  To enable IIIMF regardless locale in your current user environment:   
  $ mkdir ~/.xinput.d   
  $ ln -s /etc/X11/xinit/xinput.d/iiimf ~/.xinput.d/defaultCreate a file   
  $ touch ~/.i18nEdit the content of this file to have
    LC_TYPE = jp_JP.UTF8.
  To enable IIIMF in your current user environment on specific locale (i.e. en_US):   
  $ mkdir ~/.xinput.d   
  $ ln -s /etc/X11/xinit/xinput.d/iiimf ~/.xinput.d/en_US
  
Then restart X.

The pain in IIIMF is the default hot-key for conversion:space. Unfortunately this is the key combination formark under emacs. The iiimf-le-tools for CentOS cannot changethis combination. You have to use @ for emacs mark (what !@#$). Fedora 4 has the version 12.2 and thus youcan change hotkeys as seen in how to mod iiimf hotkey.

Top


How can I compile the latest kernel?How can I make my IDE drive to use DMA?

Under my old PC, CentOS was able to set IDE to use DMA. Unfortunately,CentOS kernel 2.6.9 has no idea about nForce4 (MPC51). After searchingweb for notes (Linux forum at nvidia site is very helpful), I foundthat nForce4 support is in only from Linux kernel 2.6.12 on (Knoppix 4.0.2uses this version). I tried to patch using the latest 2.6.15 but it seemsnot working. I dived to get the kernel source from http://www.kernel.org and finally my hard disk can do DMA.


  download the kernel source into /usr/src/kernels/linux-2.6.15.1  
  # make menuconfig     ("menu xconfig" and "menu gconfig" are broekn on CentOS 4.2).  
  # make bzImage  
  # make modules  
  # make modules_install  
  # /sbin/mkinitrd /boot/initrd-2.6.15.img 2.6.15.1  
  # mv arch/x86_64/boot/bzImage /boot/bzImage-2.6.15.1  
  # mv System.map /boot/System.map-2.6.15.1
  

Make sure to install Nvidia NFORCE network driver and NVIDIA video driverafter reboot. Here is how to check whether DMA is on or not.


  # /sbin/hdparm -d /dev/hda
  

If it is off, then you can turn it on by


  # /sbin/hdparm -d1 /dev/hda
  

This command does not work with CentOS 4.2 for nForce4 motherboards.

Top


How can I make sound work under nForce4?

Again nForce4 is not recognized on CentOS 4.2. You have to downloadthe latest version. This latest version even works under CentOS 4.2kernel but weird behavior. I had to use "speaker-test -c2" to make "xmms" start producing sound. Under 2.6.15, no need to do this.Anyway here are the steps.


  1. download the following three sources:
     alsa-driver-1.0.11rc2.tar
     alsa-lib-1.0.11rc2.tar
     alsa-utils-1.0.11rc2.tar
  2. patch alsa-driver*/alsa-kernel/pci/hda/hda_codec.c
	 from    
	 here
  3. edit alsa-driver*alsa-kernel/pci/intel8x0.c
     add   
	 static struct pci_device_id snd_intel8x0_ids[] 
	   = {   { 0x10de, 0x026c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE },/* NFORCE4 */
  4. when you configure lib, you must do 
     # ./configure --libdir=/usr/lib645. 
	 build driver, lib, and utils6. 
	 run /usr/sbin/alsaconf   
	 it will add the following to /etc/modprobe.conf.   
	 # --- BEGIN: Generated by ALSACONF, do not edit. ---   
	 # --- ALSACONF version 1.0.11rc2 ---   
	 alias snd-card-0 snd-hda-intel   
	 alias sound-slot-0 snd-hda-intel   
	 # --- END: Generated by ALSACONF, do not edit. 
	    ---where HDA stands for  high definition audio.
  

Only after the use of Linux 2.6.15, "real player" started working.

Top


How can I make mplayer work on nForce4 ?

CetOS does not come with mplayer. I built this from source.


  download source from  http://www.mplayerhq.hu/homepage/design7/dload.html
  $ cd mplayer source directory $ bzcat ../mplayer*.patch.bz2 | patch -p1 
  $ ./configure --enable-gui --with-x11libdir=/usr/X11R6/lib64
  

Unfortunately gtk2 obsoleted GTK_CTREE and thus does not compile withgui option. Thus I got back mplayer back to the original (i.e. dropping--enable-gui. Just build mplayer only.) I tried "kplayer" GUI which runs on mplayer.


  Make sure you install "libstdc++-devel"! (CentOS does not install thisas default).
  $ ./configure --prefix=/usr/local --enable-libsuffix=64 \
    --with-qt-includes=/usr/lib64/qt-3.3/include \
	--with-qt-libraries=/usr/lib64/qt-3.3/lib
  

The reason for --prefix is that using kdeconfig prefix will try to install in /usr/bin. I want to keep source compiled packages into /usr/local. See this web page for how to compile kplayer:http://kplayer.sourceforge.net/manual/howto-compilation.html.

Top


How can I patch the BIOS bug for ASUS A8N-VM CSM?

Update: Finally ASUS fixed the BIOS bug with 1001 BIOS (6/3/2006).You just need to update the BIOS to avoid many problems. In particularthe problem with DMA.

Due to the BIOS bug on ASUS A8N-VM CSM, Linux ACPI won't work (at leastat 0702 BIOS 2/2006). Thus you must boot withacpi_skip_timer_override option added (acpi=off does not work). That is, /boot/grub/grub.conf should look like:


  default=1
  timeout=30
  splashimage=(hd0,9)/boot/grub/splash.xpm.gzhiddenmenutitle CentOS (2.6.9-22.0.2.EL)
  root (hd0,9)
  kernel /boot/vmlinuz-2.6.9-22.0.2.EL ro root=LABEL=/ acpi_skip_timer_override rhgb quiet
  initrd /boot/initrd-2.6.9-22.0.2.EL.imgtitle Windows32/64	rootnoverify (hd0,0)
  chainloader +1
  

The following web page is very helpful in fixing the BIOS problem:The first one is using RHEL4 or CentOS4.2 to fix dsdt problem: http://www.astro.uu.nl/~izzard/Acer/Acer_guid.html and the next one is to explain how to get a acpidumped file disassembledby iasl http://people.fruitsalad.org/adridg/development.freebsd.php#a8nvm

First, download the kernel patch acpi-dsdt-initrd-v0.73-2.6.14.patch.from http://gaugusch.at/kernel.shtml


  cd /usr/src/kernels/linux-2.6.15.1
  patch -p1 < acpi-dsdt-initrd-v.73-2.6.14.patch
  
Another patch acpi-dsdt-initramfs-fix-2.6.10-cleanup.patch won't work as it is using patch -p1 but it is easy to figure out what should be changed: Next, we recompile the kernel (I downloaded the new kernel (see above).There is a choice in how to fix dsdt. You can download DSDT from http://acpi.sourceforge.net/dsdt/index.php by picking the manufacturer/motherboard/model. However the fix I found for 0702 did not work for my ASUS A8N-VM CSM BIOS 0702. Here is how I did.

Download assembler/disassembler tool (acpi-unix-xxxx.tar.gz) from Intelhttp://www.intel.com/technology/iapc/acpi/downloads.htm. After compilation, the disassembler/assembler iasl is in compiler directory)

Download pmtools from http://acpi.sourceforge.net/download.html. After compilation, acpidump is in acpidump directory.


  1. create a directory to put outputs.  Make sure you have path to acpidump and iasl.  
  2. acpidump -t DSDT -b -o dsdt.dat  
  3. Disassemble (iasl -d dsdt.dst) fails with the following error.
    (Note that you cannot tell whether it failed or not.  You have to cat the file.)     
	 # cat dsdt.dsl
     nssearch-0406: *** Error: NsSearchAndEnter: Bad character in ACPI Name: 43045350
     dswload-0381: *** Error: Looking up [0x43045350] (NON-ASCII)     
	 in namespace, AE_BAD_CHARACTER     
	 Could not parse ACPI tables, AE_BAD_CHARACTER  
  4. Use KHexEdit to edit dsdt.dat     
     Find "50 53 04 43" ("PS^DC" in ASCII)) (not [43 04 54 50] in the error
	 message, due to the fact that x86 is little endian).       
	 Change "04" to "54" ("T" in ASCII) and save it as dsdtfix.dat.  
  5. Now you can disassemble the fixed dsdt.dat.     
     # iasl -d dsdtfix.dat.
     Intel ACPI Component Architecture
     AML Disassembler version 20050930 [Jan 20 2006]
     Copyright (C) 2000 - 2005 Intel Corporation
     Supports ACPI Specification Revision 3.0
     Loading Acpi table from file dsdtfix.dat
     tbutils-0317: *** Warning: Invalid checksum in table [DSDT] (27, sum 50 is not zero)
     Acpi table [DSDT] successfully installed and loaded
     Pass 1 parse of [DSDT]
     Pass 2 parse of [DSDT]
     Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
     .........................................................................................................................................
	 .........................................................................................................................................
	 .........................................................................................................................................
	 ........................................................................................     
	 Parsing completed     
	 Disassembly completed, written to "dsdtfix.dsl"
     Note that Checksum error is due to the change from 04 to 54  
  6. Recompile dsdtfix.dsl (iasl -tc dsdtfix.dsl).   
     You ended up five erros.     
	 Intel ACPI Component Architecture     
	 ASL Optimizing Compiler version 20050930 [Jan 20 2006]
     Copyright (C) 2000 - 2005 Intel Corporation
     Supports ACPI Specification Revision 3.0
     dsdtfix.dsl  4730:
	 If (LNot (And (\_SB.PCI0.HFZF, Local2)))     
	 Error    1061 -  Object does not exist ^  (\_SB.PCI0.HFZF)
     dsdtfix.dsl  4734: Or (\_SB.PCI0.HFZF, Local2, \_SB.PCI0.HFZF)     
	 Error    1061 -  Object does not exist ^  (\_SB.PCI0.HFZF)     
	 dsdtfix.dsl  4734: Or (\_SB.PCI0.HFZF, Local2, \_SB.PCI0.HFZF)     
	 Error    1061 -  Object does not exist ^  (\_SB.PCI0.HFZF)
     dsdtfix.dsl  4875:     Method (WFZF, 1, NotSerialized)     
	 Warning  2085 -  ^ Not all control paths return a value (WFZF)
     dsdtfix.dsl  4888: Return (While (Local1)     
	 Error    1094 -  ^ syntax error, unexpected PARSEOP_WHILE     
	 dsdtfix.dsl  4902:             })     
	 Error    1094 -                 ^ syntax error, unexpected ')'     
	 ASL Input:  dsdtfix.dsl - 5584 lines, 162792 bytes, 1947 keywords
     Compilation complete. 5 Errors, 1 Warnings, 0 Remarks, 457 Optimizations  
  7. 4730, 4734 are created by function HFZF which was not defined before the function
     trying to use it.  
	 Move    Scope (\_SB.PCI0)    
	 {        
	   Name (HFZF, 0x00)        
	   Method (HWAK, 1, NotSerialized)        
	   {            
	     If (LEqual (Arg0, 0x03))            
		 {                
		   Store (0x00, HFZF)            
		 }        
	   }    
	 }    
	 to the place in front of Method (FZHD,0, NotSerialized).  
  8. 4875, 4888, 4902 is caused by having the structure of Return(While .....).     
     Change it to             
	 While (Local1)            
	 {                
	   Stall (0x0F)
	   Decrement (Local1)
	   If (LEqual (Local1, 0x00))
	   { 
  	     Return (Store (CREG, Local2))
       }                
	   And (Local2, 0x80, Local2)
	   If (LEqual (Local2, 0x00))
	   { 
	     Return (Decrement (Local1))
	   }            
	 }        
	 }
	 Return (0x00)  
  9. Try to compile the fixed version (dsdttosafix.dsl) and now comes up with
     warnings due to the bad coding by ASUS:
	 {             
	   if (...)
	   Return (...)
	   if (...)
	   Return (...)
	 }     
	 You see that if none of the "if"s are satisfied, then it does not return
	 anything.  Assuming that the actual code hits one of the if's, just add
     add the end
	 Return (0x00)  
 10. Now the fixed dsl will compile without problem.
     # iasl -tc dsdtfosafix.dsl
	 produces DSDT.aml.   
 11. Compile kernels with dsdt fix and create initrd.
     # cd /usr/src/kernels/linux-2.6.15.1
	 # make menuconfig      
	 Make sure that you enable option
	 1. "Read Custom DSDT from initrd"      
	 2. "Initial RAM disk (initrd) support"      
	 3. Don't enable "CPU frequency scaling" option.       
	 (I got kernel panic when I turn on this option.)      
	 # make bzImage      
	 # make modules      
	 # make modules_install      
	 # /sbin/mkinitrd /boot/initrd-2.6.15.img 2.6.15.1      
	 # mv arch/x86_64/boot/bzImage /boot/bzImage-2.6.15.1      
	 # mv System.map /boot/System.map-2.6.15.1  
 12. Apply your own dsdt fix      
     # cp initrd-2.6.12.5.1.img initrd-2.6.12.5.1.img-dsdt
	 # echo -n "INITRDDSDT123DSDT123" >> initrd-2.6.12.5.1.img-dsdt      
	 # cat DSDT.aml >> initrd-2.6.12.5.1.img-dsdt 
	

Now we can boot without the need of acpi workaround. Here is /boot/grub/grub.conf. You must keep the old configurationin case kernel panic occurs (I had a few of them). You add the following


	title CentOS (2.6.15.1-dsdt)
	root (hd0,9)
	kernel /boot/bzImage-2.6.15.1 ro root=LABEL=/ rhgb quiet
	initrd /boot/initrd-2.6.15.1.img-dsdt
	

Top


How can I debug segfaulted daemon (hald)?

HAL in Linux is rather new and seems to be buggy. Under 2.6.15.1, hald gets segfaultevery single time. I wanted to debug but did not know how to debug a daemon.Initially I thought of installing the latest hal. Unfortunately hal-0.5.x hasdepends on a few files which are not available in CentOS 4.2. FinallyI decided to fix the bug myself with the current source.

First, download hal-0.4.2-1.EL4.src.rpm, usinghttp://rpmfind.net. Install itby rpm -Uvh hal-0.4.2-1.EL4.src.rpm(as default it goes to /usr/src/redhat. If you do this, then I can compile src rpm as a user.) Rebuild it asfollows: cd to SPECS directory and then do rpmbuild -ba hal.spec. If you do this on the x86_64 platform, then you get error because oftrying to use /usr/lib/libpopt.so. You have to use /usr/lib64/libpopt.so.Thus my quick hack was to modify hal.spec to have export LDFLAGS=/usr/lib64 in %build before configure. After this mod, it will build hal-0.4.2-1.EL4.rpm with the new changed files. You mustforce to replace the current one by rpm --force -U hal-0.4.2-1.EL4.x86_64.rpm. You also install hal-debuginfo-0.4.2-1.EL4.x86_64.rpm to get thesymbols under debugger. If you use gdb, then the steps are as follows:

  
	# cd /usr/sbin  
	# gdb hald  
	 (gdb) run --verbose=yes --daemon=no  Starting program: /usr/sbin/hald --verbose=yes --daemon=no  22:03:00.627 [I] hald.c:394: hal 0.4.2  22:03:00.628 [I] hald.c:398: Will not daemonize  
	 ....  
	 Program received signal SIGSEGV, Segmentation fault.  0x0000003b3be6fd20 in strlen () from /lib64/tls/libc.so.6  
	 (gdb) bt      
	 #0  0x0000003b3be6fd20 in strlen () from /lib64/tls/libc.so.6  
	 #1  0x000000000041ca60 in ieee1394_host_class_pre_process (self=Variable "self" is not available.) at linux/ieee1394_host_class_device.c:84  
	 #2  0x0000000000414983 in class_device_final (self=0x537400, d=0x6f5510, merge_or_add=0) at linux/class_device.c:453  
	 #3  0x0000000000414f0e in class_device_got_parent_device (store=Variable "store" is not available.)..
	 

The failure is due to cur->value=0 and thus strlen(cur->value) gets segfault. Actually this is just one of many using strlen(cur->value) segfaults. All are inhald/linux/*.c. Make sure you fix them. Now create a new hal-0.4.2.tar.gzin SOURCES directory. Rebuild rpm and install it again (don't forget--force). My system no longer sees segfaults of hald anymore.

Another bug is in hald/linux/block_class_device.c under 0.4.2 which defines storage.dvdram, which should bestorage.cdrom.dvdram.

Top


How can I create a boot floppy?


	1. # mkdir /mnt/floppy
	2. # mount /dev/fd0 /mnt/floppy
	3. # cd /mnt/floppy
	4. # mkdir -p boot/grub
	5. # cp /boot/grub/stage1 boot/grub   
	   # cp /boot/grub/stage2 boot/grub   
	   # cp /boot/grub/menu.lst boot/grub   
	   # cd /   
	   # umount /dev/fd06. 
	   # /sbin/grub   
	   Probing devices to guess BIOS drives. This may take a long time.
	   GNU GRUB  version 0.95  (640K lower / 3072K upper memory)
	   [ Minimal BASH-like line editing is supported.  For the first word, TAB
 	   lists possible command completions.  Anywhere else TAB lists the possible
	   completions of a device/filename.]   
	   grub> root (fd0)   
	   Filesystem type is fat, using whole disk
	   grub> setup (fd0)
	   Checking if "/boot/grub/stage1" exists... yes   
	   Checking if "/boot/grub/stage2" exists... yes   
	   Checking if "/boot/grub/fat_stage1_5" exists... no   
	   Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/grub/grub.conf "... 
	   succeeded   Done.   
	   grub> quit
	   

Top


How can I make Zoom 4412 Wireless-G Card-bus card work?

CentOS 4.3 has the module called Prism54 which is loaded when it isdetected. Unfortunately it does not work. Check it by /sbin/lsmod | grep prism54 and remove it by/sbin/rmmod prism54.

Unlike Windows, you need to work hard at this. The first thing you do is to identify the chip used in the card. The Zoom Wireless-G card Model 4412 (I bought this for $29.99 atMicroCenter) reveals under CentOS 4.3:


	# /sbin/lspci | grep -i network  02:00.0 Network controller: Intersil Corporation ISL3890 [Prism GT/Prism Duette]  /ISL3886 [Prism Javelin/Prism Xbow] (rev 01)  
	# /sbin/lspci -n  ...  02:00.0 Class 0280: 1260:3890 (rev 01)  <---- important
	

It turned out that the hardware seems to use SoftMac and Conexant (whichbought Intersil) won't support Linux directly. Therefore the easy option is to use ndiswrapper way, i.e. using Windows driver to communicate with Linux.The output of lspci is needed to locate the appropriate driver. In my case I have to look for the driver for 1260:3890 (see above).

You download ndiswrapper software from here. After untared, read INSTALL (make, make install), you have the following:


	/lib/modules/(kernel version)/misc/ndiswrapper.ko
	/usr/sbin/ndiswrapper
	/sbin/loadndisdriver
	

Try /sbin/modprobe ndiswrapper. Make sure that you don't geterrors. If works (/sbin/lsmod shows ndiswrapper in one of the items), then add to /etc/modprobe.conf to the following line:


	alias wlan0 ndiswrapper
	

Now download Windows driver from here (Used 1260:3890 in my case to search). I find that SMC driver is used by many people. Thus I downloaded this one.When you unzip the file, you get Driver directory which contains WinXP,Win2000, WinMe and Win98Se. I went to WinXP directory.Following the instruction, I did


	/usr/sbin/ndiswrapper -i 2802W.inf 
	

Here the instruction talks about iwconfig which is only for WEPencryption. You don't want to use WEP, since it is a very weak encryptionread this. So forget about iwconfig. You want to use wpa_supplicant. Go here to download the latest wpa_supplicant (I downloaded 0.5.3).Again you have to compile. There is a file named defconfig and youcopy it and save it as .config... Just follow here. (it says to use -Dwext instead of -Dndiswrapper for version > 1.12. I'm using -Dndiswrapper without problems for version 1.15. Note also that ndiswrapper uses wlan0 as the interface.)Start wpa_supplicant from the command line. Open another consolewindow and try /usr/sbin/wpa_cli. You get the prompt and try status. Now you are getting close to the end. You want to start the wireless from the boot time. I had a hard time finding what to do forCentOS 4.3. Here is the thing. Forget about /etc/pcmcia/wireless.opts. Go to /etc/sysconfig/network-scripts. Make sure that you haveifcfg-wlan0 which has the following:


	DEVICE=wlan0  
	ONBOOT=yes  
	BOOTPROTO=dhcp  
	HWADDR=(mac address of your hardware)  
	ESSID="(your SSID)"
	<---- WPA uses SSID.  WEP uses ESSID  TYPE=Wireless  WPA=yes                   
	<---- lowercase yes  MODE=Managed
	

Then edit ifup-wireless file to have the following:


	if [ "$WPA" = "yes" -a -x /usr/local/sbin/wpa_supplicant ];
	then  /usr/local/sbin/wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlan0 \
	-D ndiswrapperfi
	

I removed all iwconfig lines and have only the lines above. It worked.Reboot the system and see wlan0 comes up.

Top


How can I enable PowerNow for AMD64?

Remember that I'm using linux-2.6.15.1 so that it recognizes ASUS A8N-VM CSM board.When I compiled the kernel, I forgot to enable AMD PowerNow option. When you do make menuconfig, Power Management Option → CPU Frequency Scaling.Select it. Select AMD Opteron/Athlon64 PowerNow! and ACPI Processor P-States driver.Select 'powersave', 'userspace', 'ondemand' policy governor as modules. Build them.Reboot with the new kernel. You should see the following under dmesg:


	# dmesg | grep powernow
	powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.4)  
	powernow-k8:    0 : fid 0xe (2200 MHz), vid 0x6 (1400 mV)  
	powernow-k8:    1 : fid 0xc (2000 MHz), vid 0x8 (1350 mV)  
	powernow-k8:    2 : fid 0xa (1800 MHz), vid 0xa (1300 mV)  
	powernow-k8:    3 : fid 0x2 (1000 MHz), vid 0x12 (1100 mV)
	

If you don't get this, it is most likely that you forgot to enable Cool'n Quietin the BIOS.

As default, CentOS tries to use cpuspeed service. Unfortunately, it did not work for me. When I looked around on the web, I foundthat when cpuspeed does not work, cpufreq_ondemand works and it did for me. Try the new system out by doing the following:


	# modprobe cpufreq_ondemand  
	# echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor   
	# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
	
You should see lower frequency than what you have. You can put the first two commandsin /etc/rc.local so that they will be executed when rebooted.

Top


How can I have Explorer style browser?

GNOME Nautilus (file manager) opens too many windows. When you clickthe file folder, it opens a new window. Then you click a folder, it opensanother window... You fix this problem as follows:


	$ gconf-editor &  apps → nautilus → preferences.  Then check always_use_browser.
	

Top

Home

updated on 9/4/2006