Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SATA disk does not show up as UEFI capable
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Sat Apr 06, 2013 10:08 pm    Post subject: SATA disk does not show up as UEFI capable Reply with quote

Hi all,
since the thread is UEFI related let me ask this:
Why a sata disk does not show up from ASUS Firmware as uefi capable?
All the usb pendrives show upo as ones.

Here is more info:

Code:

root@sysresccd /root % efibootmgr
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0001
Boot0001* Hard Drive
Boot0003* UEFI: SanDisk U3 Cruzer Micro 3.21


The disk Boot0001 is an empty SATA 2T. I prepared the disk in this fashion:

Code:

gdisk /dev/sda

GPT fdisk (gdisk) version 0.8.5

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

Found valid GPT with protective MBR; using GPT.


Then I downloaded and installed rEFInd via the install script which failed with the message to rename EFI/refind into EFI/boot, plus refind_x64.efi into bootx64.efi. Which I manually did.

Now:
Code:
root@sysresccd /root % mkdir -p /boot/efi
root@sysresccd /root % mount -t vfat /dev/sda1 /boot/efi
root@sysresccd /root % ls /boot/efi/*
boot
root@sysresccd /root % ls /boot/efi/* -R
/boot/efi/EFI:
boot

/boot/efi/EFI/boot:
bootx64.efi  icons  keys  refind.conf

/boot/efi/EFI/boot/icons:
arrow_left.icns      os_freebsd.icns    os_slackware.icns
arrow_right.icns     os_freedos.icns    os_suse.icns
boot_linux.icns      os_gentoo.icns     os_ubuntu.icns
boot_win.icns        os_gummiboot.icns  os_unknown.icns
func_about.icns      os_haiku.icns      os_win.icns
func_exit.icns       os_hwtest.icns     tool_apple_rescue.icns
func_reset.icns      os_legacy.icns     tool_mok_tool.icns
func_shutdown.icns   os_linux.icns      tool_part.icns
os_altlinux.icns     os_linuxmint.icns  tool_shell.icns
os_arch.icns         os_mac.icns        transparent.icns
os_centos.icns       os_mandriva.icns   vol_external.icns
os_debian.icns       os_netbsd.icns     vol_internal.icns
os_ecomstation.icns  os_openbsd.icns    vol_optical.icns
os_fatdog.icns       os_redhat.icns
os_fedora.icns       os_refit.icns

/boot/efi/EFI/boot/keys:
altlinux.cer  canonical-uefi-ca.der  fedora-ca.cer  refind.cer



Finally, becasu the rEFInd install.sh failed on efibootmgr I did this:

Code:


root@sysresccd /root % efibootmgr -v -c -d /dev/sda -l \\EFI\\boot\\bootx64.efi -L Linux
root@sysresccd /root %


After reboot the firmware only shows usb pendrives as EFI capable. No SATA, which is listed as a regular bios drive.
What else should I try? The interesting part is that ASUS firmware has a n"ez flash 2 utility" which lists attached drives as:
fs0:
fs1:
fs2:
fromwhich you can select your *.rom file. That tells me that the firmware as knowledge about my SATA because it can see this:

Code:
/boot/efi/EFI/boot:
bootx64.efi  icons  keys  refind.conf


The bootx64.efi file is not visible though to the flash utility.

Any hints? plesase?

Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Sun Apr 07, 2013 5:01 pm    Post subject: Reply with quote

Your problem is not with the disk hardware; if you can see the disk from an EFI shell, from rEFInd, from the firmware setup utility, or from any other EFI tool, then the hardware is fine. (If, OTOH, the disk didn't seem to exist in the EFI, then it could be an EFI driver issue. This might happen if the disk were connected to a plug-in SATA controller for which you had no EFI drivers.)

EFI maintains a list of boot options in NVRAM, and the efibootmgr utility manages that list. In EFI, most boot options are not whole-disk options, as they are in BIOS; rather, they're options to boot specific boot loader files, such as EFI\refind\refind_x64.efi on the ESP (identified by a long string of hexadecimal numbers). Your problem seems to be that rEFInd (installed on your SATA disk) isn't appearing in that list. You say that the rEFInd installation script failed, but you don't give precise details, so it's hard for me to say what happened there. It could be that you ran it in BIOS mode -- run that way, the efibootmgr utility is useless, so the install script tries to install using the default/fallback filename, which most EFIs try to boot if they find no other usable entries in NVRAM. If the efibootmgr command you quoted really returned immediately to another command prompt without displaying any output, then this seems likely; normally, it shows you the new boot loader configuration after each command.

Given your setup, I'd expect that you should be able to boot the way it's configured now, since you've given rEFInd the default/fallback filename; however, it's conceivable that you need to adjust something in your firmware settings to get it to enable EFI support or to disable BIOS/CSM/legacy support. Unfortunately, I can't be more precise because there's far too much variability among EFI implementations and their user interfaces. Some of them are very strange or unintuitive. It's also conceivable that your ESP is misconfigured. In gdisk, it should have a type code of EF00. It should officially have a FAT32 filesystem, although in some rare cases, FAT16 works better in practice.

Another thing you can try is this:


  1. Rename rEFInd back to its normal name: rename EFI/boot to EFI/refind and bootx64.efi to refind_x64.efi.
  2. Prepare a USB flash drive so that it boots into an EFI version 2 shell. (See here for some links.) You'll need to install it as EFI/BOOT/bootx64.efi on a FAT filesystem on the USB flash drive.
  3. Boot into the USB flash drive's version 2 shell.
  4. Use the built-in "bcfg" command to add rEFInd to the boot menu. This command is covered on the same page to which I've just linked. The command to add rEFInd would be something like 'bcfg boot add 3 fs0:\EFI\refind\refind_x64.efi "Gentoo Linux (rEFInd)"'. You may need to adjust the position number ("3") and filesystem number ("fs0:") for your system.
  5. Make rEFInd the default with "bcfg boot mv 3 0". Again, you may need to adjust the start number ("3").


In practice, bcfg is sometimes more reliable than efibootmgr, hence the suggestion to try using it.
Back to top
View user's profile Send private message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Mon Apr 08, 2013 12:55 am    Post subject: Reply with quote

Hi,
Thank you for your expert advice on my problem.
Booting the mobo (Asus F1A75-M Pro rev 1.02) from the rEFInd usb image goes fine and one can access the UEFI shell from the image. There is no bcfg command available on that image, though. So I do not know how to proceed from now on.
Interesting thing is that while booting with the image I can see a fallback boot option into my 499 MiB EFI partition :-) It allows to be booted and another refind screen show up.

However removing all usb media and just leaving the sata disk at boot time produces the usual legacy bios communique:

Code:
Insert boot media in selected boot device and press a key


My problem is probably that it will never be possible to start a sata disk in uefi mode on this mobo, only usb (or maybe dvd/cd - have not tried that one)

Look at this jpg file http://i.imgur.com/CgdVf.jpg. It is not my computer but the issue is the same: only usb and dvd media produce and UEFI prefix, not hdds. On my computer the HDD is represented with no UEFI prefix. If I could only reach the NVRAM and see how to manupulate it, perhaps it could be fix ... but with my skills it is rather a no go.

Thank you for any further input.
By the way. rEFind look awsome on the screen when booted from the usb image :-)

Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Mon Apr 08, 2013 4:32 pm    Post subject: Reply with quote

agrypa1 wrote:
Booting the mobo (Asus F1A75-M Pro rev 1.02) from the rEFInd usb image goes fine and one can access the UEFI shell from the image. There is no bcfg command available on that image, though.


Yes, that's why I specifically provided a link and instructions to help you set up a bootable USB flash drive with a version 2 shell. The version 1 shell included with rEFInd lacks this command. (Unfortunately, the version 2 shell doesn't work on many older boards, which is why I ship the rEFInd CD and USB images with a version 1 shell.)

Quote:
My problem is probably that it will never be possible to start a sata disk in uefi mode on this mobo,


That conclusion is defeatest, unjustified based on the facts presented, and just plain wrong! Something is misconfigured in your firmware and/or you need to add an EFI entry for the specific boot loader you want to boot, that's all.

Quote:
Look at this jpg file http://i.imgur.com/CgdVf.jpg. It is not my computer but the issue is the same: only usb and dvd media produce and UEFI prefix, not hdds.


You're laboring under the false assumption that hard disks are bootable. Under EFI, they aren't. Under EFI, files may be bootable. A user interface that shows a disk as being bootable in EFI mode is just using a sort of shorthand, revealing that the disk has a boot loader file that the firmware recognizes.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum