First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 180111
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Genkernel Maintainers <genkernel@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Paul Hewlett <paul@gccs.co.za>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 180111 depends on: Show dependency tree
Bug 180111 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-05-28 13:10 0000
We recently took delivery of some Intel motherboards that had IDE sockets but
used the Marvell chipset. This uses a pata driver and infortunately these
drivers are not put into the initramfs - thus boot fails with a 'no boot device
found' message. 

The following procedure was done on a 2.6.20 hardened r2 kernel. It works but
some things I do not understand and someone more knowledgeable should check
this.

Edit the following file:  /usr/share/genkernel/x86/modules_load
Add the line

MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000
pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_optidma
pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks
pata_legacy pata_ns87410 pata_pcmcia pata_isapnp pata_ali pata_amd pata_opti
pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell
pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520
pata_cs5530 pata_cs5535 pata_sl82c105"

I have added every pata module except pata_winbond which gave an error on boot.

Then edit the file /usr/share/genkernel/generic/initrd.defaults. Change the
entries for HWOPTS and add the pata group

HWOPTS='usb firewire keymap cache evms2 pata sata lvm2 dmraid slowusb fs'
MY_HWOPTS='usb firewire pata sata dmraid fs net'

Rebuild your kernel or initramfs by executing

genkernel initrd

This kernel/initramfs will now boot off a CD on PATA motherboard.

Some questions

   Do I have to change both HWOPTS and MY_HWOPTS in initrd.defaults ?

   The genkernel script is quite capable of generating MY_HWOPTS dynamically
and this would be an improvement.

   At the top of the genkernel script, the modules_load file is source'd but
the loop following this source statement references ${!AMODULES_*} instead of
${!MODULES_*}. Is this an error ?  [ genkernel 3.4.6 ]

   There is an append_modules() function in gen_initramfs.sh that does not
appear to be used anywhere ?


Reproducible: Always

Steps to Reproduce:
1.Boot off live CD on PATA motherboard
2.
3.

Actual Results:  
See description above

Expected Results:  
Successful boot off live CD on pata motherboard

emerge --info

Portage 2.1.2.7 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r5,
2.6.20-hardened-r2 i686)
=================================================================
System uname: 2.6.20-hardened-r2 i686 Intel(R) Celeron(R) CPU 2.40GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 21 May 2007 09:00:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.60
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=i686 -Os -pipe -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/fax /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/php/apache2-php5/ext-active/
/etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild
/etc/terminfo"
CXXFLAGS="-mtune=i686 -Os -pipe -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms
strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/src/asterisk"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsyncproxy/gentoo-portage"
USE="alsa berkdb bluetooth cdr cgi cli crypt dba dbm dvd hal hardened kerberos
ldap ldapsam midi netboot nls pam pic ppds readline samba sqlite3 srvdir ssl
tcpd urandom x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare
dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw
multi null plug rate route share shm softvol" ELIBC="glibc"
INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS,
PORTDIR_OVERLAY

------- Comment #1 From Jakub Moc (RETIRED) 2007-05-28 14:08:25 0000 -------
Please try w/ genkernel-3.4.8; also, which module you need added? There's no
problem w/ booting from PATA here.

------- Comment #2 From Paul Hewlett 2007-05-29 13:28:47 0000 -------
(In reply to comment #1)
> Please try w/ genkernel-3.4.8; also, which module you need added? There's no
> problem w/ booting from PATA here.
> 
I have tried 3.4.8 but no change. I still had to add the MODULES_PATA variable
to /usr/share/genkernel/x86/modules_load. The motherboard is an Intel DG965wh.
Incidentally the Gentoo 2007.0 minimal install CD will not boot this M/B.

I booted a SuSe 10.2 and noted that it loaded the pata_marvell module. Adding
this module enables booting from a Live Cd on this M/B.

There are BIOS options to make the disk interface 'Legacy' but this has no
effect - you must load the pata_marvell module before you can boot and this
means you must install this module in the initramfs and that is why you need to
change modules_load and initrd.defaults. 

------- Comment #3 From Jakub Moc (RETIRED) 2007-05-29 19:36:13 0000 -------
Reopen.

------- Comment #4 From Andrew Gaffney 2007-05-29 19:48:34 0000 -------
The reason it's not loaded automatically is because we don't use the new PATA
drivers in the default genkernel configs. Why are you using genkernel to build
a custom kernel, anyway?

------- Comment #5 From Paul Hewlett 2007-05-30 07:39:40 0000 -------
(In reply to comment #4)
> The reason it's not loaded automatically is because we don't use the new PATA
> drivers in the default genkernel configs. Why are you using genkernel to build
> a custom kernel, anyway?
> 
We're not building a custom kernel. We have a master PC from which we ghost our
production machines (which can be any M/B). So our kernel must be generic
similarly to the Gentoo 2007/0 minimal install CD or any other live CD (knoppix
etc.).

Other live CD's of recent vintage boot off this M/B except Gentoo simply
because Gentoo does not (as you say) load the PATA drivers.

Note that this bug does *not* just pertain to our ghosting process - the
standard Gentoo Live CD/Install CD's also do not boot off this M/B and the only
fix is to load the PATA drivers from initramfs.

The Suse 10.2 DVD does boot - but then it does auto-detect the pata_marvell
driver that this M/B requires. The Gentoo initramfs seems not to do
auto-detection but blindly loads all drivers that it scans for i.e those listed
in /usr/share/genkernel/x86/modules_load


------- Comment #6 From Paul Hewlett 2007-05-31 12:24:23 0000 -------
Any progress ?

I am willing to test any changes - I have 2 of the offending motherboards

------- Comment #7 From Paul Hewlett 2007-05-31 13:17:39 0000 -------
I have just tried Startcom Enterprise 5 Linux which is a free version of RHEL5.
It does not boot off the CD either. One can boot the kernel - it loads a driver
and then cannot autodetect the boot device (much as Gentoo also fails to do) -
a dialog is then displayed and you can select a driver - unfortunately the
pata_marvell selection is unavailable. I tried setting the BIOS to Native-IDE
or Native-AHCI but neither worked. The closest driver selection available is
the sata_mv driver.

Fedora 6 fails identically to Startcom.

Ubuntu 6.1 fails dramatically - you are dropped into an ash shell and the log
on console 1 shows that it was unable to access /root/ /proc and other
filesystems

Windows 2000, Windows XP SP2 both boot successfully and will format the disk
and start copying files.

------- Comment #8 From Andrew Gaffney 2007-05-31 13:33:20 0000 -------
Annoying us with "is it done yet?" and useless information won't get us to do
anything faster. You've already told us how to fix it. We'll get around to it
when we get around to it.

------- Comment #9 From Chris Gianelloni (RETIRED) 2007-06-21 22:11:24 0000 -------
(In reply to comment #0)
>    Do I have to change both HWOPTS and MY_HWOPTS in initrd.defaults ?

Yes.  HWOPTS is a list of all options, MY_HWOPTS is a list of what is enabled.

>    The genkernel script is quite capable of generating MY_HWOPTS dynamically
> and this would be an improvement.

Feel free to file a bug with that patch and I'll add it, but MY_HWOPTS changes
depending on the command line options passed.

>    At the top of the genkernel script, the modules_load file is source'd but
> the loop following this source statement references ${!AMODULES_*} instead of
> ${!MODULES_*}. Is this an error ?  [ genkernel 3.4.6 ]

Nope.  It's done on purpose for different functionality.

>    There is an append_modules() function in gen_initramfs.sh that does not
> appear to be used anywhere ?

It should be used by the code that also uses AMODULES_* but it definitely is
not being used.  I'm not really sure if there's a bug in some other code and it
*should* be getting called and isn't or if it is just useless now and should be
removed.

Anyway, I would like to thank you for the code below and I have added it to
genkernel SVN.  It'll show up in the next genkernel version.  What error did
you get with winbond, do you remember?

------- Comment #10 From Paul Hewlett 2007-06-22 12:24:09 0000 -------
(In reply to comment #9)
> (In reply to comment #0)
   The genkernel script is quite capable of generating MY_HWOPTS dynamica> >    
> 
> Feel free to file a bug with that patch and I'll add it, but MY_HWOPTS changes
> depending on the command line options passed.

No I will leave this alone

> 
> Anyway, I would like to thank you for the code below and I have added it to
> genkernel SVN.  It'll show up in the next genkernel version.  What error did
> you get with winbond, do you remember?
> 
Thanks. Unfortunately I cannot remember the winbond error. I tried to repliacte
it but we have already remade all our LiveCD's without winbond. I will be
building machines late next week and will force the error then and report back
if I can.

When will your changes find their way into mainstream? When they appear I will
try them on these M/B

------- Comment #11 From Chris Gianelloni (RETIRED) 2007-06-23 13:40:30 0000 -------
If you have the time to replicate the error, I would love to see it.  If not,
I'll just take your word for it and try to figure out where to go from there
for the winbond driver.  The first step would likely be to figure out how
popular the chipset is in the wild and then decide if we can afford to not
support it or not.

As for the new genkernel, I am actually planning on making the next release
genkernel 3.5, which will include a few more changes than a 3.4.9 release.  If
you're willing to test an unreleased version of genkernel, I can roll one up
especially for you to try out this functionality.  I'd definitely like to know
the new PATA support works before I roll 3.5 out.  I just don't see myself
getting all the bugs fixed and new functionality added to genkernel in a speedy
manner and I don't want to miss the opportunity to have someone with the
hardware test it.  Of course, you can roll your own, too.  All I am going to do
is package up what I have in SVN now as a tarball.  It should be functional
as-is from SVN right now.  If not, I'd like to get *that* fixed, too... :P

------- Comment #12 From Paul Hewlett 2007-06-25 13:36:48 0000 -------
For the record, please note that I tried to boot off these motherboards using
the 'doload' option from the grub boot prompt i.e. typing 'gentoo
doload=pata_marvell' and this did not work with *any* combination of settings
in the bias.

(In reply to comment #11)
> If you have the time to replicate the error, I would love to see it.  If not,
> I'll just take your word for it and try to figure out where to go from there
> for the winbond driver.  The first step would likely be to figure out how
> popular the chipset is in the wild and then decide if we can afford to not
> support it or not.
> 

I rebuilt my initramfs with pata_winbond added back and rebooted my PC (which
is *not* one of the offending motherboards) and the error from 'dmesg' is
(repeated many times) :

x0 irq 14
IRQ handler type mismatch for IRQ 14
current handler: ide0
 [<c0183651>]  [<f88d737e>]  [<f88d305c>]  [<c01837e0>]  [<f88d3b05>] 
[<f88db425>]  [<f88da5f8>]  [<c02af7a1>]  [<f8d4019d>]  [<c036b2b6>] 
[<c0163ee3>]  [<f8d40232>]  [<f8952284>]  [<c01799d2>]  [<c0145cf0>] 
=======================
platform pata_winbond.0: irq 14 request failed: -16
ata1027: PATA max PIO4 cmd 0x1F0 ctl 0x3F6 bmdma 0x0 irq 14
IRQ handler type mismatch for IRQ 14
current handler: ide0
 [<c0183651>]  [<f88d737e>]  [<f88d305c>]  [<c01837e0>]  [<f88d3b05>] 
[<f88db425>]  [<f88da5f8>]  [<c02af7a1>]  [<f8d4019d>]  [<c036b2b6>] 
[<c0163ee3>]  [<f8d40232>]  [<f8952284>]  [<c01799d2>]  [<c0145cf0>] 
[<c0144d3b>]  [<c0145d11>]  [<c0360033>]  =======================
platform pata_winbond.0: irq 14 request failed: -16
ata1028: PATA max PIO4 cmd 0x1F0 ctl 0x3F6 bmdma 0x0 irq 14
IRQ handler type mismatch for IRQ 14
current handler: ide0
 [<c0183651>]  [<f88d737e>]  [<f88d305c>]  [<c01837e0>]  [<f88d3b05>] 
[<f88db425>]  [<f88da5f8>]  [<c02af7a1>]  [<f8d4019d>]  [<c036b2b6>] 
[<c0163ee3>]  [<f8d40232>]  [<f8952284>]  [<c01799d2>]  [<c0145cf0>] 
[<c014007b>]  [<c0144d3b>]  [<c0145d11>]  =======================
platform pata_winbond.0: irq 14 request failed: -16
ata1029: PATA max PIO4 cmd 0x1F0 ctl 0x3F6 bmdma 0x0 irq 14
IRQ handler type mismatch for IRQ 14
current handler: ide0
 [<c0183651>]  [<f88d737e>]  [<f88d305c>]  [<c01837e0>]  [<f88d3b05>] 
[<f88db425>]  [<f88da5f8>]  [<c02af7a1>]  [<f8d4019d>]  [<c036b2b6>] 
[<c0163ee3>]  [<f8d40232>]  [<f8952284>]  [<c01799d2>]  [<c0145cf0>] 
=======================
platform pata_winbond.0: irq 14 request failed: -16
ata1030: PATA max PIO4 cmd 0x1F0 ctl 0x3F6 bmdma 0x0 irq 14
IRQ handler type mismatch for IRQ 14
current handler: ide0
 [<c0183651>]  [<f88d737e>]  [<f88d305c>]  [<c01837e0>]  [<f88d3b05>] 
[<f88db425>]  [<f88da5f8>]  [<c02af7a1>]  [<f8d4019d>]  [<c036b2b6>] 
[<c0163ee3>]  [<f8d40232>]  [<f8952284>]  [<c01799d2>]  [<c0145cf0>] 
[<c01a007b>]  =======================
platform pata_winbond.0: irq 14 request failed: -16
ata1031: PATA max PIO4 cmd 0x1F0 ctl 0x3F6 bmdma 0x0 irq 14
IRQ handler type mismatch for IRQ 14
current handler: ide0
 [<c0183651>]  [<f88d737e>]  [<f88d305c>]  [<c01837e0>]  [<f88d3b05>] 
[<f88db425>]  [<f88da5f8>]  [<c02af7a1>]  [<f8d4019d>]  [<c036b2b6>] 
[<c0163ee3>]  [<f8d40232>]  [<f8952284>]  [<c01799d2>]  [<c0145cf0>] 
[<c036007b>]  =======================
platform pata_winbond.0: irq 14 request failed: -16
ata1032: PATA max PIO4 cmd 0x1F0 ctl 0x3F6 bmdma 0x0 irq 14
IRQ handler type mismatch for IRQ 14
current handler: ide0
 [<c0183651>]  [<f88d737e>]  [<f88d305c>]  [<c01837e0>]  [<f88d3b05>] 
[<f88db425>]  [<f88da5f8>]  [<c02af7a1>]  [<f8d4019d>]  [<c036b2b6>] 
[<c0163ee3>]  [<f8d40232>]  [<f8952284>]  [<c01799d2>]  [<c0145cf0>] 
=======================

etc etc....

With the changes I originally did (from my initial post), all the pata drivers
are loaded and sit in memory. I can load and unload them using the modprobe
command without error. The reloading of the module after unloading it is slow.
Only the pata_winbond module reports 'no such device' and generates the above
errors in the dmesg log.
I would speculate that the winbond driver is not coded to the same standard as
the others.


> you're willing to test an unreleased version of genkernel, I can roll one up
> especially for you to try out this functionality.  I'd definitely like to know
> the new PATA support works before I roll 3.5 out.  I just don't see myself
> getting all the bugs fixed and new functionality added to genkernel in a speedy
> manner and I don't want to miss the opportunity to have someone with the
> hardware test it.  Of course, you can roll your own, too.  All I am going to do
> is package up what I have in SVN now as a tarball.  It should be functional
> as-is from SVN right now.  If not, I'd like to get *that* fixed, too... :P
> 

I will test it - how will you send it to me ? (patch ?)

------- Comment #13 From Chris Gianelloni (RETIRED) 2007-08-22 02:09:09 0000 -------
Actually, I've got quite a few people that need to test things, so I'll be
rolling out a genkernel-3.4.9_pre1 shortly.

------- Comment #14 From Chris Gianelloni (RETIRED) 2007-08-22 19:54:10 0000 -------
Please test genkernel 3.4.9_prer1 or better.  This should be fixed now.

First Last Prev Next    No search results available      Search page      Enter new bug