bugGNU GRUB - Bugs: bug #45149, Grub2 doesn't boot in VIA C3...


You are not allowed to post comments on this tracker with your current authentication level.

bug #45149: Grub2 doesn't boot in VIA C3 Samuel 2. Only Grub legacy

Submitted by:  Emilio <dc740>
Submitted on:  Wed 20 May 2015 12:51:40 PM UTC  
Category:  Booting Severity:  Major
Priority:  6 Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Emilio
Open/Closed:  Open Release: 
Release:  Git master Reproducibility:  Every Time
Planned Release:  2.02

( Jump to the original submission)

Mon 14 Mar 2016 09:06:45 PM UTC, comment #13: 

Can you try loading https://drive.google.com/file/d/0B-qnkGQu3-ljUWtXZVFyeS1pSkE/view?usp=sharing as a Linux kernel from any working bootloader?

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 11 Mar 2016 05:27:16 PM UTC, comment #12: 

It didn't work. This is what I did:

$make clean
$vi grub-core/kern/i386/pc/init.c
## commented out those lines
$make -j8
$sudo ./grub-install --directory ./grub-core --boot-directory=/media/<MyUser>/3468-1B2C/boot --root-directory=/media/<MyUser>/3468-1B2C /dev/sdc

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : CentaurHauls
cpu family      : 6
model           : 7
model name      : VIA Samuel 2
stepping        : 3
cpu MHz         : 795.969
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu de tsc msr cx8 mtrr pge mmx 3dnow up
bogomips        : 1591.93
clflush size    : 32
cache_alignment : 32
address sizes   : 32 bits physical, 32 bits virtual
power management:

Emilio <dc740>
Fri 11 Mar 2016 03:37:38 PM UTC, comment #11: 

Please attach cat /proc/cpuinfo

Please try following patch:
diff --git a/grub-core/kern/i386/pc/init.c b/grub-core/kern/i386/pc/init.c
index 27bc68b..39f4f77 100644
--- a/grub-core/kern/i386/pc/init.c
+++ b/grub-core/kern/i386/pc/init.c
@@ -197,8 +197,8 @@ grub_via_workaround_init (void)

   grub_cpuid (0, max_cpuid, manufacturer[0], manufacturer[2], manufacturer[1]);

-  if (grub_memcmp (manufacturer, "CentaurHauls", 12) != 0)
-    return;
+  //  if (grub_memcmp (manufacturer, "CentaurHauls", 12) != 0)
+  //   return;

   grub_bios_via_workaround1 = 0x090f;
   grub_bios_via_workaround2 = 0x090f;

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 11 Mar 2016 03:24:00 PM UTC, comment #10: 

It's not working for me.
This is what I did to get the new code:
$git clone git://git.savannah.gnu.org/grub.git
$cd grub
$make -j8
sudo ./grub-install --directory ./grub-core --boot-directory=/media/<MyUser>/3468-1B2C/boot --root-directory=/media/<MyUser>/3468-1B2C /dev/sdc

(I installed it in a USB pendrive. No errors reported)

I get a screen with "GRUB _" and the cursor keeps blinking. But it doesn't go past that.
I also tried these changes:
*Deleted vbe.mod
*added /boot/grub/grub.cfg with these lines:
insmod echo
set timeout=5

menuentry "test" {
    echo "hello"

It still hangs on "GRUB _" first sceen.

Pendrive details (just in case this could be a problem):
Partition table: msdos
Partition details:
Disk /dev/sdc: 2,9 GiB, 3051356160 bytes, 5959680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x23b55a69

Device     Boot Start     End Sectors  Size Id Type
/dev/sdc1        2048 5959679 5957632  2,9G  b W95 FAT32

Emilio <dc740>
Sun 14 Feb 2016 07:38:39 AM UTC, comment #9: 

Fix committed

Vladimir Serbinenko <phcoder>
Project Administrator
Sun 10 Jan 2016 01:02:33 PM UTC, comment #8: 

Great thanks to n0mad for the debugging session. It turns out C3 has cache coherence problems around BIOS calls.
Please test http://git.savannah.gnu.org/cgit/grub.git/commit/?h=phcoder/c3&id=3e89a76fee8edfbeb3d069f7d2f04df7fa34ecc3 . Core rwapped into linux-kernel-like format for easy testing: https://drive.google.com/file/d/0B-qnkGQu3-ljUWtXZVFyeS1pSkE/view?usp=sharing

Vladimir Serbinenko <phcoder>
Project Administrator
Sat 09 Jan 2016 04:10:05 PM UTC, comment #7: 

Can you drop by to our #grub IRC channel on freenode? We will have to go through several debug versions and it's faster over IRC

Vladimir Serbinenko <phcoder>
Project Administrator
Sat 09 Jan 2016 03:49:18 PM UTC, comment #6: 

I have same error. Any modern distributives with grub2 will do permanent reboot after install. I tried to install different.

I have VIA C3 Ezra CPU.

Oleg Frolkov <n0mad>
Sat 28 Nov 2015 07:56:59 AM UTC, comment #5: 

Unfortunately 1.99 still fails in automake on Ubuntu 14.04. You can try if it works on your versions; simply do

git checkout 1.99

if it builds and works, we can try bisect.

Andrei Borzenkov <arvidjaar>
Project Member
Fri 27 Nov 2015 11:49:49 PM UTC, comment #4: 

I removed vbe.mod, but it hangs on boot anyway. The same pendrive works fine in my netbook.I also tried removing vbe.mod from grub.iso, but this time the iso file is not recognized as a bootable cd, so I probably did something wrong there.
I also have debian, and ubuntu.

Sorry for taking so long. I don't use this pc anymore, and I had to build it again to test this.

Emilio <dc740>
Tue 21 Jul 2015 11:48:06 PM UTC, comment #3: 

Can you try removing vbe.mod ? It tries to set MTRR and maybe there is a problem with this

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 22 May 2015 02:46:37 AM UTC, comment #2: 

I was about to suggest trying to bisect but unfortunately 1.99 fails at Automake step and 2.00 fails to compile in openSUSE 13.2 (that you have IIRC). Do you have some other older distro (Debian or similar) where you could try to build it?

Andrei Borzenkov <arvidjaar>
Project Member
Wed 20 May 2015 01:31:00 PM UTC, comment #1: 

A user reported in the debian bug that disabling the internal cache prevented the reboots.

I don't have the option in the BIOS. I tried disabling L2 cache only, and the problem persists.

Emilio <dc740>
Wed 20 May 2015 12:51:40 PM UTC, original submission:  

Grub2 doesn't boot in VIA C3 Samuel 2 800Mhz. It keeps restarting right after the BIOS. No text, no error messages, no logs. Plain cold reboot. Grub Legacy works without problems.

I downloaded master and compiled it with all fonts and settings correctly enabled, except for: statistics, efiemu and xfs, which were disabled.

I even took care of compiling it in the same PC. Then I created an iso and tried to start from it.

This bug is similar to:

Onboard VIA C3 Samuel 2 800Mhz (CMOV is NOT part of the instruction set)
512MB RAM.
Motherboard: Mercury PVCLE266M-L V3.0
(it's a 10 years old PC, which works just fine as home server)

Emilio <dc740>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by n0mad (Posted a comment)
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by dc740 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-11 phcoder Priority5 - Normal => 6
    2016-03-14 phcoder StatusFixed => None
        Open/ClosedClosed => Open
        Planned ReleaseNone => 2.02
    2016-02-14 phcoder StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.6