Installing RedHat 7.2 Linux on a Sony VAIO PCG-FXA32 Laptop as Dual Boot System (AMD Duron 900MHz, 256MEG RAM, Windows XP)


Background


The following describes how to install Redhat Linux on a Sony Vaio Laptop with an AMD Duron Processor. In this example I am setting it up as a dual boot system with Windows XP. The default install does not work as expected and leads to Kernel Panic errors on boot. The following is the full step by step procedure to install RH7.2 including the workaround to eliminate the Kernel Panic problem.


Procedure (here is another shorter and more elegant solution - at least it looks like better and shorter ;-)  )


Step 1 - Disk Partitioning


The pre-installed Windows XP was installed on the 15G drive on a 5G partition (VFAT) and there was also a blank partition of 10G default format of NTFS (Win NT proprietary format)

The 10G partition was re-partitioned (within Redhat Disk Druid) to be 5G (vfat) and 5G (EXT3, for Linux). You can do this in any PArtitioning tool even FDISK in DOS, or by another package eg. Partition Magic. Note : do not change the 5G partition that Win XP is on!

(Note in XP, after a re-partition the next time you look a D: it will need to be reformatted in windows as VFAT32 (or NTFS), in order for it to be used by Windows

Step 2 - Redhat Installer

Default Install (RH7.2 installer)

The default install by Redhat installer appears to install fine, however on completion and reboot, the Linux Kernel CRASHES with a Kernel Panic ERROR.

Looking up the Newsgroups yielded that this as a known Bug on an AMD Athlon /Duron machine, for the Std Redhat 7.2 install. The optimization for the Athlon/Duron does not function properly with this release, and in order for it to work you need to tell the Kernel that is an i686 machine and not a
AMD Duron/Athlon.

Solution -

1. The Linux environment can be booted to from floppy (if you chose to create one from the RH7.2 installer during installation) if you didn't you will need to repeat the install to get the bootable floppy.

When you have a bootable floppy, insert the floppy into the Floppy Drive and reboot the machine. The message should say something like -

boot>

so type

boot> linux noathlon <Enter>

The O/S will now proceed to boot WITHOUT Athlon/Duron optimization. You should now be able to get into the Linux Environment, including KDE desktop.

2. Assuming you don't want to boot from floppy all the time you will need to recompile the Kernel to be a i686 optimized Kernel. Don't panic! this is not as hard as it first seems.

------------------------------------------------------------------
The following is a step by step process to recompile the kernel -
------------------------------------------------------------------

** NOTE: you also need to have Kernel Sources and Kernel Headers installed in RH7.2 installer otherwise they will be missing and there will be nothing to compile!**

i.
in a X terminal window (in KDE or GNOME or "your_favorite_window_manager") su as root
ii.
cd into /usr/src/linux-2.4
iii.
copy config directory to config_orig {as a backup, just in case, not really necessary}
iv.
edit Makefile and change EXTRAVERSION = field to your kernel name eg. EXTRAVERSION = -mykernelname
v.
type make xconfig (this will launch the X version of the kernel configuration GUI,which will,at the end,create .config)
vi.
hit 'load file' and type in 'configs/kernel-2.4.7-i686.config' into xconfig {NOTE : I have tried compiling Athlon Kernel and it bombs at boot, so choose i686.}
vii.
in xconfig save and exit. This saves the config file to a file called '.config', which is the configuration file to be used by the Makefile to compile the Kernel. You are now ready to compile the kernel!
viii.
type make dep (to set the dependencies)
ix.
type make bzImage (to choose bZiped kernel, saves space, 10 min to run)
x.
type make modules (to compile modules, 25 min to run)
xi.
type make modules_install (to install modules)
xii.
type cp arch/i386/boot/bzImage /boot/2.4.7-mykernelname.bz
xiii.
type mkinitrd /boot/initrd-2.4.7-mykernelname.img 2.4.7-mykernelname {this creates the RAM Disk for your Kernel, for more on RAM Disks see - here}
xiv.
You now need to update Grub config file to tell Grub to list your new Kernel on boot

To do this type -


bash_prompt> cd /etc
bash_prompt> vi grub.conf

Add in an entry to the bottom of the file like -

title Red Hat Linux (2.4.7-mykernelname)
root (hd0,2)

kernel /2.4.7-mykernelname.bz ro root=/dev/hda5

initrd /initrd-2.4.7-mykernelname.img

The grub.conf file should now look something like -

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/hda5
# initrd /initrd-version.img
#boot=/dev/hda
default=1 # <----------------- sets default boot selection to XP set to 2 for 'mykernel'
timeout=10 # <------------------ sets timeout before auto selection is booted
splashimage=(hd0,2)/grub/splash.xpm.gz #<---- sets background image for bootloader
title Red Hat Linux (2.4.7-10)
root (hd0,2)
kernel /vmlinuz-2.4.7-10 ro root=/dev/hda5
initrd /initrd-2.4.7-10.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
title Red Hat Linux (2.4.7-mykernelname)
root (hd0,2)
kernel /2.4.7-mykernelname.bz ro root=/dev/hda5
initrd /initrd-2.4.7-mykernelname.img

xv.
That's it! Shutdown the system and remove floppy and reboot. Choose your new kernel from the boot loader and RH7.2 should now boot fine. Remember to choose your new kernel from the Grub menu on boot!

NOTE: after you confirm that the new kernel works, you can then remove your old Kernel. by removing -

1. the /boot/vmlinuz-2.4.7-10 file
2. the /boot/initrd-2.4.7-10.img file
3. the /lib/modules/2.4.7-10 directory
4. the first few lines in the grub.conf file that points to 2.4.7-10 kernel

Good Luck!

Please send questions, comments, suggestions, correction, improvements of this document to Alan Forsyth