public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [RFC] be more verbose when probing EDD
@ 2007-12-16 15:34 devzero
  2007-12-16 17:34 ` Parag Warudkar
  2007-12-16 18:17 ` H. Peter Anvin
  0 siblings, 2 replies; 18+ messages in thread
From: devzero @ 2007-12-16 15:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matt.Domsch, hpa

Hello!

i`m sysadmin for quite some time and while being that, i have come across the one or another system, which refused to boot a linux kernel. typical symptom i have seen is a blinking cursor in the upper left just after kernel/initrd were loaded.

i never spent much time on that and either choose another system for linux or choose "failsafe" option, if the installer of my favourite distro gave that option.

since a colleague of mine was hit by that problem some weeks ago and i also came across that again recently, i started to investigate deeper and found, that EDD Bios probe is the problem here.

i found more than a handful of references on the net where people report similar problems. many discussion threads contained that typical smattering babble and seldom somebody gave that essential hint "try edd=off" for which i`m sure it would have helped many times.

that`s why i started to spend some thoughts on this how to make this easier/better for the user.

so

- it seems there are buggy Bios implementations out there which have problems with EDD
- your favourite distro may have set CONFIG_EDD=y|m , so EDD probe is on by default quite often nowadays.
- setting "edd=off" when you get that hang on boot is _not_ obvious.
- adressing this issue may be a little bit late, since i have mostly seen that problem on older machines, but not on recently bought
- i have at least two different systems with different types of chipsets to demonstrate this

on one of those, i added some printf`s to edd.c and this routine seems to be problematic and never returns 

        /* Extended Get Device Parameters */

        ei->params.length = sizeof(ei->params);
        ax = 0x4800;
        dx = devno;
        asm("pushfl; int $0x13; popfl"
            : "+a" (ax), "+d" (dx), "=m" (ei->params)
            : "S" (&ei->params)
            : "ebx", "ecx", "edi");

i had a short conversation with matt domsch and hpa, who both think that additional printf`s would be an easy solution and not too bad to be added.

here is a quick and dirty initial patch from me:

--- linux-2.6.23/arch/x86/boot/main.c.orig      2007-12-09 11:40:24.315346712 +0100
+++ linux-2.6.23/arch/x86/boot/main.c   2007-12-09 16:11:43.644512504 +0100
@@ -152,7 +152,10 @@
 
        /* Query EDD information */
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
-       query_edd();
+        printf("Probing EDD (query Bios for boot-device information)\n");
+        printf("If boot hangs here, you may have a buggy Bios. Try edd=skipmbr or edd=off");
+        query_edd();
+        printf("\rOK                                                                       \n");
 #endif
        /* Do the last things and invoke protected mode */
        go_to_protected_mode();


ok, fore sure it`s better to do that stuff in query_edd() itself, but before making a better version, i`d like to discuss if such patch would get accepted at all and if it`s a valid approach to let the kernel print some line which get`s overwritten ("\rOK + lot`s of whitespaces") milliseconds later on successful function return.

regards
roland

______________________________________________________________________________
Jetzt neu! Im riesigen WEB.DE Club SmartDrive Dateien freigeben und mit 
Freunden teilen! http://www.freemail.web.de/club/smartdrive_ttc.htm/?mc=021134


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [PATCH] [RFC] be more verbose when probing EDD
@ 2007-12-16 19:11 devzero
  2007-12-16 19:59 ` Parag Warudkar
  0 siblings, 1 reply; 18+ messages in thread
From: devzero @ 2007-12-16 19:11 UTC (permalink / raw)
  To: Parag Warudkar; +Cc: Matt.Domsch, hpa, linux-kernel

> It does not look like this issue is common - googling for "Linux EDD Boot 
> hang" does not bring up relevant and recent results - in fact this post of 
> yours comes on top.

i don`t wonder here - how should one know that it`s an edd problem if all he sees is a blank screen with a blinking cursor in the upper left ?
so i assume, "Linux EDD Boot hang" isn`t the best term for searching here.

i think, there is no universal search phrase - i found some references with different words (linux install, blank screen, blinking cursor....)

some of them
http://forums.suselinuxsupport.de/lofiversion/index.php/t61581.html
http://suseforums.net/index.php?showtopic=1302  
http://forums.suselinuxsupport.de/lofiversion/index.php/t3157.html
http://www.linuxforums.org/forum/installation/73984-cant-boot-past-loading-kernel-fedora-4-a.html
http://ubuntuforums.org/archive/index.php/t-146180.html
http://ubuntuforums.org/showthread.php?t=450630
http://www.linuxquestions.org/questions/linux-software-2/grub-freezes-before-uncompressing-kernel-464619/

not sure if really all of them are the edd problem i have, but i`m quite sure for some of those.
can provide more links if somebody likes.

> Adding 3 printks for each such obscure problem would make it even more 
i wouldn`t call that problem obscure.
i have seen this problem more than 5 times since that code is in linux. so it`s at least enough to discuss about even if no other person thinks it`s necessary :)  just the fact that it`s not been discussed often (here or elsewhere) doesn`t mean, that it exist or that users come across that. it`s more that type of "mhh, let`s try linux instead of windows. oh, doesn`t boot. ok, let`s stay with windows then...". you don`t expect people like those posting the right question to the right forum, do you?


> If there are known chipsets / BIOSes that have this problem - applying 
> quirks - something like this quirk for pmtmr [1]- (if they work this 
> early) or even special casing them with forced edd=off may be the right and more useful thing to do.
mhh. i`m unsure. ok, i`m no kernel-hacker but there are so many variants of bios/hardware out there so blacklisting certain bios versions may be never more than half of a solution.

roland


> -----Ursprüngliche Nachricht-----
> Von: "Parag Warudkar" <parag.warudkar@gmail.com>
> Gesendet: 16.12.07 18:34:48
> An: devzero@web.de
> CC: linux-kernel@vger.kernel.org, Matt.Domsch@dell.com, hpa@zytor.com
> Betreff: Re: [PATCH] [RFC] be more verbose when probing EDD

> 
> On Sun, 16 Dec 2007, devzero@web.de wrote:
> 
> >
> > - it seems there are buggy Bios implementations out there which have problems with EDD
> > - your favourite distro may have set CONFIG_EDD=y|m , so EDD probe is on by default quite often nowadays.
> > - setting "edd=off" when you get that hang on boot is _not_ obvious.
> 
> It does not look like this issue is common - googling for "Linux EDD Boot 
> hang" does not bring up relevant and recent results - in fact this post of 
> yours comes on top. Further more there does not seem to be problems with 
> newer BIOSes so we would be irritating lot many users needlessly.
> 
> Adding 3 printks for each such obscure problem would make it even more 
> complex to parse and make sense of the boot log - I, for example, already 
> dislike the mostly-useless-to-end-user stuff it spews on a normal boot.
> 
> If there are known chipsets / BIOSes that have this problem - applying 
> quirks - something like this quirk for pmtmr [1]- (if they work this 
> early) or even special casing them with forced edd=off may be the right and more useful thing to do.
> 
> [1] http://www.webservertalk.com/archive242-2006-3-1447442.html
> 
> Parag
> 


_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [PATCH] [RFC] be more verbose when probing EDD
@ 2007-12-16 19:19 devzero
  0 siblings, 0 replies; 18+ messages in thread
From: devzero @ 2007-12-16 19:19 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Matt.Domsch, linux-kernel

> This is awfully verbose.
yes, this was meant as an example
also mind, that the last printf with "\rOK...." is meant to overwrite the hint message, so nobody should ever notice that message. i`m just unsure if this is a good approach. i have found two occurences in linux kernel, where drivers do something similar.

> [or even "failed"...]
yes, but how to detect if we got stuck forever inside that bios probe ?
i assume that`s hard to do, so that`s why i`m printing that hint "into the future", to be overwritten on successful return.

> Also, you really should look for the "quiet" command-line option and 
> squelch the message.
sure! will add that if there is some positive feedback and someone finds this patch useful.

regards
roland


> -----Ursprüngliche Nachricht-----
> Von: "H. Peter Anvin" <hpa@zytor.com>
> Gesendet: 16.12.07 19:17:40
> An: devzero@web.de
> CC: linux-kernel@vger.kernel.org, Matt.Domsch@dell.com
> Betreff: Re: [PATCH] [RFC] be more verbose when probing EDD

> 
> devzero@web.de wrote:
> >         /* Query EDD information */
> >  #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
> > -       query_edd();
> > +        printf("Probing EDD (query Bios for boot-device information)\n");
> > +        printf("If boot hangs here, you may have a buggy Bios. Try edd=skipmbr or edd=off");
> > +        query_edd();
> > +        printf("\rOK                                                                       \n");
> >  #endif
> 
> This is awfully verbose.
> 
> I'd prefer something like:
> 
> printf("Probing EDD BIOS... ");
> query_edd();
> printf("ok\n");
> 
> [or even "failed"...]
> 
> Also, you really should look for the "quiet" command-line option and 
> squelch the message.
> 
> 	-hpa
> 


_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [PATCH] [RFC] be more verbose when probing EDD
@ 2007-12-16 21:04 devzero
  2007-12-16 21:01 ` Alan Cox
  0 siblings, 1 reply; 18+ messages in thread
From: devzero @ 2007-12-16 21:04 UTC (permalink / raw)
  To: Parag Warudkar; +Cc: Matt_Domsch, hpa, linux-kernel

> > not sure if really all of them are the edd problem i have, but i`m quite sure for some of those.
> > can provide more links if somebody likes.
> 
> None of them seemed like they were determined as EDD problems - 

so - see how difficult it is to determine, what`s the problem is ? ;)

>some even did not work with edd=skipmbr.

on my 2 problematic systems, edd=skipmbr doesn`t help. only edd=off helps. 

> But that is not the point. Problem is not widely known, likely happens
> with very old BIOSes and people who use those systems should be
> knowing more than simply booting back to Win98.

i don`t see any relation to what a user knows and what kind of system of what age he is using.


> And if those people are smart enough to figure out the right place to
> ask - they will likely get suggestions to do edd=off like some of the
> above links that you posted prove - without the message.

see - and THATS where our opinion probably differs very much from mine. 
i think, user`s don`t want an operating system at all.
they want that their computer just works and that they can use their apps.
us linux fans have fun with debugging things and make them work,helping others and that stuff - but others just don`t want to search for the magic token to make their computer boot. if windows just boots on that system, so should linux. if it doesn`t, they should be able to fix this without being an expert.

> Why tax other people with a warning/hang etc. in printk when the
> problem is very unlikely on their systems?

i don`t have a clue how likely or unlikely the problem is. i have seen that problem more than once and i know people who also can tell you about.

> So you think those people with such low tech knowledge will figure out
> the right mailing list, make sense of the output of EDD message and
> then post the question? Or that they will figure out how to specify
> the edd=off to kernel command line? In that use case - not doing EDD
> on their boxes like I said would be the most useful thing to do. A
> message or 3 is useless in this case.

at least they could get help by any other linux user with average experience.
but a blinking cursor in the upper left is nothing an average linux user is being able to implicate with EDD.

> But yeah whatever - if you cut it down to one printk line and remove
> the hang word that would at least be bearable :)

ok. i think i`m making to much noise for too few lines of code, so let`s stop discussing.
but let`s wait for some more comments.
maybe some simple "probing edd" is a diplomatic solution and at least better than nothing. 

regards
roland


_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2007-12-22  2:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-16 15:34 [PATCH] [RFC] be more verbose when probing EDD devzero
2007-12-16 17:34 ` Parag Warudkar
2007-12-16 18:17 ` H. Peter Anvin
2007-12-22  1:15   ` Andi Kleen
2007-12-22  1:48     ` H. Peter Anvin
2007-12-22  1:57       ` Andi Kleen
2007-12-22  2:22         ` H. Peter Anvin
2007-12-22  2:41           ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2007-12-16 19:11 devzero
2007-12-16 19:59 ` Parag Warudkar
2007-12-16 20:18   ` Alan Cox
2007-12-17 23:25     ` Jan Engelhardt
2007-12-17 23:27       ` H. Peter Anvin
2007-12-18  0:10       ` Alan Cox
2007-12-18  0:22         ` H. Peter Anvin
2007-12-16 19:19 devzero
2007-12-16 21:04 devzero
2007-12-16 21:01 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox