You are not logged in.

#1 2011-11-29 22:34:10

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

[solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

I formatted my disk as GPT (and am really unwilling to give up on this bit). I managed (eventually) to get through most of the install, creating symlinks in /sbin for mkinitcpio etc. because these seem to get installed in /usr/bin. I exited prior to the installation of the bootloader and followed the instructions for installing grub2 from the wiki.

I messed around a bit and redid things a few times but eventually I thought I did it right with grub2-bios and I got no errors when I used the install command and grub.cfg generated OK.

When I restart, however, the machine thrashes a great deal and then reports "No operating system found". (I think the thrashing is its looking for an OS on the network.)

Could somebody suggest what I might check? I'm not very familiar with any of the following: bios, uefi, grub, grub2, syslinux, boot loaders other than yaboot. That is, I basically know what I've gleaned from the wiki.

To explain this a bit, I'm coming from a mac but a pre-intel mac so that machine has open firmware and I'm familiar with yaboot as a boot loader. It is a New World mac so it has a very simple config file /etc/yaboot.conf and a command ybin to update the contents of the New World Boot Partition mounted at /boot. It has a two-stage boot setup such that I get a menu first to choose os x, linux, cd/dvd or openfirmware. The linux option then gives me a second menu which let's me choose the kernel to boot, pass stuff on the kernel command line etc.

I'm trying to install Arch on a new laptop. It seems to have uefi bios whereas I thought those were different things. But it has options to enable/disable both uefi and legacy booting. Right now, it is set to boot either and I think it tries uefi first. I can boot fine from usb keys and when I formatted my disk with MBR, I could reboot into a fresh install of Arch. But I really want to find a way to use GPT.

The main reason I tried grub2 was because grub seems more standard and syslinux seems to be more restricted in the OSs it can boot.

The main reason I used grub2-bios was that when I started trying to tangle with uefi in linux I got completely confused and decided I had no idea what I was doing. (Whereas with grub2 and bios my having no idea what I'm doing is a discovery.)

I used the grub2 install method that uses the 2MB partition with no filesystem and the bios_grub flag set.

My understanding is that syslinux is compatible with gpt. So I'm wondering if I should either:
1) reinstall arch (yet again), choosing syslinux
2) try to install syslinux without reinstalling
3) install ubuntu which seems to be compatible with gpt (but I'm reluctant to go this route unless I have to)

Any suggestions at all would be welcome. I'm happy to provide further info - I just don't have much idea of what might be helpful.

Last edited by cfr (2011-12-07 17:46:50)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#2 2011-11-30 00:51:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

So I tried uninstalling grub2 and installing and configuring syslinux. Again, all of the configuration steps seemed to go OK - no errors. But I still get "No operating system found".

I just don't get what I'm doing wrong!


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#3 2011-11-30 03:04:45

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

So just for the heck of it, I tried creating a UEFI partition, dumping syslinux and reinstalling grub2. I know that I now need to boot in UEFI mode. I'm not sure I fully understand the instructions but I used the firmware boot menu (I think - I used F12) and I used setup to set booting only from UEFI. I rebooted expecting it to find no OS and surprisingly got a grub prompt.

Now I have no idea what to do next! The wiki describes two grub prompts:
sh: grub>
grub rescue>

Mine looks like this:
grub>

So I'm guessing it is the "normal" command shell but I'm not sure. I can set the pager and that is not supposed to be possible in rescue mode.

This is weirdly an improvement over no OS.

I know I'm meant to manually launch /boot/efi/efi/grub/grub.efi from the firmware but I've no idea if that's what I've done. I suspect not since I don't have a regular shell prompt and can't run ordinary commands.

Can anybody tell me what to do next?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#4 2011-11-30 12:32:47

ratcheer
Member
Registered: 2011-10-09
Posts: 531

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

I'm not sure how to help you out of your problems, but I am running Arch on a gpt disk with grub2, so I can assure you that what you are trying is possible.

Here is a great tutorial on using gpt: http://rodsbooks.com/gdisk/index.html

And here is one on booting UEFI (which I am not using, although my PC is capable of it): http://rodsbooks.com/efi-bootloaders/index.html

Here is one on converting to UEFI: http://rodsbooks.com/bios2uefi/index.html

I hope these help you. The first one is what I used when converting from mbr to gpt.

Tim

Offline

#5 2011-11-30 13:58:03

stryder
Member
Registered: 2009-02-28
Posts: 498

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Why don't you download supergrub2 and see if you can boot off it. If you can then your system can use grub2-bios. I would find it unusual that a system is configured in such a way where such a common method of booting is not possible. If you can boot off supergrub2, use one of its options to boot into your arch installation. Reinstall grub2 and make sure you are installing it to the disk and not the partition. I have never used the uefi grub2 but I thought the instructions in the wiki for grub2 is quite thorough. If you want to try to boot from your grub prompt you can look for the commands in the grub2 wiki, somewhere at the end of the page.

Offline

#6 2011-11-30 15:47:39

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Offline

#7 2011-11-30 17:07:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Thanks for all the suggestions. I decided to start with the supergrub2 suggestion. I reset my computer to boot both bios (legacy) and uefi - the default it came with - and successfully booted the supergrub2 usb drive I made.

supergrub2 found arch and I selected one of the two kernels to boot. The one I didn't choose was followed by "(single)".

I immediately get a kernel panic. (Must be something about me - my other machine immediately panics with the series 3 kernels, too.)

Decompressing Linux... Parsing ELF... done.
Booting the kernel.
[2.655593] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)
[2.655662] Pid: 1. comm: swapper Not tainted 3.1.3-1-ARCH #1
[2.655719] Call Trace:
.<slightly varying numbers> <very long numbers in hex, I think> panic+0xa0/0x1b6
" " mount_block_root+0x258/0x283
" " ? name_to_dev_t+0x770/0xe40
" " mount_root+0x53/0x57
" " prepare_namespace+0x138/0x171
" " ? release_tgcred.isra.6+0x30/0x30
" " kernel_init+0x142/0x147
" " kernel_thread_helper+0x4/0x10
" " ? start_kernel+0x3cc/0x3cc
" " ? gs_change+0x13/0x13

I get precisely the same result with slightly different "2.xxx" numbers on the left if I boot the other kernel with "(single)" after it. Since this is also 3.1.3-1-ARCH #1, I suppose this isn't surprising.

I guess I should be happy that it at least *finds* the kernel! Also, as I understand it, this means that I *can* use grub-bios with a GPT disk to boot the machine and that is good news.

I think I will try booting the arch install key again and see if I can redo the system uefi partition for the bios set up by splitting it into the 2M no-filesystem partition and a boot partition. Then I'll try reinstalling grub-bios and restarting from the supergrub2 key to see if I've installed grub2 correctly before I do anything else.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#8 2011-11-30 17:15:37

stryder
Member
Registered: 2009-02-28
Posts: 498

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Sounds like a plan. There doesn't seem to be any reason why you cannot succeed. I find the best way to boot is to use uuid or label using the search command to set root. You can check out the details in the grub2 wiki. Good luck.

Last edited by stryder (2011-11-30 17:21:49)

Offline

#9 2011-11-30 21:29:17

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

OK. So I am *very* grateful for the earlier suggestions because I do feel I am now making some progress. I'm not entirely clear what I did that altered things but I'm pleased anyway. I am already a big fan of Supergrub2!

I found I'd somehow screwed up my Arch install key. (I expect I accidentally installed something in the non-chrooted environment yesterday.) Initially, I thought I'd turned my new laptop into a (flickering) brick. However, a newly made install key booted fine.

I removed the UEFI system partition.
I split the space into the 2M grub_bios partition (starting at 1M, ending at 3M) with no file system and set the grub_bios flag.
I turned the remainder into a /boot partition and put an ext4 fs on it.
I did all this with parted.

I also removed the EFI version of grub2 and, for good measure, grub2-common, as well. I then installed grub2-bios (thus reinstalling grub2-common). I then ran grub_bios-install directing it to /dev/sda. I'm not quite sure whether this is correct or not. Should I be using /dev/sda1? Or does grub2 find that partition automagically and use it for something else? I generated the grub2 config file. All this went smoothly.

Having read the pages on gpt fdisk utilities, I also checked the partition settings in cgdisk and discovered that the "type" for all my ext2 and ext4 partitions was set for MS basic data. parted claimed they were ext4 which is what I asked for and they all have ext2 or ext4 file systems. The only ones cgdisk showed correctly were swap and the bios partition for grub.

So I used gdisk to set the partition types for the ext2 and ext4 partitions to 8300 for linux fs and double-checked in cgdisk and parted. gdisk told me that the new partition map would only become active on reboot as the kernel was using the current one.

I rebooted to "No operating system found".

I rebooted into the Arch install environment and double-checked things.

I then rebooted using the Supergrub2 key. This now tells me that it can detect no operating systems at all (whereas before, it found the kernels - they just panicked on boot). However, it can now find both a configuration file for grub and a grub installation core.img. I used one of these to boot (I think the config file). I wasn't actually sure these were bootable or what I'd get if they were but I figured there was little to lose.

I checked that Supergrub2 identified the partitions and filesystems correctly. It claims everything is ext2 rather than ext4 but I think that's because there's a single code for all Linux fs whether ext2, ext3 or ext4. It says it doesn't recognise the fs on either the swap partition or grub's bios partition but I'm assuming that is to be expected as they don't have filesystems.

Oddly, I now seem to have booted 3.1.3-1-ARCH from my hard drive! At least, it says so and I managed to login.

So I can boot Arch from the Supergrub2 USB key but something is still screwed up with my installation of grub2 on my hdd. I read the suggestions at http://rodsbooks.com/gdisk/bios.html and wondered if I should try the first one. This suggests:

<quote>
Particularly if you've got an Intel motherboard, use Linux fdisk or a similar tool to mark the EFI GPT protective partition entry in the MBR as active/bootable. In fdisk, type a followed by the partition number (probably 1), then type p to view the partition table. An asterisk (*) should appear in the Boot column for the relevant partition. You can then type w to save your changes. Do not use GParted, GNU Parted, or another libparted-based tool to make this change; these tools interpret the "boot flag" as being synonymous with an EFI System Partition type code on GPT disks, so changing the "boot flag" with these tools will not have the desired effect. You must use fdisk or some other tool that will alter the MBR data structures, not the GPT data structures!
</quote>

I do have an intel motherboard. However, fdisk only sees my disk as having *one* partition of type "ee" because it is using a GPT partition table. So I'm not sure how I can use it to set the boot flag for a particular partition and I hesitate to set it on the one partition it shows since this is presumably the whole disk and fdisk issues dire warnings telling me not to use it on a GPT disk in the first place.

However, the author notes that problems needing these sorts of work arounds are rare and so I think it is much more likely that I'm just doing something horribly wrong. It seems to me that:
grub2 is hooked up correctly to the OS (since booting grub2 from Supergrub2 automatically gets me Arch)
grub2 is installed at least partially correctly (since Supergrub2 can find both the config file and the installation generally i.e. core.img)
So either grub2 is not installed completely correctly or something else is preventing the bios from identifying it properly as indicating a bootable OS to be present. Since I have no idea what might cause the second, I'm hoping it is the first though I don't have much idea what to check next for that, either.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#10 2011-11-30 23:23:35

ratcheer
Member
Registered: 2011-10-09
Posts: 531

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

I'm not sure if this will help, but here is how gdisk shows my gpt partitions:

Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E99E7567-0852-4369-B18D-97797E01C725
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 1761913743 sectors (840.1 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          616447   300.0 MiB   0700  Linux/Windows data
   3        34174976       101283839   32.0 GiB    0700  Linux/Windows data
   4       101285888       118063103   8.0 GiB     8200  Linux swap
   5              34            2047   1007.0 KiB  EF02  BIOS boot partition
   6       118063104       158063103   19.1 GiB    0700  Linux/Windows data
   7       158063104       191617535   16.0 GiB    0700  Linux/Windows data
   8       191617536       225171967   16.0 GiB    0700  Linux/Windows data

Tim

Offline

#11 2011-12-01 00:59:49

stryder
Member
Registered: 2009-02-28
Posts: 498

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Seems to me the problem is the grub2 installation. Since you can boot into arch using supergrub, do grub_bios-install again from arch. Make sure you run modprobe dm_mod beforehand. Also make sure if your hard disk is /dev/sda or something else (no you don't want to install to partition).

Offline

#12 2011-12-01 02:13:45

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

My output from gdisk looks very similar except that the linux partitions show up as 8300 because I corrected the type codes earlier.

You mean dm-mod rather than dm_mod, right?

# modprobe dm-mod
# grub_bios-install --boot-directory=/boot --no-floppy --recheck /dev/sda
Installation finished. No error reported.
# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
# echo $?
0
# reboot

... [machine thrashes while it searches for network OS after finding none locally] ...

Operating system not found

I wonder why it now says "Operating system not found" rather than "No operating system found"? Not that either is better. Just seems odd. I was very careful to copy the exact message earlier so I'm certain I got it right.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#13 2011-12-01 02:57:11

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Oh and the hdd is definitely /dev/sda. Checking with gdisk -l /dev/sda confirms it includes all the expected partitions.

I'm wondering if it would be easier to try to fix the EFI booting than the BIOS booting. With EFI I can get a grub menu - at least, I could, but I couldn't figure out how to get beyond that. But with BIOS I can't seem to get even that far. Even  though the machine can clearly boot that way from USB. It isn't making any sense to me...

If I enable the diagnostics screen on boot, it says something like:
...
... bios shadowed...
... video... shadowed...
fixed disk xxxxx [where the xxxxx is some long number]
...
<clear screen>
Usual complaint about lack of OS.

[The diagnostics screen might be more useful if there was a way of keeping it on screen for more than a second!]

[I disabled network booting to speed up boot failures!]

There is a report that allowing Ubuntu's installer to automatically manage partitioning somehow magically solves the problem on the AMD version of the laptop I'm using. I've got the intel version and the BIOS version is different. It will irk me if I have to do this because there is no reason I shouldn't be able to do it myself. I have a feeling, though, that what is basically happening is that the Ubuntu installer is setting up an EFI system partition. I'm not keen to try that again but I'm beginning to wonder if I will have to. [But maybe I really should use Ubuntu in that case since I don't really understand it very well!]

I'm loath to abandon my current install of Arch since it seems to work perfectly well if only I can get there!


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#14 2011-12-01 03:59:49

stryder
Member
Registered: 2009-02-28
Posts: 498

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Yeah, dm-mod. Sorry, but I'm officially out of ideas. sad Hopefully someone else can help you troubleshoot this.

Offline

#15 2011-12-01 08:36:22

Mavirick
Member
Registered: 2011-12-01
Posts: 62

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

After installing grub2-bios and running grub-mkconfig what is the contents of your grub.cfg?

Offline

#16 2011-12-01 09:00:48

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

FYI (and offtopic, but interesting nonetheless): modprobe doesn't mind whether you use an underscore or a hyphen. As such, modprobing dm_mod or dm-mod will do the same.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#17 2011-12-01 14:57:00

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

@cfr: Can you try

grub_bios-install --boot-directory=/boot --no-floppy --recheck /dev/sda --debug

and post the output? Also to enable boot flag in the MBR's 0xEE partition, simply do it ignoring the fdisk's GPT warning. AFAIK fdisk should not touch GPT metadata.

EDIT: But better you try UEFI boot first if you have that feature in the mobo.

Last edited by the.ridikulus.rat (2011-12-01 15:03:47)

Offline

#18 2011-12-01 17:48:29

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

OK. So I have not yet tried all of these suggestions but I've tried a couple.

Ignoring fdisk's warning and setting the boot flag anyhow. Worked in the sense that I got the boot flag to show up. Made no difference as far as booting was concerned.

Figured I'd try UEFI next. Note that I'm not at all sure I'm following the instructions correctly in this case (whereas I'm pretty confident in the bios case.)

Removed /boot partition and bios grub partition. Used space to create efi system partition. I used gdisk this time for a change. Set the type appropriately. Checked it all shows up correctly in both gdisk and parted.

Uninstalled the bios version of grub2; installed 64 bit efi version. Ran the install. Reported success as usual. Ran the mkconfig command. I was not entirely sure where to put the configuration file for efi. Right now I've got it in both the bios location and in the efi directory alongside grub.efi etc.

Created an Ubuntu live USB. Set bios to boot UEFI only (i.e. no legacy).

Booted Ubuntu in UEFI mode fine. Eventually figured out how to get a terminal in Unity.

I then tried to follow "After grub_efi_${UEFI_ARCH}-install" from the wiki page on grub2. However, since I was booted into Ubuntu, I'm not sure I did it correctly. I replaced
grub-probe --target=device /boot/efi/efi/grub/grub.efi
with
grub-probe --target=device /mnt/boot/efi/efi/grub/grub.efi
to get the target.
I ran
modprobe efivars
in Ubuntu.
I also did modprobe dm-mod.
I mounted /dev, /sys and /proc under /mnt and chrooted. I checked the EFI variables were available under /sys as instructed. I definitely seemed to be booted using UEFI.
I then ran
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "GRUB2" --loader "\\EFI\\grub\\grub.efi"
in the chrooted environment. (The proper target shown by the earlier command was sda1 as assumed in the example.)

I rebooted... No operating system found.
This happens no matter how I set the boot options - UEFI only or both UEFI and legacy.

In the firmware boot menu (which you can get with F12 on this machine - I'm not sure that's the correct name), I get two boot options:
GRUB2
HDD0...
Selecting either causes the screen to flash and the menu to be redisplayed. I think I've done something different this time because I'm sure I could get the grub2 prompt when I tried using EFI before.

Also, in the UEFI BIOS setup, I now have GRUB2 listed in the boot priority order:
1. GRUB2
2. ATA HDD0: <long serial>
3. USB HDD
4. USB CD:
5. USB FDD
[Network boot is excluded to speed up failures!]

Could somebody tell me where grub.cfg is supposed to go for EFI? I'm not convinced I understand where things are meant to be well enough to check whether I've got this in the correct places.

I really appreciate all the help. Should I redo the BIOS set up and run the diagnostic commands suggested? I can't do that right now but I could have a go later.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#19 2011-12-01 17:54:05

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

@cfr: Try /boot/efi/efi/grub/core.efi or /boot/efi/efi/grub/grubx64.efi (both are same, but different from grub.efi) in efibootmgr. If that works then the most likely issue is that grub fails to set prefix dir. In grub.efi grub2 sets the prefix at runtime (the dir from which grub.efi is launched) (left blank when the file is created), but in core.efi prefix is already set to /boot/efi/efi/grub dir. Grub2 fails to set the correct prefix in some UEFI firmwares and bails out (reboots)

Offline

#20 2011-12-01 22:08:45

Mavirick
Member
Registered: 2011-12-01
Posts: 62

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

While I understand that you would like to get this system up and running with Arch, may I suggest that you work on one method either grub-bios or grub-uefi to make it easier for everyone to try and work on your solution.

Offline

#21 2011-12-01 23:01:20

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

the.ridikulus.rat wrote:

@cfr: Try /boot/efi/efi/grub/core.efi or /boot/efi/efi/grub/grubx64.efi (both are same, but different from grub.efi) in efibootmgr.

I don't have /boot/efi/efi/grub/grubx64.efi.

I rebooted Ubuntu, modprobed dm-mod and efivars and chrooted to /mnt.

Initially, efibootmgr complained I'd created two entries with the same label so I deleted both and redid:
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label="GRUB2" --loader "\\EFI\\grub\\core.efi"

Output:
Bootcurrent: 0008
Timeout: 0 seconds
BootOrder: 000A, 0007, 0008, 0005, 0006, 0009 [spaces added for legibility]
Boot000 Setup
Boot0001 Boot Menu
Boot0002 Diagnostic Splash
Boot0003 Rescue and Recovery
Boot0004 Startup Interrupt Menu
Boot0005* USB CD:
Boot0006* USB FSS
Boot0007* ATA HDD0:
Boot0008* USB HDD
Boot0009 PCI LAN
Boot000A* GRUB2

Shutdown... power on... "Operating System not found"


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#22 2011-12-01 23:02:57

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Mavirick wrote:

While I understand that you would like to get this system up and running with Arch, may I suggest that you work on one method either grub-bios or grub-uefi to make it easier for everyone to try and work on your solution.

Sorry. I'll stick to UEFI unless people suggest otherwise.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#23 2011-12-01 23:20:17

Mavirick
Member
Registered: 2011-12-01
Posts: 62

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Okay now that we are sticking to UEFI if you would please give us a current listing of how you have your system partitioned and post the contents of your grub.cfg.

Offline

#24 2011-12-02 00:34:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

For some reason, my live USB keys keep getting corrupted. The one I made for Ubuntu earlier today is now dumping me in ash which I gather is a busybox shell. I was using this because it will boot UEFI. Unfortunately, I am not sure I can recreate this key easily. I guess it isn't possible to create it using dd in the way it is for Arch etc. and I cannot use unetbootin at home - not, at least, until I get Arch working properly. (My more-or-less working machine is running Debian but I can't install unetbootin on this architecture.)

Boot Arch USB key - I guess bios boot works even though the hdd is set up for efi boot...

Partitioning for UEFI:
/dev/sda
1 vfat (EFI system partition with fat32 fs) just over 200M
3 ext2 empty about 250M
4 swap about 9G
5 ext4 / about 20G
6 ext4 /var about 15G
7 ext4 /usr/local about 20G
8 ext4 empty about 20G
9 ext4 empty about 15G
10 ext4 /home about 150G
11 ext4 empty just under 50G

Contents of /boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
}

set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue

insmod part_gpt
insmod ext2
set root='(hd0,gpt5)'
search --no-floppy --fs-uuid --set=root d16adcc6-c6dd-42dc-b58c-7218061ef332
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux linux' --class archlinux --class gnu-linux --class gnu --class os {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='(hd0,gpt5)'
    search --no-floppy --fs-uuid --set=root d16adcc6-c6dd-42dc-b58c-7218061ef332
    echo    'Loading Linux linux ...'
    linux    /boot/vmlinuz-linux root=UUID=d16adcc6-c6dd-42dc-b58c-7218061ef332 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux Fallback' --class archlinux --class gnu-linux --class gnu --class os {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='(hd0,gpt5)'
    search --no-floppy --fs-uuid --set=root d16adcc6-c6dd-42dc-b58c-7218061ef332
    echo    'Loading Linux linux ...'
    linux    /boot/vmlinuz-linux root=UUID=d16adcc6-c6dd-42dc-b58c-7218061ef332 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initramfs-linux-fallback.img
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" --class memtest86 --class gnu --class tool {
  insmod part_gpt
  insmod ext2
  set root='(hd0,gpt5)'
  search --no-floppy --fs-uuid --set=root d16adcc6-c6dd-42dc-b58c-7218061ef332
  linux16 ($root)/boot/memtest86+/memtest.bin
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#25 2011-12-02 01:14:57

Mavirick
Member
Registered: 2011-12-01
Posts: 62

Re: [solved] Boot GPT disk in UEFI mode (Phoenix SecureCore Tiano)

Earlier you asked where the grub.cfg should go for EFI booting and this is the correct place:

/boot/efi/EFI/grub/grub.cfg

When you created your vfat32 partition did you set the boot flag on it?

Offline

Board footer

Powered by FluxBB