Re: Compaq Presario "reboot" problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 18 Nov 2005, Denis Vlasenko wrote:

> On Thursday 17 November 2005 20:51, linux-os (Dick Johnson) wrote:
>>
>> With Linux-2.4.26 I reported that if a Compaq gets rebooted while
>> running Linux-2.4.26, it will not be able to restart Windows 2000.
>> It cam restart Linux fine. Today, I tried the same thing with
>> Linux-2.6.13.4. It fails, too.
>>
>> The symptoms are that you just "reboot" Linux. When the GRUB loader
>> comes up, I select my Windows-2000/professional. That M$ Crap comes
>> up to where it's just about to start the high-resolution screen.
>> Then it stops forever, no interrupts, no nothing. I need to disconnect
>> power and remove the battery to recover.
>>
>> It appears as though Linux is still restarting as a "warm boot",
>> rather than a cold boot (in other words, putting magic in the
>> shutdown byte of CMOS) so the hardware doesn't get properly
>> initialized. Would somebody please check this out. When changing
>> operating systems, you need a cold-boot.
>
> Can you check which driver does that? The test would be to
> boot a special Linux setup which reboots immediately
> (say, wuth init=/some/reboot_script.sh boot param).
>
> Then start removing drivers from kernel until you
> can boot Win successfully after Linux reboots.
> --
> vda

I booted into a shell from a floppy disk. There were no drivers
installed, not even the IDE driver. I could not reboot windows
after linux was up and rebooted. This was Linux-2.6.13.4. Then
I tried linux-2.4.26 which corresponds to the version when I
first reported this problem. The same thing happens. Therefore,
I temporarily modified linux-2.6.13.4 to force a triple-fault
and processor reset when doing a reboot. With this temporary
modification it is possible to boot windows after Linux was
running.

This is the reboot patch. It is not a "solution", just something
that shows that the current reboot code doesn't force the BIOS
to start from scratch, which is essential when changing operating
systems.


--- linux-2.6.13.4/arch/i386/kernel/reboot.c.orig	2005-11-18 08:29:12.000000000 -0500
+++ linux-2.6.13.4/arch/i386/kernel/reboot.c	2005-11-18 08:52:40.000000000 -0500
@@ -337,6 +337,11 @@

  void machine_restart(char * __unused)
  {
+        for(;;) {
+	__asm__ __volatile__("\tmovl %cr0, %eax\n"
+			     "\tandl $~0x80000000,  %eax\n"
+			     "\tmovl %eax, %cr0\n");
+        }
  	machine_shutdown();
  	machine_emergency_restart();
  }

Just in case the M$ mailer screws up everything, the patch
is attached also.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.13.4 on an i686 machine (5589.54 BogoMips).
Warning : 98.36% of all statistics are fiction.
.


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
--- linux-2.6.13.4/arch/i386/kernel/reboot.c.orig	2005-11-18 08:29:12.000000000 -0500
+++ linux-2.6.13.4/arch/i386/kernel/reboot.c	2005-11-18 08:52:40.000000000 -0500
@@ -337,6 +337,11 @@
 
 void machine_restart(char * __unused)
 {
+        for(;;) {
+	__asm__ __volatile__("\tmovl %cr0, %eax\n"
+			     "\tandl $~0x80000000,  %eax\n"
+			     "\tmovl %eax, %cr0\n");
+        }
 	machine_shutdown();
 	machine_emergency_restart();
 }

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux