If the reason is that you need a 2.4 kernel for some reason, try CentOS 3.5

Before CentOS 3.5 came out, I had to get SATA working on Fedora Core 1. I created an internal web page with cut and paste instructions. It had two parts, build an rpm then the install. RH9 should be similar (I origionally had RH9 instructions. This might not be the best way, but I could do this in just a few minutes.

TO build the RPM:

Building a new 2.4 kernel and create an RPM(RedHad .config based)
I had to change the name to work properly with making an RPM.

Install stuff
yum -y install ncurses-devel
yum -y install rpm-build
wget http://download.fedora.redhat.com/pub/fedora/linux/core/1/SRPMS/kernel-2.4.22-1.2115.nptl.src.rpm
rpm -Uvh kernel-2.4.22-1.2115.nptl.src.rpm


Build a new kernel
The specific commands listed here assume building a 2.4.29 kernel from a rh 
2.4.20-28.7 .config file. Adjust for your needs.
Dowload the new kernel into /usr/src

Unzip kernel
cd /usr/src/
tar jxvf linux-2.4.29.tar.bz2
mv linux-2.4.29 linux-2.4.29.0.1smp
rm linux linux-2.4
ln -s linux-2.4.29.0.1smp linux-2.4
ln -s linux-2.4.29.0.1smp linux
cd linux-2.4.29.0.1smp


Get the config file, fix Makefile and make oldconfig. Use defaults and modules.
make mrproper
cp ../linux-2.4.20-28.7/configs/kernel-2.4.20-i686-smp.config .config
patch -p1 < /usr/src/redhat/SOURCES/linux-2.4.2-changeloop.patch
vi Makefile
:1,$s/$(RPM) -ta $(TOPDIR)/$(RPM) --target i686 -ta $(TOPDIR)/g
:1,$s/EXTRAVERSION =/EXTRAVERSION = .0.1smp/g
:wq
make oldconfig
Check the current config.
make menuconfig
Note: check to make sure that it is configured correctly.

Build the kernel.
make dep && make bzImage && make modules && make modules_install && \
cp -f arch/i386/boot/bzImage /boot/vmlinuz-2.4.29.0.1smp && cp -f .config /boot/config-2.4.29.0.1smp
If SATA support needed, make an initrd manually, make install doesn't do it 
correctly.
cd /boot
rm -f System.map-2.4.29.0.1smp
mkinitrd -v -f --with=scsi_mod --with=libata --with=ata_piix --with=sd_mod initrd-2.4.29.0.1smp.img 2.4.29.0.1smp
mkinitrd -v -f initrd-2.4.29.0.1smp.img 2.4.29.0.1smp
mkinitrd -v -f `cat objs` initrd-2.4.29.0.1smp-CD.img 2.4.29.0.1smp
rdev /boot/initrd-2.4.29.0.1smp-CD.img /dev/md2
Reboot selecting the new kernel to verify it is bootable.


Build the RPM
cd /usr/src/linux-2.4.29.0.1smp
Fix the spec file note: grubby is broken, so the spaces (5) must be correct!
vi scripts/mkspec
:68
i
echo ""
echo "%post"
echo 'mkinitrd -f --with=scsi_mod --with=libata --with=ata_piix --with=sd_mod /boot/initrd-'"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"'.img '"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo 'grubby --add-kernel='\'' /vmlinuz-'"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"\'' --args='\''ro root=/dev/sda3'\'' --copy-default --grub --initrd='\'' /initrd-'"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"'.img'\'' --make-default --title='\''Fedora Core ('"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"')'\'
echo ""
Press escape
:wq
Build the RPM
make rpm

The RPM will be located in /usr/src/redhat/RPMS/i686/

The actuall installation:

Add a standard ATA HD and a NIC, install from CD.

On the ATA drive, Build a new kernel
see Building a new 2.4 kernel (RedHad .config based)
note: configure (kudzu) any devices

Run fdisk -l to verify the new disk
Poweroff and remove NIC.
poweroff

Boot system
Configure (Kudzu) any new devises that changed.

Create partitions
fdisk /dev/sda
Create the following partitions:
sda1 -> +100M -> /boot
sda2 -> +1024M -> swap
sda3 -> rest -> /

It should look like this when done
Disk /dev/sda: 255 heads, 63 sectors, 4863 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 144 1052257+ 82 Linux swap
/dev/sda3 145 4863 37905367+ 83 Linux

Make filesystems
mkreiserfs /dev/sda1
mkreiserfs /dev/sda3
mkswap /dev/sda2

Mount SATA disk
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot


Mirror ATA -> SATA
cd /
tar cf - bin boot dev etc home initrd lib opt root sbin tmp usr var | ( cd /mnt/ && tar xBF - )
mkdir /mnt/mnt
mkdir /mnt/proc

Make SATA bootable
chroot /mnt /bin/bash
cd /boot
rm -f initrd-2.4.29-0.1smp.img System.map-2.4.29-0.1smp
mkinitrd -v --with=scsi_mod --with=libata --with=ata_piix --with=sd_mod initrd-2.4.29-0.1smp.img 2.4.29-0.1smp
ln -s . boot
Modify /etc/grub to something like:
title Red Hat Linux (2.4.29-0.1smp)
root (hd0,0)
kernel /boot/vmlinuz-2.4.29-0.1smp ro root=/dev/sda3
initrd /boot/initrd-2.4.29-0.1smp.img
Comment out other kernels, they will not boot anyway.

Modify /etc/fstab to something like:
/dev/sda1 /boot reiserfs defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/sda3 / reiserfs defaults 1 1
/dev/sda2 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
Exit chroot
exit

Reboot to SATA
Poweroff and remove ATA.
poweroff

Boot system
Configure (Kudzu) any new devises that changed.



It was a specific case, but might help.




chaitanya Ralegaonkar wrote:
I am trying top install red hat 9 on SATA hard disk , can any one help ?? I am getting message
" No hard drives found "

Thank you.
snip
--
Jeff

"...this wrong tool. Never use this."  -- Zathras

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to