cancel
Showing results for 
Search instead for 
Did you mean: 

initrd creation

admin1979
Super Advisor

initrd creation

Hello ,

We are in the process of testing our customised Linux based on SLES 10 SP1, onto a new system.

Initially the installation got failed at the start giving following error :

"Could not find the SUSE Linux Enterprise Server 10 Installation CD.
Activating Manual setup program."

We tried few options in the Manual Setup but it seems the installation image is not getting read.

We tested the same installation with downloaded SELS 10 SP2 and the installation got through.

Now clearly there is something missing in our customised initird which is present in SLES 10 SP2.
I understand that we will have to created a new initrd which matches the initrd of SLES 10 SP2.
Now how do I point out the difference and incorporate the same in new initrd?
Can you please guide me in right direction and then I will take over from there ?


Thanx,
Admin
13 REPLIES
Matti_Kurkela
Honored Contributor

Re: initrd creation

In Linux 2.6.* kernel series, an initrd/initramfs file is typically a cpio archive that has been compressed with gzip.

You might want to extract both the original and customized initrd to temporary directories, and then run "diff -r" or another comparision utility over both directories to find all the differences.

mkdir /tmp/original /tmp/custom
cd /tmp/original
zcat /somewhere/original-initrd.img | cpio -id
cd /tmp/custom
zcat /somewhere/custom-initrd.img | cpio -id
cd /tmp
diff -ur original custom

I think the problem might not be within the initrd file: instead, the installer is looking for some specific thing on the CD that identifies the CD as a SLES 10 installation CD. It might be the volume label of the CD, or a small, possibly hidden file in the root directory of the CD. Perhaps something like ".media-id"?

Apparently the installation program is not finding whatever it expects to find on your custom installation CD.

MK
MK
admin1979
Super Advisor

Re: initrd creation

Ok thanx for the reply firstofall.

Your suspect could be valid but I dont think so. Simply because the customised version works very well so far on all the machines.
Its only giving problem with new type of systems introduced recently in our environment.

So do you still think that the installer is not able to find specific thing on the CD?
Please let me know.

Meanwhile I would try to compare both initrds.
It would have been nice if there is someway to pinpoint somewhat exact location to look for the specific difference like scsi module or so.
Becauze if we compare SLES 10 SP1 and SP2 initrds , there will be many differences. So finding out the relevant one and incorporating it in existing initrd , could be a tedious task.

Let me hear from you.

Thanx again,
Admin
Matti_Kurkela
Honored Contributor

Re: initrd creation

Sorry, I missed the fact that a more than one SP level was involved.

> Its only giving problem with new type of systems introduced recently in our environment.

This is also important information you did not include in your original post.

You need more information about what is going wrong. Most Linux installation systems include a root shell on one of the virtual consoles, accessible by pressing Ctrl-Alt-. Typically the function key would be F2 or F3.

Start your SLES 10 SP1 installation and let it run until you see the error message, Then switch to the root shell and start looking around. The number of available tools may be very limited, but the /proc and /sys filesystems will most likely exist.

Run "dmesg | less" (or dmesg | more) and see if the kernel has detected the controller the CD drive is connected to (usually an IDE/SATA controller). If it is detected, can you mount the CD manually?

If the controller is not detected, I think the problem is that the kernel of SLES 10 SP1 is older than your new system model, so the drivers of SP1 are simply too old for your hardware. If that is the case, I think you would have these options:

- create a custom installation for SLES 10 SP1 that includes a newer kernel version than SLES10 SP1 normally has. It should be new enough to support your target hardware, yet old enough to not require many other updates to the libraries and utilities of SLES10 SP1.

or

- backport the appropriate SATA driver version from the kernel of SLES10 SP2 to SP1 kernel.

or

- recognize the fact that there is a clear technical reason why SLES10 SP1 is not supported on your newest hardware type, and migrate your software to SLES10 SP2 or newer.

MK
MK
admin1979
Super Advisor

Re: initrd creation


Hello,

Thanx for the reply.
I could not get any messages in dmesg ...is empty. But, Yes I found following relevant messages in one of the terminals.

Looking for a SUSE Linux Enterprise Server 10 installation CD.
Ok that didnt work : see if we can activate another storage device.
No further storage devices found : giving up.
Automatic setup not possible.

Does it mean that the Linux installer failed to get the proper CDROM drivers for the CDROM drive in system?

For cross check, I tried with SLES 10 SP2 and found the following messages when CDROM gets detected properly.

Looking for a SUSE Linux Enterprise Server 10 installation CD.
disk : trying to mount /dev/sr0
disk: media found in /dev/sr0
disk : /dev/sr0 : mount ok.
:
:
Then the installation proceeds as normal.


One more information I would like to share here is the o/p of lsmod :

In working environment :

#lsmod

ide_cd 36128 0 - Live 0xf885600
cdrom 32416 2 sr_mod, ide_cd, Lice 0xf884d000

In non-working environment :

#lsmod

ide_cd 35872 0 Live 0xf885600
cdrom 32288 2 sr_mod, ide_cd, Live 0xf884d000


Can we now conclude that its only the cdrom driver problem?
If yes then how do I find out the required drivers for this installation ?

Please suggest.


Thanx,
Admin
Matti_Kurkela
Honored Contributor

Re: initrd creation

It might be a ide_cd driver problem, but it is more likely a IDE controller driver problem.

The IDE CD-ROM/DVD standard has been very stable for a long time: even an old driver that can only identify CD-ROM writers (and not DVD drives) could access a modern high-speed DVD+-RW drive. It would detect the drive as a "CD-ROM writer that also supports some extra media types which the driver doesn't know about", and the old driver could certainly read CDs with that drive.

(I have successfully read DVDs using an old MS-DOS driver that came with my first IDE CD-ROM driver, which was older than the DVD standard. So I have a positive proof it's technically possible.)

But the IDE controller drivers change more often: when each new server chipset is introduced, the driver writers need to at least add the identification codes of the new chipset to the IDE drivers, even if no other change is necessary.

> ide_cd 36128 0 - Live 0xf885600
> cdrom 32416 2 sr_mod, ide_cd, Lice 0xf884d000

"cdrom" is the generic CD/DVD drive support utility module. It can support SCSI CD/DVD drives with the sr_mod module, and/or IDE CD/DVD drives with the ide_cd module.

"ide_cd" is the primary IDE CD/DVD support module: it provides the actual /dev/hd? device that refers to the CD/DVD drive. It will require the "cdrom" module for generating the right types of hardware commands, and another module for actually accessing the IDE controller. This may be a generic IDE module; in that case, the hardware-specific support will be in another module.

It is likely that the installation program has force-loaded both the ide_cd and sr_mod modules in an effort to find the CD drive. But if the underlying IDE controller driver has not found the IDE bus, it will report "there are no recognizable IDE drives on this system, CD-ROMs or otherwise" to the ide_cd module.

For example, here are all the CD/DVD-related modules from my computer. It's a SATA system, so libata is used instead of the ide module, but the principle is the same:

sr_mod 12759 1
cdrom 29865 2 pktcdvd,sr_mod
ahci 19425 10
libahci 15861 1 ahci
libata 142564 2 ahci,libahci
scsi_mod 149367 10 iscsi_tcp,libiscsi,scsi_transport_iscsi,firewire_sbp2,usb_storage,uas,sg,sd_mod,sr_mod,libata

The actual hardware driver here is "ahci".

The "lspci" listing of the problematic system might be useful. Even if lspci can identify the IDE controller it does not mean the IDE driver can do the same, but knowing the controller type would make it possible to search the kernel source code in the kernel.org version control system and see when the support for your chipset has been added.

It's unfortunate that the dmesg listing is empty: if my theory is correct, you would have seen messages mentioning "ide0" in the working case, and not in the non-working case.

You might want to look into /proc/ide and/or the appropriate sub-directories of /sys, in both working and non-working cases. You'd want to see if the IDE controller is detected in the non-working case, or not.

MK
MK
admin1979
Super Advisor

Re: initrd creation


Hi,

Based on your reply, curved my thoughts from CDROM to IDE controllers. Did I tell that both the Disk and CDROM are connected to SATA controllers.
Hence decided to make few changes in BIOS for testing.
Here are the changes that I made in BIOS :

Under IDE Configuration ==>

CONFIGURE SATA1 AS [] --------------------> CHANGED FROM SATA TO AHCI

SATA BIOS Extension [ENABLED]

Under AHCI Configuration ==>

AHCI BIOS SUPPORT [ENABLED]

AHCI Port0 [Hard Disk] .........Detected!!
AHCI Port4 [CDROM] .............Detected!!

After these changes, the installation got proceeded as required and I could finish the installation :-)

But ofcourse this is some wild workaround I tried which just worked. Now this testing I feel just confirms
what you are saying about IDE controller. Maybe its the SATA controller drivers which are missing here.
Do you get any clue further from the logs I attached herewith? (It has o/p of lsmod,lspci,lspci -vvv,dmesh & cat /proc/devices)

Please suggest.
admin1979
Super Advisor

Re: initrd creation

Any suggestions are welcome please.
admin1979
Super Advisor

Re: initrd creation


Hello ,


What is interesting to notice is , if we use SLES 10 SP2 to boot the system upto the Installation
menu and then replace the CD with SLES 10 SP1 media , the installation proceeds as normal without any error.

Not sure that could be the problematic thing over here.

Does it mean with SP1 , no cdrom/cd or hard disk gets detected ?

Any guesses ?

Thanx,
Admin
Matti_Kurkela
Honored Contributor

Re: initrd creation

According to your attachment, both the disks and the CD-ROM are ultimately using the driver module "ahci" to run the SATA controller.

It looks like the ahci module of the SLES 10 SP2 installation system *has* the necessary updates to understand the IDE/SATA controller in your newer system type, but the ahci module of the SLES 10 SP1 installation system *does not* have the required updates.

When you change the "CONFIGURE SATA1 AS [SATA/AHCI]" option in the BIOS settings, one of the results is that the PCI device ID of the SATA controller is changed. This can certainly make a difference on whether the controller can be detected or not.

Your system seems to have an Intel SATA controller "82801JD/DO (ICH10 Family)".
It has one of three different PCI device IDs, apparently depending on the mode it's configured to: 3a00, 3a02 or 3a05.

For Linux, the AHCI mode is recommended, since it allows the use of all controller features.

I looked at the source code of the ahci driver of the latest kernel version, and apparently only the PCI device ID 3a05 is directly recognized by the ahci driver; I could not quickly find the code to recognize the other possible IDs.

(Perhaps in SLES 10 SP2 and later, the other IDs are recognized by the legacy IDE-compatibility driver, or some logic that can switch the controller to AHCI mode; I don't know and could not find out with a quick search.)

> Does it mean with SP1 , no cdrom/cd or hard disk gets detected ?

Yes, I guess it might be like that. If the SP1 installer does not give you an opportunity to use the console to check /proc/partitions when it displays the error message, it will be hard to explicitly verify it; but the available indirect evidence seems to point that way.

If the installer searches for the installation CD before it even tries to look for hard disks, you will be stopped by the error message before the installer even has a chance to notice that there seems to be no disks at all.

If I understood correctly, you already have multiple ways to solve your problem:

1.) before installation on new hardware models, make sure the "CONFIGURE SATA1 AS" BIOS setting is set to AHCI

or
2.) boot with SLES 10 SP2 CD, then switch to SLES 10 SP1 media.

MK
MK
admin1979
Super Advisor

Re: initrd creation

Yes with the 2 workarounds , installation can be completed. But post installation I found that , many of the hardware is showing as unknown devices in the o/p of lspci.
Please find the attach for the relevant logs.

Our aim is not exactly to complete the installation but to find out the solution to the problems faced inorder to complete the installation.

So I guess , now I am trying to find out the exact drivers (*.ko ) which will detect the harddisk and cdrom. Once found , will include them in initrd and recreate the initrd and then try the installation.
Wonder from where I would find the exact drivers.
How about using the drivers already present in SP2. What is required to be done if I am to include these drivers in SP1 ?
Recompilation ??


Please suggest.


Thanx,
Admin




admin1979
Super Advisor

Re: initrd creation

Apology, Missed the attachment.

Matti_Kurkela
Honored Contributor

Re: initrd creation

> But post installation I found that , many of the hardware is showing as unknown devices in the o/p of lspci.

If lspci cannot identify a PCI/PCI-X/PCIe device, that only means the device IDs of that device are not included in pci.ids file (which is normally at /usr/share/mic/pci.ids). You can fix that by downloading the latest pci.ids file from http://pciids.sourceforge.net and replacing the distribution's standard pci.ids file with it.

The device IDs of the hardware that each driver can run are included in the driver modules.

In this case, it looks like the ahci + libata drivers are the key: In SLES 10 SP2 they contain the necessary updates to recognize the SATA interfaces. That allows the standard sr_mod + cdrom drivers to use the interfaces to access the CD-ROM drive, and the standard sd_mod driver to access the HDDs.

> How about using the drivers already present in SP2. What is required to be done if I am to include these drivers in SP1 ?
Recompilation ??

Recompilation at the very least. If you try it, you may find that the drivers of the SLES 10 SP2 will depend on some internal improvements of the kernel: you may have to copy those features too, and integrate them into the SLES 10 SP1 kernel. This is normally called "backporting". It is one of the reasons why major Linux distributors like Novell and RedHat employ some full-time Linux kernel developers.

The kernel modules are often tied to the exact kernel version they're compiled for: if the compile-time option CONFIG_MODVERSIONS is enabled (when compiling both the kernel and the modules), this restriction is somewhat relaxed, but it still won't allow you to use a module from a newer kernel version that needs a routine that doesn't exist or has a different in-kernel interface in your older kernel. So it's possible that you'll have to recompile the entire kernel to backport the driver.

Personally I haven't ever tried to do what you're planning. Yes, it is within the realm of possible. It might even be easy; or it might require you to become a skilled kernel debugger to accomplish it.

But I would strongly suggest re-applying your customisations to SLES 10 SP2, or even to SLES 11 instead of hanging onto SLES 10 SP1. Making and troubleshooting user-space modifications is easier than with kernel-space modifications.

The hardware manufacturers will keep producing newer hardware models, and there is no guarantee at all that a newer hardware can run a version of OS that is already old when the hardware model is introduced. As time goes on, eventually you won't be able to replace your current hardware when it fails with new off-the-shelf models, but instead you'll have to find replacements through services like eBay. Sooner or later you must move on anyway: it might be better to follow the development of your distribution of choice, rather than to be forced to re-implement everything after multiple major releases.

Also remember that if you use a customized kernel (e.g. with driver modules you've backported yourself) and have a kernel-related problem with it, you should expect Novell support to say something like "Please try to reproduce the problem with a standard SLES kernel, then we'll see about it." Anything above and beyond that will be at Novell's discretion.

MK
MK
admin1979
Super Advisor

Re: initrd creation

Hi there,

One question for you please,

This is the diff output for 2 different initrds ( 1 of SP1 and 1 of custom-made)

There is only difference in the entry of aic7xxx.

If possible can you elaborate how it will affect the installation?

# diff module.config module.config_orig
105,107c105,107

< megaraid,LSI Logic MegaRAID,,scsi_mod aic7xxx,,1
< megaraid_mbox,LSI Logic MegaRAID Mailbox,,megaraid_mm scsi_mod aic7xxx,,1
< megaraid_sas,LSI Logic MegaRAID SAS,,scsi_mod aic7xxx,,1

---
> megaraid,LSI Logic MegaRAID,,scsi_mod,,1
> megaraid_mbox,LSI Logic MegaRAID Mailbox,,megaraid_mm scsi_mod,,1
> megaraid_sas,LSI Logic MegaRAID SAS,,scsi_mod,,1


Thanx,
Admin