Tuesday, September 12, 2006

FC5 and jre

Was trying to get my java runtime environment working in FC5, thanks to this excellent guide, I managed to get it up really fast. http://www.mjmwired.net/resources/mjm-fedora-fc5.html#java

They have more resources than just on jre, so take a look at it. But in case they remove it anytime in the near future, I am pasting the guide to setting up jre:

1 March 2006

NOTE: Fedora Core 5 advises AGAINST using the Sun Java RPM.
Information can be found in the FC5 Release Notes on Java since the RPM may be
overwritten by a 'yum update' due to similar package names.

However if you do NOT use the FC5 Java packages, this should not affect you.

URL: http://java.sun.com/j2se/1.5.0/download.jsp

Choose the LATEST JRE Update, currently 6:

JRE 5.0 Update 6 includes the JVM technology
The J2SE Runtime Environment (JRE) allows end-users
to run Java applications. More info...
Download JRE 5.0 Update 6

Make sure to (*) Accept License Agreement


Linux Platform
Linux self-extracting file (jre-1_5_0_06-linux-i586.bin, 15.99 MB)

[root@charon fc5]# sh ./jre-1_5_0_06-linux-i586.bin
(type 'yes')
[root@charon fc5]# mv -f jre1.5* /opt/jre1.5
[root@charon fc5]# ln -s /opt/jre1.5/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

(If you update the JRE package, simply delete the /opt/jre1.5 directory and
copy the update to /opt/jre1.5 -- there will be no need to update the 'ln' link.)


Controlling Java through 'alternatives'. When running the 'java' command,
FC5 will automatically pick the GNU Java, to use Sun's java do the following:

[root@charon fc5]# /usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5/bin/java 2
[root@charon fc5]# echo 2 | alternatives --config java

[root@charon fc5]# java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

NOTE for SELinux User

Users running SELinux may NOT be able to get their browser to detect
the plugins. Make the following changes to the SELinux policy:

Run: system-config-securitylevel
Goto: SELinux > Modify SELinux Policy > Compatibility >
Allow the use of shared libraries with Text Relocation
Allow executables to run with executable stack

Sunday, September 03, 2006

FC 5 - Fedora Core wireless network setup with a windows driver

alright, I finally changed my windows to an FC5. And therein lies the problem, my stupid wireless driver is only for windows. Nevermind that, there are solutions right? And yup, I found ndiswrapper. Seriously, bless the fella who created that tool as it must have saved many a wireless network card. Anyway, so I proceeded to install it, but there were lots of tweaking to do. So this is what I have done, hopefully it helps some other poor soul.

1. Login as root, and type this command
# su -
(Frankly speaking, I don't know why I had to do this, but if I didn't, ifconfig and such commands won't work.)

2. Ensure that you have the kernel-devel RPM suitable for your kernel. You can check this by using this command
# cd /usr/src/kernels (If you do not have any, most likely you wouldn't even have the kernels folder.)

Assuming that you do not have it installed..(if you do, skip to...step 8)
3. Check your kernel version
# uname -rm

4. Proceed to look for the correct kernel-devel RPM
Note: The default stack size in the original FC5 kernel is only 4K, but most other external drivers like in my case, the wireless drivers, they require more, so you should update your original kernel as well.
Try this website

5. When you have downloaded the correct RPMS, you can create a folder to hold them and cd into it
# rpm -ivh *.rpm

6. Once installed, you have to edit grub to let it know which kernel to boot up as the original kernel is still there.
# cd /boot/grub/
# vi grub.conf
title Fedora Core (2.6.15-1.2054_FC5.stk16smp)
root (hd0,0)
kernel /vmlinuz-2.6.15-1.2054_FC5.stk16smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.15-1.2054_FC5.stk16smp.img
#title Fedora Core (2.6.16-1.2129_FC5)
# root (hd0,0)
# kernel /vmlinuz-2.6.16-1.2129_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

As you can see, I've commented out the original grub configs, so that grub will ignore them and boot the correct kernel.

7. Now reboot your system, once it starts, open your terminal window and repeat step 1. Then type this to check that the correct kernel is loaded:
# uname -rm

8. Get your Windows wireless network card drivers.

9. Install unshield(http://synce.sourceforge.net/synce/unshield.php)
# ./configure
# make
# make install

10. cd to where you downloaded the windows driver and use unshield to extract your cab files from your driver
#mkdir tmp
# unshield -d tmp x data1.cab

11. Ensure that you have no previous installations of ndiswrapper
# make uninstall
# make distclean

12. Download and install the latest ndiswrapper
# make
# make install

13. cd to the tmp folder we created earlier in the windows driver directory and look for an INF file.
# ndiswrapper -i .inf
# ndiswrapper -l (To check if the driver is there)

14. Edit the modprobe.conf file
# vi /etc/modprobe.conf
Add "alias wlan0 ndiswrapper" to the top of the file and make sure there is an extra line at the bottom of the file. Save and close.

15. Load the ndiswrapper.
# modprobe ndiswrapper

16. To check if ndiswrapper has been loaded, do this:
# dmesg

17. Now, to configure your network card. Go to System > Administration > Network

18. Click New and select wireless as your device type.

19. After clicking "Forward", you should see ndiswrapper as one of the wireless card to configure. Select it and the rest of the configurations will depend on your own wireless network.