Welcome!

Please read this important information about MX sources lists.
News
  • MX Linux on social media: here
  • Mepis support still here
Current releases
  • MX-17 beta 2 release info here
  • MX-16.1 release info here
  • antiX-17 release info here
    New users
    • Please read this first, and don't forget to add system and hardware information to posts!
    • Read Forum Rules

Baytrail grub issue

Message
Author
jbMacAZ
Forum Novice
Forum  Novice
Posts: 26
Joined: Tue Aug 22, 2017 2:08 am

Baytrail grub issue

#1 Postby jbMacAZ » Thu Aug 24, 2017 10:09 pm

Grub hangs when booting on my baytrail device. "Welcome to Grub" briefly flashes, but then the screen goes blank. This happens with either the install ISO or a snapshot liveUSB. The installer and snapshot both boot fine on my skylake desktop, but not on the baytrail T100CHI 2-in1.

I've narrowed the problem down to when grub is searching for the windows boot loader. My CHI no longer has windows. There is a remnant in my ESP partition (hd1,gpt1) and (hd1,gpt2) is a small Microsoft reserved partition with an "unknown filesystem" according to grub and gparted. The drive is an mmc type SSD. My work around is to delete all the menu entries after "Reboot" in liveUSB grub.cfg. This is probably overkill since searching (hd1,gpt1) and the memtest entries don't seem to cause problems.

Since the T100CHI is not particularly linux friendly yet (see bugzilla 109051 and 196153, no camera support, etc.), I don't see any urgency to support this device. I hope this report is helpful in the future.
You do not have the required permissions to view the files attached to this post.
Asus T100CHI (z3775, 64 bit quad core Intel atom baytrail) mixed-mode 32 bit UEFI, 64 bit OS

SwampRabbit
Forum Novice
Forum  Novice
Posts: 86
Age: 37
Joined: Tue Jun 14, 2016 2:02 pm

Re: Baytrail grub issue

#2 Postby SwampRabbit » Thu Aug 24, 2017 11:02 pm

Can the T100CHI BIOS be set to boot in "legacy mode"?

When you talk about booting and GRUB comes up, do you have GRUB installed on the MMC or are you using it off the live-usb?

I am asking this because you are using ESP and I've run into similar issues with older flaky UEFI BIOS that vendors never really did right out the door.
Often I usually start by disabling Secure Boot and switch to legacy mode and see if that boots, then try UEFI without Secure Boot options or whatever else the vendor may have thrown in there. I always start with a stock MX-Linux or antiX live-usb first, then depending on how that goes I change kernels, packages, etc.

Since you don't have Windows on it, I assume you don't need any of the partitions on the MMC at all right now. I would just wipe the whole thing and start from scratch unless you need them for some reason. Then make sure no entries or settings in the BIOS could be stopping from booting normally.

User avatar
BitJam
Forum Guide
Forum Guide
Posts: 2319
Joined: Sat Aug 22, 2009 11:36 pm

Re: Baytrail grub issue

#3 Postby BitJam » Fri Aug 25, 2017 12:14 am

I agree with SwampRabbit. I developed our live boot system, both legacy and UEFI. Several times now I ended up chasing my own tail due to totally bizarre bugs in specific UEFI implementations. It is maddening. You can make sure your BIOS/UEFI is up to date but often, that doesn't cure all the bugs. If Windows boots then they think everything is fine and dandy, which doesn't seem unreasonable even if it can make things tough for us. Dell made a change to the BIOS/UEFI on some of their machines so that if you use gpt partitioning on a drive (live-usb) then you cannot boot both legacy and UEFI. You have to choose one or the other when you build it. We switched to the ancient msdos partitioning to get around this bug. In live-usb-maker, I also added some code to make sure that that a certain file in /EFI/BOOT/ gets written last, otherwise the UEFI memtest doesn't work on one of my test machine. That took a while to track down.

If there is a way for Grub to recognize your machine then I suggest we add code to disable the sections in the live grub.cfg that are causing you trouble when your machine is detected. Or maybe there is a way to detect that the partitions are going to be trouble without getting drawn into the quagmire. TBH, a fair amount of work on the live system is to work around crazy bugs like this. I think the 'c' key gets you to a Grub command line in the Grub bootloader.
Will I cry when its all over?
When I die will I see Heaven?

jbMacAZ
Forum Novice
Forum  Novice
Posts: 26
Joined: Tue Aug 22, 2017 2:08 am

Re: Baytrail grub issue

#4 Postby jbMacAZ » Fri Aug 25, 2017 3:18 am

The setup mode does not support legacy booting. I have access to instructions & software to unlock the BIOS to get at more options, but that would not be newbie friendly, nor something I'm interested in. Asus designed T100CHI for windows 8.1 32 bit and they have been no help with getting linux running.

I have several linux distros on the CHI ATM. Manjaro/KDE(64 bit), Mint 18.2/64 bit, MX-linux(xfce & Cinnamon-64 bit) and on a USB stick on a hub I have Mint 18/32 bit, all with customized kernels. In the past I've had windows 10 and Ubuntu/Unity and later Ubuntu17/budgie. Manjaro found the MX-linux install and added it to its grub menu without problems. So no worries, I have MX-linux installed and I'm working on my T100 kernel. I like the installer. It gives the right amount of control without being too glitzy. MX-linux liveUSB is unique, concerning windows as a grub menu item.

I admit the T100 is a fringe case. Partially supported hardware, mixed-mode UEFI, without windows... It needs a lot of TLC to get going, but once it is configured, it is getting quite useable, finally. Maybe not newbie friendly, yet...

My UEFI is 32 bit, which has caused a lot of grub trouble for a lot of different distros. I'll try editing grub.cfg to put the original windows search with the 64 bit UEFI memtest. I'll also try downloading the 32 bit MX-linux and see if that is any different. It might be a day before I have a chance to try those things.

I'll add another BIOS bug for your collection. The T100CHI supports a maximum of 7 gpt partitions on its internal storage. Don't ask how I found out!
Asus T100CHI (z3775, 64 bit quad core Intel atom baytrail) mixed-mode 32 bit UEFI, 64 bit OS

jbMacAZ
Forum Novice
Forum  Novice
Posts: 26
Joined: Tue Aug 22, 2017 2:08 am

Re: Baytrail grub issue

#5 Postby jbMacAZ » Fri Aug 25, 2017 4:26 am

jbMacAZ wrote:I'll try editing grub.cfg to put the original windows search with the 64 bit UEFI memtest. I'll also try downloading the 32 bit MX-linux and see if that is any different.

The standard 32 bit MX-16.1 ISO hangs the same way as the 64 bit. However, moving line 175 in grub.cfg

Code: Select all

if [ "${in_64_bit}" ]; then

to line 129 seems to be sufficient for my system. This would cover quite a few different Baytrail SoC ultra-portables. I don't know if the 32 bit UEFI was used in any other systems, but this edit would still find a normal windows install for the majority of those too. UEFI isn't that old, so the complicated systems with multiple hard-drives would have been 64 bit UEFI/BIOS already IMO.
Asus T100CHI (z3775, 64 bit quad core Intel atom baytrail) mixed-mode 32 bit UEFI, 64 bit OS

User avatar
BitJam
Forum Guide
Forum Guide
Posts: 2319
Joined: Sat Aug 22, 2009 11:36 pm

Re: Baytrail grub issue

#6 Postby BitJam » Fri Aug 25, 2017 7:00 am

jbMacAZ wrote:I admit the T100 is a fringe case. Partially supported hardware, mixed-mode UEFI, without windows... It needs a lot of TLC to get going, but once it is configured, it is getting quite useable, finally. Maybe not newbie friendly, yet...!

I didn't recognize the name at first. I have an ASUS T100 here that I used to develop our 32-bit UEFI booting on. IMO the issue is 32-UEFI not Bay Trail. There are plenty of Bay Trail machines that use 64-bit UEFI. I'm delighted it booted at all via 32-bit UEFI. I'm sorry you had to munge grub.cfg to get it to work. Did the 32-bit UEFI memtest entry show up? Did you try it?

I'll see if I have the same hanging issue that you have (in my copious free time, I'm trying to finish my part in getting antiX-17 out the door). I thought I had tested finding Windows in Grub on that machine. Could it be something funky with your partitions?
Will I cry when its all over?
When I die will I see Heaven?

jbMacAZ
Forum Novice
Forum  Novice
Posts: 26
Joined: Tue Aug 22, 2017 2:08 am

Re: Baytrail grub issue

#7 Postby jbMacAZ » Fri Aug 25, 2017 1:19 pm

BitJam wrote:IMO the issue is 32-UEFI not Bay Trail. There are plenty of Bay Trail machines that use 64-bit UEFI. I'm delighted it booted at all via 32-bit UEFI..

While I won't let Asus off the hook, I agree that 32-UEFI is the problem. I also have a Dell baytrail w/64-bit UEFI that installed linux and android without any issues except for the cstate freeze bug. There is a newer CHI with some upgrades (storage, RAM, CPU) that now comes with a 64 bit UEFI...

I have most of the original OEM partitions. The problem is the Microsoft reserved partition (hd1,gpt2). Grub does not recognize it as a known file system, neither does gparted. My system hangs when grub tries to search it. I currently have 7 partitions which include the original ESP, the windows reserved and the windows recovery. My other 4 came from the original windows OS partition.

The memtest seems to work, it's running as I type. MX is the first distro I've tried where memtest actually worked.

I'm glad whenever I find a distro ISO that already has the bootia32.efi, but I expect to tinker with the install USB for the T100. The CHI has extra issues with its bluetooth keydock, broadcom wifi and HDPI 1920x1200 10.5" display... For that reason, I gravitate towards distros with ISO's that support persistence. MX seems like a great fit.
Asus T100CHI (z3775, 64 bit quad core Intel atom baytrail) mixed-mode 32 bit UEFI, 64 bit OS

User avatar
BitJam
Forum Guide
Forum Guide
Posts: 2319
Joined: Sat Aug 22, 2009 11:36 pm

Re: Baytrail grub issue

#8 Postby BitJam » Fri Aug 25, 2017 4:23 pm

I kid you not. Directly from the T100 manual:
Do not throw your Notebook PC in municipal waste.

... no matter how strong the urge is.
Will I cry when its all over?
When I die will I see Heaven?

User avatar
BitJam
Forum Guide
Forum Guide
Posts: 2319
Joined: Sat Aug 22, 2009 11:36 pm

Re: Baytrail grub issue

#9 Postby BitJam » Fri Aug 25, 2017 4:48 pm

I tested my T100 and it boots OOTB with the stock grub.cfg.

I'm not sure what to do here because I don't know how wide-spread the problem is. You certainly proposed a very elegant solution. I'm all for disabling window (haha) dressing to get things working on more systems. My line numbers are different from yours. I only have 156 lines in grub.cfg and I don't know what os-version you are running. Can you give me the context of where you want the if [ "${in_64_bit}" ]; then line to go? If it is after the (hd1,gpt1) and (hd1,gpt2) checks or even after just the first check then I think it is a good compromise even if the problem only affects a few machines.

Did you try to install or have you only run live?
Will I cry when its all over?
When I die will I see Heaven?

jbMacAZ
Forum Novice
Forum  Novice
Posts: 26
Joined: Tue Aug 22, 2017 2:08 am

Re: Baytrail grub issue

#10 Postby jbMacAZ » Fri Aug 25, 2017 6:16 pm

BitJam wrote:I tested my T100 and it boots OOTB with the stock grub.cfg.

if [ "${in_64_bit}" ]; then line to go? If it is after the (hd1,gpt1) and (hd1,gpt2) checks or even after just the first check then I think it is a good compromise even if the problem only affects a few machines.

Did you try to install or have you only run live?

I moved the line after the first (hd1,gpt1) check. The second check causes my hang. I'm running MX-16.1 with a customized 4.12-zen kernel.

I did successfully install with the stock MX 4.7 kernel (added intel_idle.max_cstate=1 to kernel args.) The screen had full brightness, no wifi, no keydock (no bluetooth). My USB hub supplies a keyboard, mouse and ethernet during installs. I skipped the grub install. I didn't want to wrestle with Manjaro about which distro is in charge of booting. My standard T100 kernel works fine with MX except on a liveUSB from snapshot as discussed elsewhere. New custom kernel works with edited grub.cfg.
Asus T100CHI (z3775, 64 bit quad core Intel atom baytrail) mixed-mode 32 bit UEFI, 64 bit OS


Return to “Hardware /Configuration”

Who is online

Users browsing this forum: No registered users and 3 guests