Bug 120961

Summary: kernel loads modules even when hw changed, so it is not pressent any more
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Ladislav Michnovic <lmichnovic>
Component: KernelAssignee: Andreas Jaeger <aj>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P5 - None CC: andreas.hanke, hare
Version: RC 4   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ladislav Michnovic 2005-10-07 11:45:28 UTC
Changing motherboard on installed system, it is unable to boot up, because
kernel loads ide controller driver bounded to previos motherboard even it is not
pressent any more. After module loads, kernel was unable to communicate with
harddisk any more. It was IDE harddrive, not SATA, nor SCSI.
Comment 1 Hubert Mantel 2005-10-10 12:35:07 UTC
Sure, where should the kernel know that you changed the hardware? If you just
take some hard disc and install it in a new computer, chances are low it will
still work.
Comment 2 Ladislav Michnovic 2005-10-10 13:41:54 UTC
I DISAGREE!

Please take a look at this document, a part of Linux Documentation Project:
http://www.ibiblio.org/pub/Linux/docs/linux-doc-project/users-guide/user-beta-1.pdf.gz
at the end of page 14 (page 24 of the pdf file).
Quote:
"Linux then looks at the type of hardware it's running on.  It wants
to know what type of hard disks you have, whether or not you have a
bus mouse, whether or not you're on a network, and other bits of
trivia like that.  
Linux can't remember things between boots, so it has to ask these questions 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
each time it starts up. Luckily, it isn't asking you these questions -
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- it is asking the hardware!"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

At the other side, with Mandrake Linux, I never had a problem to put hdd to
completely different computer and boot up. 

Even MS Windows can handle such situation and boot up.

It is really weired load kernel modules without check if hw is pressent, so boot
up process dies.
Comment 3 Hubert Mantel 2005-10-10 15:48:13 UTC
Andreas, IMHO we need to make this a feature request. It is not a kernel bug at
all. My problem is that I cannot close this "bug" as invalid, because the
reporter will always re-open it. And of course this is at least a "critical" bug
because all the people in the world change their mainboard or other basic
components every evening, so if we don't extend our boot concept big way our
system is unusable.
Again, this is not a kernel bug, everything is working as designed. Please
assign half a dozen of people to this new feature so we can fix this critical
bug in future releases.
Comment 4 Ladislav Michnovic 2005-10-10 17:00:02 UTC
I don't want to be thought as fault-finder. I will not reopen this bug again. 
Just explain me, why is this behavior O.K.
If you decide, it's not worthy to implement this feature, I'll accept that. 
I have just a another point of view, if it's a feature or bug of kernel
behavior. It is unimportant. It can be a feature for you and bug for me. 
I really didn't know which component to choose, kernel seemed like most appropriate.
Maybe I should posted this as an enhancement.
Comment 5 Hubert Mantel 2005-10-11 14:51:54 UTC
During installation, the kernel configuration (mostly the initrd containing the
drivers needed to access the root device) is made. This configuration is not
dynamic, the initrd with the drivers is just loaded by the boot loader just as
grub or lilo. This is why things don't work if you just use a different disk
controller (which is exactly what can happen when exchanging the motherboard).
Making this dynamic would mean to have some sort of hardware detection during
the early boot stage and have all possible disk controller drivers in the
initial ramdisk. Some special linuxrc would need to decide which module needs to
get loaded. This is all doable and desirable for some people, but it is also
quite a bit of work. The current behaviour is not a bug. It works as designed.
If we want to invest time in adding this feature is something the project
manager needs to decide.
Comment 6 Ladislav Michnovic 2005-10-11 15:28:35 UTC
You're right, it is an enhancement.
Comment 7 Andreas Jaeger 2006-01-04 10:07:08 UTC
Hannes, this is a feature for the initrd generation.  Any ideas?  Should we add this as feature for 10.2?
Comment 8 Andreas Jaeger 2006-02-08 09:27:38 UTC
Hannes?
Comment 9 Hannes Reinecke 2006-02-08 10:42:33 UTC
Nope.

We can't add ide_generic to the initrd as this would automatically claim all IDE ports _not_ initialised during booting.
So we would fail every attempt to load those devices later via udev.

I would strongly disagree to implement something like this in initrd.
Unless, of course, the decision is to put _all_ device modules into the initrd; then of course we can select the correct module.

But as it stand now (ie generating a minimal initrd) we cannot fix this.
Comment 10 Andreas Jaeger 2006-02-08 10:50:47 UTC
So, what shall we do?  Close as WONTFIX?
Comment 11 Hannes Reinecke 2006-02-08 12:02:09 UTC
Certainly for 10.0.

Feature request for 10.1.
Comment 12 Andreas Jaeger 2006-02-08 13:03:14 UTC
WONTFIX for 10.0 and 10.1 - I'll keep it as feature for 10.2.
Comment 13 Ladislav Michnovic 2006-02-08 13:14:54 UTC
Thanks.
 So I don't have to fill feature request? 
Comment 14 Andreas Jaeger 2006-02-08 13:31:25 UTC
Correct, I'll do it...
Comment 15 Ladislav Michnovic 2006-02-08 14:00:05 UTC
Thank you. 
 Actually, I filled bug #120959 about initrd. This bug (enhancement) was about, that after I changed initrd IDE module to generic, the kernel still loads the specific module probably from modules.conf. I don't know if this behavior changed in 10.1. I'll take a closer look.
Comment 16 Ladislav Michnovic 2006-05-24 15:50:03 UTC
I made a test with SL 10.1 and it is possible to boot up on different hardware, but this was needed to do: boot from install CD, chroot on the / partition on the hdd and run mkinitrd. Mkinitrd wrote a correct ide module in reference to motheboard's southbridge. After reset SL 10.1 will boot up. 
Comment 17 Andreas Jaeger 2006-10-01 08:07:06 UTC
Looking at #16, I guess we can close this as FIXED.