WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Struggling with UEFI boot on ASUS laptop  (Read 14037 times)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Struggling with UEFI boot on ASUS laptop
« on: October 06, 2013, 12:21:15 PM »
I've been trying to make a USB stick or frugal hard disk installation I can boot on my new-ish ASUS X401A (Pentium B970) laptop.  It has American Megatrends firmware with UEFI support that was used for the pre-loaded Windows 7.  I was able to set up dual boot with Xubuntu 12.04 64-bit. Various times I have tried to make a bootable Tiny Core USB stick or frugal disk installation, including with the latest TC 5.0 version, but so far none of the attempts have worked. 

In this post I will focus on the USB stick installation. I tried using Juanito's posting of June 16, 2012 to the Re: UEFI Boot thread http://forum.tinycorelinux.net/index.php/topic,13445.msg74727.html#msg74727, but I also tried a frugal installation by mimicking the grub menuentries for Xubuntu on my hard disk, without success.

I should point out the commands I used to prep the USB stick are the ones in my current installation of Xubuntu.  I know some of the versions may be different than the ones Juanito used in the forum thread.  Specifically the grub tools are version 1.99-21ubuntu3.10.  I thought those may be  a pre-release version of Grub2.  I this assumption correct?

OK, here is what I tried: First, I used gdisk to set up the GPT partitions:

Code: [Select]
root@mike-X401A1:/home/mike# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 7811072 sectors, 3.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 112575B4-2053-45D9-A643-17633E67F92A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7811038
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          264191   128.0 MiB   EF00  EFI System
   2          264192         7811038   3.6 GiB     0700  Microsoft basic data

I used the Xubuntu grub-install to copy the grub files to the memory stick.  However, the --target=x86_64-efi and  --efi-directory=/mnt/sdb1 options were not accepted by my local grub-install.  It did copy a bunch of stuff over, though.

One thing it did *not* copy was /BOOTX64.EFI, so I mounted the USB stick and copied over the version in my Xubuntu /boot file branch to /mnt/sdb1/EFI/BOOT/BOOTX64.EFI.

I created a /mnt/sdb1/EFI/BOOT/grub/grub.cfg file with this menuentry:
Code: [Select]
menuentry "tiny core" {
  linux (hd1,gpt2)/boot/vmlinuz64 quiet noswap tce=sdb2 tz=GMT-4 blacklist=bcma blacklist=ssb blacklist=b43 text
  initrd (hd1,gpt2)/boot/corepure64.gz
}

I copied the Pure 64 version of Tiny Core kernel and initial file system to the second partition of the USB stick under the directory:
    /boot/vmlinuz64
    /boot/corepure64.gz

After rebooting I get an ASUS boot selection menu with my usual Windows 7 and (X)ubuntu entries, plus a "UEFI: PMAP" entry and a plain "PMAP" entry.  If I pick the UEFI version, the screen flashes and returns immediately to the boot selection menu.  If I select the plain PMAP entry, the screen goes black and a message "Missing Operating System ..." with a prompt to attach a valid boot disk/device and hit a key"

I also tried to configure the stick with the 32-bit Tiny Core 5.0 vmlinuz and core.gz files.  That did not work either.  Neither did using the unetbootin tool with the Tiny Core 32-bit .iso image.

Any other suggestions?  Thanks for any input.  I'd like to get back to using Tiny Core frequently!
--
Mike Lockmoore


« Last Edit: October 06, 2013, 05:23:21 PM by MikeLockmoore »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Struggling with UEFI boot on ASUS laptop
« Reply #1 on: October 06, 2013, 12:38:51 PM »
Use Grub v2 from the tc-5.x repo


Also to boot tc-4.x use the BIOS " lecagy MBR option",  In the BIOS you may also find disabling xHCI USB which should allow the system to boot tc-4.x

for tc-5.x x86_64 use rootfs.gz + modules64.gz + vmlinuz64

edit removed config entries as unrelated to issue here
« Last Edit: October 06, 2013, 01:38:22 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Struggling with UEFI boot on ASUS laptop
« Reply #2 on: October 06, 2013, 01:40:03 PM »
Quote
Specifically the grub tools are version 1.99-21ubuntu3.10.  I thought those may be  a pre-release version of Grub2.  I this assumption correct?
Use the latest v2.0

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Struggling with UEFI boot on ASUS laptop
« Reply #3 on: October 06, 2013, 01:52:38 PM »
I copied the Pure 64 version of Tiny Core kernel and initial file system to the second partition of the USB stick under the directory:
    /boot/vmlinuz64
    /boot/corepure64.gz

I seem to remember you need to recompile the tc-4.x kernel with a couple of efi options enabled to be able to (u)efi boot - tc-5.x will (u)efi boot as-is though.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Struggling with UEFI boot on ASUS laptop
« Reply #4 on: October 06, 2013, 05:21:09 PM »
Thanks for replies folks.  Since I can't get any version of Tiny Core running on this laptop, I suppose I can get TC5 on a different computer first, then use the Grub 2.0 tools to make the USB stick there.   Or maybe I could upgrade my Xubuntu to Grub 2.0?  But I don't know the implications of that.  Hmmm.  I suppose if it was too easy it wouldn't be fun?  ???

Further edit:  By the way, I thought the Core Pure 64 current release files are based on Tiny Core 5.0.  Is this not true?

coreplayer2: I didn't notice a "legacy MBR" boot option in my BIOS settings... maybe I overlooked that.
« Last Edit: October 06, 2013, 05:28:36 PM by MikeLockmoore »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Struggling with UEFI boot on ASUS laptop
« Reply #5 on: October 06, 2013, 11:27:21 PM »
By the way, I thought the Core Pure 64 current release files are based on Tiny Core 5.0.  Is this not true?

Not yet, it's still tc-4.x at the moment.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Struggling with UEFI boot on ASUS laptop
« Reply #6 on: October 07, 2013, 12:48:57 PM »
Quote
Not yet, it's still tc-4.x at the moment.

Ahh, OK.  Maybe I need the 64-bit-ness to satisfy my BOOTX64.UEFI bootloader, but need TC 5.0 to get the proper UEFI support?  Is there a bootloader for UEFI that will boot the 32-bit kernel?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Struggling with UEFI boot on ASUS laptop
« Reply #7 on: October 07, 2013, 01:04:44 PM »
tc-5.x rootfs + modules64 + vmlinuz64 will work, but not fully 32-bit

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Struggling with UEFI boot on ASUS laptop
« Reply #8 on: October 07, 2013, 07:54:10 PM »
Ok no longer unrelated     while this may not resemble your bootloader config stanza, but this works more me using syslinux.

Code: [Select]
KERNEL /tce/boot/vmlinuz64
APPEND initrd=/tce/boot/rootfs.gz,/tce/boot/modules64.gz loglevel=3 noswap lst=onboot64.lst tce=sda2 opt=sda2 home=sda2 blacklist=bcma,ssb,b43

This works with Grub2
I have a copy of the vmlinuz64 for 64bit  EFI bootloader which works with tc-4.7.7 core 64 & corepure64 one that  juanito made for us some time back, (I don't believe it's the same as the current corepure64, but my memory is a little fuzzy) if you need it?
for this route I use grub2 and
Code: [Select]
menuentry " EFI Desktop Ext2 corepure64 " {
  linux /boot/linux64/vmlinuzEFI64 loglevel=3 waitusb=5:LABEL=EFI vga=0x318 noswap tz=GMT tce=UUID="04b4a5c8-b8f8-48f1-8fcd-ef30bb6ee768"/corepure64/tce
  initrd /boot/linux64/corepure64-477.gz
}

if that helps
« Last Edit: October 07, 2013, 08:17:16 PM by coreplayer2 »

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Struggling with UEFI boot on ASUS laptop
« Reply #9 on: October 11, 2013, 11:23:30 PM »
Partial Success! ?!?  :D

I used the vmlinuzEFI64 identified by coreplayer2 and updated the Grub meun entry on my hard disk (frugal corepure64 version 4.7.7).  It boots and loads the .tcz files listed in my onboot.lst.  However, I don't get a graphical boot.  I have the following .tcz extensions downloaded from the pure64 repo and stored in my tce/optional directory:

onboot.lst
Code: [Select]
Xprogs.tcz
fluff.tcz
wbar.tcz
compiletc.tcz
xz.tcz
Xfbdev.tcz
Xorg-7.6-bin.tcz
flwm.tcz
gnome-icon-theme.tcz
opera-12.tcz
squashfs-tools.tcz
pci-utils.tcz
depmod.tcz
advcomp.tcz

Now I need to figure out why I don't have startx.  :P
--
Mike

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Struggling with UEFI boot on ASUS laptop
« Reply #10 on: October 12, 2013, 12:19:35 AM »
I don't see Xlibs.tcz which contains startx.
10+ Years Contributing to Linux Open Source Projects.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Struggling with UEFI boot on ASUS laptop
« Reply #11 on: October 13, 2013, 09:13:49 AM »
Is there a bootloader for UEFI that will boot the 32-bit kernel?

I believe that this is set by your hardware - i.e. machines are either 32-bit or 64-bit UEFI boot, but not both - and most likely will be 64-bit.

BTW - I went back and double-checked and the tc-5.x rootfs + modules64 + vmlinuz64 will successfully 64-bit UEFI boot as-is.

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: Struggling with UEFI boot on ASUS laptop
« Reply #12 on: October 14, 2013, 03:27:54 PM »
Yes/no.  Using VMware Workstation 10 (which wants BOOTx64.EFI), I can use GRUB2 EFI to load a 32-bit kernel (but can't do that from SYSLINUX yet).  I believe this VM won't recognize BOOTIA32.EFI

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Struggling with UEFI boot on ASUS laptop
« Reply #13 on: October 14, 2013, 08:00:23 PM »
roberts: Yes, you are right.  I added that and now startx fails with a "failed in waitforx".  If you or anyone else here has a quick suggestion, I'd appreciate it.  But I plan to look through the full .ISO sets to check for a complete list of extensions that need to be present to get a graphical boot.

Juanito: I'm not sure how " tc-5.x rootfs + modules64 + vmlinuz64" works.  How is modules64 loaded?  As a kernel boot parameter or something else?




Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Struggling with UEFI boot on ASUS laptop
« Reply #14 on: October 14, 2013, 10:47:57 PM »
Something like:
Code: [Select]
$ cat /mnt/sdc1/EFI/BOOT/grub/grub.cfg
search --no-floppy --fs-uuid --set=root 74d071dc-a992-4493-8b54-168fb79897dd

menuentry "rootfs64" {
  linux /boot/vmlinuz64 quiet noswap tce=UUID=74d071dc-a992-4493-8b54-168fb79897dd waitusb=10:UUID=74d071dc-a992-4493-8b54-168fb79897dd tz=GMT-4 blacklist=bcma blacklist=ssb blacklist=b43 text
  initrd /boot/rootfs.gz /boot/modules64.gz
« Last Edit: October 15, 2013, 12:05:08 AM by Juanito »