Linux ATA RAID HOWTO
Prev |  | Next

# 8. Upgrading Kernel

Read this section carefully before you plan to upgrade kernel on your Linux machine with Promise FastTrack RAID. Unless you are not using Promise FastTrack at all in any way, you need this information to avoid problems.

Always backup your data before kernel upgrade. Also backup `/etc/fstab`, `/etc/lilo.conf`, `/boot/vmlinuz-currentversion` and `/boot/initrd.img` (if you use initrd). When you upgrade your kernel, do not delete old kernel or its dependent files in `/boot` and do not delete the lines corresponding to it in `/etc/lilo.conf`. If you upgrade kernel to say 2.4.19, just create another kernel section in `/etc/lilo.conf`. For example, add the following lines to `/etc/lilo.conf`:

    # Begin Code for booting my brand new kernel: 2.4.19

    image=/boot/vmlinuz-2.4.19
    	label=linux-new
    	read-only
    	root=/dev/ataraid/d0p12

    # End Code for booting my brand new kernel: 2.4.19

Also, do not change `default=linux` line in `/etc/lilo.conf` unless and until you successfully can boot into your new kernel by typing `linux-new` at the `boot:` prompt (or highlighting `linux-new` in the menu, if you are using LILO in curses menu mode).

Now lets discuss the actual process of upgrading kernel in the following four cases:

1. Promise Technology (`ft`) Driver with OS on RAID mirror

2. Promise Technology (`ft`) Driver with non-OS data on RAID mirror

3. Linux Native (`ataraid`) Driver with OS on RAID mirror

4. Linux Native (`ataraid`) Driver with non-OS data on RAID mirror

OS stands for "Operating System" or more specifically Red Hat Linux Operating System in our case. When you install Linux on mirrored partitions such as `/dev/ataraid/d0p1` (or `/dev/sda1` when using Promise Technology proprietary driver), you are said to have your OS on RAID mirror. If your Linux machine has only the main partitions such as `/` and `/boot` on RAID, it is also called (a case of) OS on RAID.

Partitions created by user to make use of available free partitions such as `/mydata1`, `/imp`, `/scratch` are not part of Linux OS because Linux does not install any files into them by default when you install Linux or upgrade any standard Linux software package. Any data in such user partitions becomes user data or alternatively, non-OS data. It is a good idea to use only ext3 and swap file systems for OS partitions. For non-OS partitions, you can use other file systems such as ext2 and dos (if you have another operating system like Windows on the same Linux computer or if you just feel like you love dos so much). However, why do you want to use ext2 if you dont have to and you have a better choice of using ext3 for OS or non-OS partitions?

## 8.1. Promise Technology (`ft`) Driver with OS on RAID mirror

Currently, Promise Technology supports Red Hat 7.2 and earlier versions only. Red Hat 7.2 uses kernel 2.4.7-10 by default. Also note that, you have to use initrd.img (Initial RAM disk image) in `/etc/lilo.conf`, when you install Linux with Promise supplied driver. At the time of installation, Promise Driver scripts are supposed to automatically generate initrd file and configure `/etc/lilo.conf` for you. Unfortunately, this does not work properly and you may have to manually create initrd.img and configure `/etc/lilo.conf` yourself.

You are stuck with the default kernel 2.4.7-10 and you cannot and should not upgrade kernel either by compiling or by automatic update programs such as up2date or rpm utility. If you really really want to upgrade kernel then do so but do not use raid. You can add Append Line to the `/etc/lilo.conf` as explained in Section 7.2 and do not load ataraid module (or do not compile your new kernel with ataraid feature built-in). By doing this, you are upgrading kernel to new version and sacrificing RAID feature because you are using Promise Technology card as a simple IDE extension card.

If Promise Technology releases new version of their `ft` driver for 2.4.19 in future, you can then upgrade your kernel first to 2.4.19 (using up2date or rpm but not by manually compiling) and place their new version of `ft.o` file in `/lib/modules/kernel-2.4.19`. You will also have to put `initrd-2.4.19` in `/boot` and append `initrd=` line to the new kernel section in `/etc/lilo.conf`. If your Linux machine uses Promise Technology driver, your OS is on RAID mirror and Promise Technology did not release any new versions for new kernel versions, please do not fool around with your current kernel. If you do fool around, remember that you can seriously damage your computer and not be able to boot or retrieve your data.

## 8.2. Promise Technology (`ft`) Driver with non-OS data on RAID mirror

Almost all of explanation in previous case (Promise Technology (`ft`) Driver with OS on RAID mirror) applies in this also, ofcourse you are now risking non-OS data instead of OS. That means, if your upgrade fails, you will be able to boot but not be able to see data in your RAID partitions. Additionally, you have the flexibility of loading and unloading Promise Proprietary driver (`ft.o`). However, this is not guaranteed to work smoothly because Promise Technology driver has a lot of issues.

Unless Promise Technology releases appropriate drivers for new kernel version, please do not attempt kernel upgrade in any method. You are stuck with 2.4.7-10 kernel. You may be required to add Append Line as discussed in Section 7.2 to boot your computer in some cases.

## 8.3. Linux Native (ataraid) Driver with OS on RAID mirror

You can upgrade kernel to any version above 2.4.18 by recompiling the kernel and not by any automatic upgrade method such as up2date or rpm utility. You need .config file from your previous kernel source directory (`/usr/src/linux-2.4.18/.config`). You did save your 2.4.18 .config file, did't you?

After you copy `.config` into `/usr/src/linux-2.4.19` directory, you may make changes by typing make menuconfig but generally you do not need to make changes because you are upgrading only to 2.4.19 and your machine hardware did not change. But if you do make changes by typing make menuconfig, remember to save and also backup your modified .config file. Save the .config file safely in /root or on a floppy disk. Here are the steps:

- Unzip new kernel in `/usr/src` and rename top directory to `linux-2.4.19`. So your new kernel source directory is `/usr/src/linux-2.4.19`.

- cp /root/config.txt .config

- make menuconfig (Make any required changes)

- cp .config /root/config-2.4.19.txt (Back up config file in a safe place)

- make dep ; make clean ; make && make install (Install new kernel)

- make modules && make modules_install (Install new kernel modules)

- Edit `/etc/lilo.conf` to add new lines to boot new kernel. Label the new kernel `linux-new`. Do not change `default=` line and do not delete lines corrosponding to current working kernel.

- /sbin/lilo (Activate changes in `/etc/lilo.conf`)

- /sbin/lilo -R linux-new (Tell LILO to treat `linux-new` as default boot kernel just for one time only)

- sync;sync;reboot (Reboot and hope that it works. If it does not boot, power off and power on again. Then login and investigate why your new kernel did not boot.)

## 8.4. Linux Native (ataraid) Driver with non-OS data on RAID mirror

To upgrade kernel in this case, follow same procedure as explained in previous section (Linux Native (ataraid) Driver with OS on RAID mirror). If you experience problems, you may be required to add an additional line, Append Line, to your `/etc/lilo.conf`. To find out what your Append Line is, see Section 7.2.

Similar to previous case, do not attempt to upgrade kernel by any automatic method (up2date or rpm utility). Manually compile and your install your new kernel as explained in the previous section.

Prev | Home | Next
Installing on an existing Linux system |  | Disabling RAID feature on Promise FastTrack