Results 1 to 4 of 4
Hi All, I've got a piece of hardware certified to run with red-hat kernel 2.6.24 (workstation?) and I have a test machine with a different kernel (non rpm) -- so ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-27-2011 #1
- Join Date
- May 2009
Redhat Enterprise, challenge, lilo and initrd / mkinitrd
I've got a piece of hardware certified to run with red-hat kernel 2.6.24 (workstation?) and I have a test machine with a different kernel (non rpm) -- so I need to downgrade but I have an older installation with LILO (still) and root is an ext2 system because of older kernels that need to boot and special tools....
So I downloaded the only rpm I could find that seemed to allow me a simple downgrade to the specific kernel I *must* use:
lilo-22.7.3-2.i386 (red hat's version must be used for big kenels)
I installed all the above packages successfully, reran lilo, and tried to boot -- but it fails unable to read/locate my root partition.
My root partition is on an IDE drive that I would like to have come up SCSI for compatability with the other kernels I run -- but the kernel is unable to autodetect it with the following snippet from lilo.config
boot = /dev/sda3 lba32 compact append="i8048.nopnp vt.default_utf8=0" prompt timeout = 100 # .... elidded .... image = /boot/vmlinuz-18.104.22.168_desktop-2 initrd = /boot/initrd.gz root = /dev/sda3 label = RH_22.214.171.124 read-only
mkinitrd -c -k 126.96.36.199_desktop-2 -m ext2:ide-scsi -f ext2 -r /dev/sda3
Expecting it to load a scsi module and the ext2 module, and then boot; but the boot stops with the ramdrive loaded and a prompt saying root can't be found.
Looking at the /dev/ drivers /dev/sda3 exists -- but is not accessable. (It's just a copy of the nodes from a running system). There are no partitions listed in /proc/partitions and even if I mknod hda b 3 0, I am unable to access the hard drive; what am I missing here? This is a challenging problem to use the old redhat lilo boot mechanism on a newer kernel.
What do I need to get this operating, even if just barely?
Normally, I would just recompile with ext2 and scsi, and that would take care of the problem in any non-redhat kernel -- but the hardware company won't guarantee/support anything but the stock compiled kernel.... so recompiling isn't an option.
Last edited by andrewr; 07-27-2011 at 07:58 PM.
- 07-28-2011 #2
- Join Date
- May 2009
I got a 2.6 stock kernel booting using lilo and PATA/E-IDE modules
Brain dead... I just realized what I was doing wrong; I was mixing ideas from 2.4 kernels with 2.6
in 2.6 kernels the legacy directory ide is not needed, all that is needed is in the scsi, fs, and ata directories.
(including a chip set driver for my board... yours may differ from ata/ata_piix )
This example gets an ide/ata kernel module installed after boot into a temporary ram drive, and sets up a file system for the root partition; most other fixes I found online are so old that they suggest getting rid of the lba accesses in linux which would limit the kernel placement to the first 1024 cylinders; that is pointless red herring advice; as well as the suggestions not to compile advanced partitions. Just including the correct set of newer drivers does the trick on newer (2.6) kernels. This may be old in 3.xxx kernels...
my install list for the initrd file that loads modules looks like:
# lines needed to load your modules, like this: # Add the ext2 file system for root to boot on insmod -v /lib/modules/$(uname -r)/kernel/fs/mbcache insmod -v /lib/modules/$(uname -r)/kernel/fs/ext2/ext2 # other fs... here # Add the scsi and basic ata command set drivers/libraries insmod -v /lib/modules/$(uname -r)/kernel/drivers/scsi/scsi_mod insmod -v /lib/modules/$(uname -r)/kernel/drivers/scsi/sd_mod insmod -v /lib/modules/$(uname -r)/kernel/drivers/scsi/sr_mod insmod -v /lib/modules/$(uname -r)/kernel/drivers/ata/libata # Add the ATA/IDE controller chipset insmod -v /lib/modules/$(uname -r)/kernel/drivers/ata/ata_piix #insmod -v /lib/modules/$(uname -r)/kernel/drivers/ata/pata_mpiix # Legacy IDE possibilities if really stuck, don't use unless forced to #insmod -v /lib/modules/$(uname -r)/kernel/drivers/scsi/ide-scsi #insmod -v /lib/modules/$(uname -r)/kernel/drivers/ide/ide-core #insmod -v /lib/modules/$(uname -r)/kernel/drivers/ide/pci/generic
Oh, and if you use mkinitrd -c -k ... , don't be surprised if the kernel modules are gzipped in the new kernels and the script isn't bright enough to remove the compression or unpack the compressed modules. I just went into the /boot/initrd-tree/lib/modules/.... directories and gzip -d .../* each of the directories with modules. The entire ram drive is compressed when a final mkinitrd is run with no parameters following it, anyway, so it actually wastes more space to compress it twice.
I then just used my standard lilo with an ignore mismatches command (my mbr/partition table got messed up trying to figure this out -- but that isn't important when running "lba" and "compact" in lilo; I was able to do a "lilo -P ignore" and boot.
Happy booting.... boot... boot....
Last edited by andrewr; 07-28-2011 at 03:03 AM.
- 07-28-2011 #3
- Join Date
- May 2009
How do I configure a red-hat kernel without make files....
Now that it boots, I try to install the NI-488.2 for Linux hardware driver and it still complains my kernel source is not installed; although it is.
For your information, I am trying to install an NI GPIB dongle on my system; National instruments support is very weak -- tied to old distributions of Redhat, Mandrake, and Suse which have to be *very* specifically configured. I had to *downgrade* my kernel to even get this far -- and it doesn't like my RPM database, so I have to "INSTALL --nodeps". This isn't a simple install problem -- it's pretty hairy; even on Enterprise Red Hat....
According to the script from the manufacturer (their techs are clueless), the installation program is looking to see if links such as /usr/src/linux are linked to the proper kernel source, etc. And even an RPM install of kernel source doesn't appear to do that!
Nor the "kernel-desktop-config-188.8.131.52-2.i386" which has only:
FILE LIST: ./ usr/ usr/src/ usr/src/linux-184.108.40.206_desktop/ usr/src/linux-220.127.116.11_desktop/Module.symvers-dist usr/src/linux-18.104.22.168_desktop/config-dist usr/src/linux-22.214.171.124_desktop/include/ usr/src/linux-126.96.36.199_desktop/include/linux/ usr/src/linux-188.8.131.52_desktop/include/linux/autoconf-dist.h usr/src/linux-184.108.40.206_desktop/include/linux/utsrelease.h usr/src/linux-220.127.116.11_desktop/include/linux/version.h
******************************** ERROR **************************************** * Kernel source in /usr/src/linux does not appear to be * for the 18.104.22.168_desktop-2 kernel. * Ensure that kernel source for the 22.214.171.124_desktop-2 kernel is installed * and configured. Refer to the README file for the product you are * * installing for information about configuring your kernel source. * ******************************** ERROR ****************************************
Inside the source directory, the default kernel *is* available in the file: "config-dist", but it doesn't notice that.
But, when I look for the "Makefile", it doesn't exist (either) in the top linux source directory -- unlike it does on vanilla kernels! So what does one do to get the kernel source to configure as an x86 compile with the default configuration?
Anyone know how a 2.6.24 kernel gets configured under red hat?, do I need another rpm besides the kernel source code and the configure?
I'm about ready to send this dongle back and make my own!
To fake it out is very tedious: so far...Code:
# ln -s /usr/src/linux-xxx /usr/src/linux # ln -s /usr/src/linux/include/asm /usr/src/linux/include/asm-x86 # touch /usr/src/linux/include/asm/asm_offsets.h # Dummy file
Last edited by andrewr; 07-28-2011 at 03:39 AM.
- 08-21-2011 #4
- Join Date
- May 2009
My superior decided I was going to work on this a little longer, so I thought I'd let you all know the upshot....
The onlynewer kernel certified to run with the NI-488 HS dongle (126.96.36.199) is found under Mandriva Linux. However, it does not work with the stock NI-488 HS drivers that come on CD; it only works with the *beta* drivers. The complete source code from Mandriva must be installed and compiled for the NI-software to operate at all. To avoid making mistakes, I asked for a configured kernel from NI (as kernels are open source, *and* NI supposedly has a working one, somewhere....) so I could buy a computer to run it -- but they refused. (s*t*u*p*i*d)
Even though the kernel is supposed to be supported by the beta software -- there were still problems installing their package no matter what combination of things I tried; eg: in the end, kernel headers needed small edits, as well as NI's installation software. The purchasing department finally got tired of their lack of support, and so it did get sent back even though I had it barely installed, finally, on Mandriva. The high speed dongle is essentially useless under newer Linux kernels as both NI's and open source drivers don't work with the High speed dongle without (custom) editing; The open source drivers do *appear* to have source and instructions for operating the older *low* speed NI GPIB/USB dongle. I wasn't able to test one, but if you *must* go this route -- I'd suggest buying the lower speed NI dongle and trying the open source support.