Red Hat Linux 7.3 on Sony Vaio PCG-FX220 Laptop
This document will guide
you through the process of installing Red Hat Linux on a Sony Vaio PCG-FX220
I wrote this file to help people, particularly Vaio owners, with post-installation tasks that need to be performed in order to make everything work, or at least most of this laptop's features.
This tutorial (or how-to) is "Vaio-oriented" and specifically "Vaio-PCG-FX220 oriented" but most of the things written here will also apply to many other Vaio models, like FX200, FX220 and hopefully all FX models.
This guide was kept simple and should be quite easy to follow every step detailed here. It is also written for someone with very little experience with Linux (newbies). You should know at least the very basic shell commands, like 'ls', 'cp', 'cd', 'mkdir', etc. You will go from installing Linux to building a custom (modularized) kernel.
Pablo M. Ferro
For Sony Vaio PCG-FX220 specs, check (http://www.ita.sel.sony.com/support/specs/notebooks/pcgfx220_fx220k.pdf)
Special thanks to Jan
Slupski for sharing his knowledge and experience installing RH on his Sony
Check his website at: http://www.juljas.net/linux/vaiofx240/
1. Installing Red Hat Linux 7.3 on the Vaio Laptop
|STEP 1 - Download or buy Red Hat Linux 7.3|
Go to www.redhat.com and read the download instructions. For Red Hat Linux 7.3 you need to download 3 .ISO files, you will have to burn 3 CDs. The first one is bootable, so you won't need to make bootable floppy disks.
|STEP 2 - Make room for Linux|
Because you probably have Windows already installed on the laptop (and want to keep it), we are going to make room for Linux without destroying the C: drive … If you only want Linux on your laptop, skip this step. What I did was moving everything I had on the D: drive to the C: drive (file-system). There are other options too. The important thing is to have free space or a partition emptied (I recommend at least 4 GB). Backup your important files.
|STEP 3 - Install Linux|
Restart your laptop
with RHL (Red Hat Linux) CD #1 in your CD/DVD drive. Follow the on-screen
instructions until you get to the "Installation Type." Here you can choose
"Laptop" (recommended) or "Custom" Click next and you'll see the "Disk
Partitioning Setup" (Figure 1.1). Okay, if you know what to do here, go
to the next step. If you did what I did, and moved everything out of the
D: drive or have an empty partition, then do step A. If you have free
space on the drive, go to step B.
All right, so you have now installed RHL on your Sony Vaio Laptop!
Figure 1.1 Disk Partitioning Setup
tasks & configuration (step by step)
If you follow the previous steps, you should now have RHL installed on your system.
The following is a list of things to do:
· Get online. Configure your Internet service
· Make your Conexant modem work
· Disable sleep mode on your Ethernet
· Update your system
· Download kernel-source
· Fix the USB. USB does not work
· Configure and recompile the new kernel
· Install a USB mouse (optical) and make both your external mouse and touch pad work in X
· Enable and configure Fn key, control brightness of your screen, volume, and mute
· Mount your Windows file system. Access your C: files
|STEP 1 - Get online|
This one is quite easy and there are plenty of tutorials. If you have a dial-up service go to step 2 to configure your modem (it won't dial unless you do this). Your Ethernet works fine, it just needs a tune-up, go to step 3 to disable sleep mode.
|STEP 2 - Make your Conexant modem work|
You need to download a driver from http://www.mbsi.ca/cnxtlindrv/hsf/downloads.html Choose your platform and kernel version. It's all explained there… You will get an RPM file, to install it open a terminal as root (run 'su' to get root privileges) and run: rpm -Uvh filename.rpm (for example, rpm -Uvh hsflinmodem[TAB]). Finally, run hsfconfig to setup your modem. Check: http://www.juljas.net/linux/vaiofx240/#modem Mirror http://www.linux-on-vaio.8m.com/jslupski-vaio/index.html#modem
|STEP 3 - Disable sleep mode on your Ethernet|
You will have to run this
script (compile it with gcc to
be able to run it) Check: http://www.juljas.net/linux/vaiofx240/#ethernet
|STEP 4 - Update your system|
If you have just installed
RH 7.3 your system is not updated. You should update your system first. To do
that, open a new terminal window (yes, that black screen with a prompt!) and
a) su - (you're going to have to enter your root password)
b) up2date up2date (yes, twice; this will update your up2date app)
IMPORTANT: You need to register your system with Red Hat Network. There's a wizard that will guide you through the registration process, run it, it's under the Programs/System menu. You will be asked for your root password. Open Mozilla and go to www.redhat.com, login in RHN, enable your system, basic entitlement.
|STEP 5 - Download kernel-source|
You will need to download the latest kernel source from Red Hat's FTP site. As of today, it is version 2.4.18-10. Everything shown here will work with this kernel, I cannot assure this with other kernels… FTP to ftp.redhat.com and find the kernel-source in: /pub/redhat/linux/7.3/en/os/i386/RedHat/RPMS Install the RPM with rpm -Uvh kernel-source*
|STEP 6 - Fix the USB|
When you installed the
kernel source package, the files extracted by the rpm program were placed in
/usr/src/linux-2.4.18-10 (/usr/src/linux-2.4 points there as well). To
fix USB you need to download this patch and do this:
b. cd /usr/src/linux-2.4
c. cd arch/i386/kernel
d. patch pci-irq.c /path/where/you/downloaded/patch/vaioUSB.patch
(example: if you saved the patch in your home directory, do: patch pci-irq.c ~/vaioUSB.patch ;
if you saved it in /root/ you do: patch pci-irq.c < /root/vaioUSB.patch)
Now, we have just patched the pci-irq.c file so when we rebuild the kernel, the USB interface gets the correct IRQ number (#9).
Many thanks, again, to Jan Slupski for the patch.
|STEP 7 - Configure and recompile the new kernel|
This is the most important
and crucial step. There are different ways of doing this, I will write here
the steps I took to make things work on this specific laptop (Sony Vaio PCG-FX220).
Okay, this is the
way I went: (I highly recommend to read RH's Customization Guide, specifically
2. cd /usr/src/linux-2.4
3. make mrproper
4. make oldconfig (skip this step if you have a configuration file)
5. make xconfig (an X Window will show)
Make sure these options are selected:
a. Under Character Devices: Sony Programmable Keys should be included as a module.
b. Under General Setup: Enable everything that says ACPI and disable APM
c. Under Sound: Make sure there's support for sound
d. Under File Systems: Make sure you have ext3 support and also ms-dos and vfat support (if you want to access your C: drive)
e. Under USB: Enable HID support
f. Browse a little through the menus and enable things you want, disable (carefully) things you don't want.
If you own a Sony Vaio PCG-FX220 you can use my .config file and skip step 4 and 5 (save the file in /usr/src/linux-2.4).
This is only if you installed RH 7.3 on that laptop, same exact model and you are configuring the 2.4.18-10 kernel.
6. make dep
7. make clean
8. vi Makefile (press the INSERT key and modify line EXTRAVERSION, append something like 'custom' to that line, if you have the 2.4.18-10 kernel extra version will read '-10custom'. Press the ESC key and write ':wq' to write changes and quit).
9. make bzImage
10. make modules (this step will take like an hour)
11. make modules_install
12. /sbin/mkinitrd /boot/initrd-2.4.18-10custom.img 2.4.18-10custom (of course, if you are compiling a different kernel version or appended a different string to extraversion, replace appropriately)
13. make install
14. Now you have to configure the boot loader.
For GRUB, do vi /boot/grub/grub.conf and read the file to check if there's an entry for the new kernel, you'll see that there's a title that reads 'title Red Hat Linux (2.4.18-10custom). If you have this line, your boot loader was configured automatically. Otherwise copy the entire title section you have there and modify it accordingly by adding the word 'custom' or whatever you chose before and replacing the version part with 2.4.18-10. Read RH's Customization Guide, Appendix A, it's all well explained there. c. modify the default line on top to make your new kernel the default boot option. If the new kernel's title is the first one, default should be 0. That is of course assuming you want to do this, otherwise leave as it is…
If you have LILO, edit the /etc/lilo.conf file to reflect the changes, and then run /sbin/lilo -v
15. Reboot your machine and boot the new kernel.
|STEP 8 - Install a USB mouse (optical) and make both your external mouse and touch pad work in X|
Assuming everything went well with the previous steps - hopefully that's the case, after all they worked with me - USB should now be functional. Plug your USB mouse (I have a Microsoft IntelliEye optical mouse) and it should be automatically detected when you boot your laptop; this was the case with my USB mouse. Now, when in graphical mode (GNOME or KDE, X basically) you will have your optical mouse working but the touch pad will now work anymore. To solve this you have to edit your XF86Config-4 file, which should be located in /etc/X11/XF86Config-4. Here's my XF86Config-4 file. Then as root (open a terminal and run 'su -') run mouseconfig and choose the Generic PS/2 3 Button Mouse (the touch pad). Restart your box and when X starts you should now have both input devices working at the same time.
Look for the Section "Input Device" You should see something like this:
You have to add a new Input Section for the USB mouse, so add the following:
Finally, modify the Server Layout section. It should look like:
|STEP 9 - Enable and configure Fn key, control brightness of your screen, volume, and mute|
it is all explained there.
|STEP 10 - Mount your Windows file system. Access your C: files.|
You can access your C:
drive by running as root, the following command: mount
-t vfat /dev/hda1 /mnt/windows (first make a 'windows' folder in /mnt
with mkdir windows). Then you
can use Nautilus to browse the files, etc. You can also type cd
/mnt/windows and browse the file system with the terminal. If you want
to have your C: drive automatically mounted every time you start Linux, edit
your /etc/fstab and add the following
/dev/hda1 /mnt/windows vfat defaults 0 0
Every time your laptop is started it will mount your C: drive to /mnt/windows