maas deploy uefi centos7, cant find /efi/ubuntu/grubx64.efi

Bug #1779239 reported by yinxingpan
This bug report is a duplicate of:  Bug #1740925: centos cannot boot UEFI. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
New
Undecided
Unassigned
curtin
Invalid
Undecided
Unassigned
maas-images
Invalid
Undecided
Unassigned

Bug Description

2.4.0~beta2、ubuntu18.04, HP, Dell, all i have machine, can not deploy uefi centos7, windows.

centos7, got this error:
no such device: /efi/ubuntu/grubx64.efi.
error: File not found
next is my curtin conf. and my log file.

Machine-readable output follows:
cloudconfig:
  maas-cloud-config:
    content: "#cloud-config\ndatasource:\n MAAS: {consumer_key: VpaNza7FBgCEAYXu2f,\
      \ metadata_url: 'http://192.168.3.8:5240/MAAS/metadata/',\n token_key: 7qWYWreer8YkraXKhw,\
      \ token_secret: unyV8q9uLGVRQydcLKdveB6EHk5UucP6}\n"
    path: /etc/cloud/cloud.cfg.d/90_maas_cloud_config.cfg
  maas-datasource:
    content: 'datasource_list: [ MAAS ]'
    path: /etc/cloud/cloud.cfg.d/90_maas_datasource.cfg
  maas-reporting:
    content: "#cloud-config\nreporting:\n maas: {consumer_key: VpaNza7FBgCEAYXu2f,\
      \ endpoint: 'http://192.168.3.8:5240/MAAS/metadata/status/xa34gx',\n token_key:\
      \ 7qWYWreer8YkraXKhw, token_secret: unyV8q9uLGVRQydcLKdveB6EHk5UucP6,\n type:\
      \ webhook}\n"
    path: /etc/cloud/cloud.cfg.d/90_maas_cloud_init_reporting.cfg
  maas-ubuntu-sso:
    content: '#cloud-config

      snappy: {email: root@maas}

      '
    path: /etc/cloud/cloud.cfg.d/90_maas_ubuntu_sso.cfg
debconf_selections:
  grub2: grub2 grub2/update_nvram boolean false
  maas: 'cloud-init cloud-init/datasources multiselect MAAS

    cloud-init cloud-init/maas-metadata-url string http://192.168.3.8:5240/MAAS/metadata/

    cloud-init cloud-init/maas-metadata-credentials string oauth_consumer_key=VpaNza7FBgCEAYXu2f&oauth_token_key=7qWYWreer8YkraXKhw&oauth_token_secret=unyV8q9uLGVRQydcLKdveB6EHk5UucP6

    cloud-init cloud-init/local-cloud-config string apt:\n preserve_sources_list:
    false\n primary:\n - arches: [default]\n uri: http://192.168.3.182/ubuntu/archive.ubuntu.com/ubuntu/\n proxy:
    http://192.168.3.8:8000/\n security:\n - arches: [default]\n uri: http://192.168.3.182/ubuntu/archive.ubuntu.com/ubuntu/\napt_preserve_sources_list:
    true\napt_proxy: http://192.168.3.8:8000/\nmanage_etc_hosts: false\nmanual_cache_clean:
    true\nreporting:\n maas: {consumer_key: VpaNza7FBgCEAYXu2f, endpoint: ''http://192.168.3.8:5240/MAAS/metadata/status/xa34gx'',\n token_key:
    7qWYWreer8YkraXKhw, token_secret: unyV8q9uLGVRQydcLKdveB6EHk5UucP6,\n type:
    webhook}\nsystem_info:\n package_mirrors:\n - arches: [i386, amd64]\n failsafe:
    {primary: ''http://archive.ubuntu.com/ubuntu'', security: ''http://security.ubuntu.com/ubuntu''}\n search:\n primary:
    [''http://192.168.3.182/ubuntu/archive.ubuntu.com/ubuntu/'']\n security:
    [''http://192.168.3.182/ubuntu/archive.ubuntu.com/ubuntu/'']\n - arches: [default]\n failsafe:
    {primary: ''http://ports.ubuntu.com/ubuntu-ports'', security: ''http://ports.ubuntu.com/ubuntu-ports''}\n search:\n primary:
    [''http://ports.ubuntu.com/ubuntu-ports'']\n security: [''http://ports.ubuntu.com/ubuntu-ports'']\n

    '
install:
  log_file: /tmp/install.log
  post_files:
  - /tmp/install.log
late_commands:
  maas:
  - wget
  - --no-proxy
  - http://192.168.3.8:5240/MAAS/metadata/latest/by-id/xa34gx/
  - --post-data
  - op=netboot_off
  - -O
  - /dev/null
network:
  config:
  - id: eno1
    mac_address: ec:eb:b8:97:65:20
    mtu: 1500
    name: eno1
    subnets:
    - address: 192.168.3.253/24
      gateway: 192.168.3.1
      type: static
    type: physical
  - id: eno2
    mac_address: ec:eb:b8:97:65:21
    mtu: 1500
    name: eno2
    subnets:
    - type: manual
    type: physical
  - id: eno3
    mac_address: ec:eb:b8:97:65:22
    mtu: 1500
    name: eno3
    subnets:
    - type: manual
    type: physical
  - id: eno4
    mac_address: ec:eb:b8:97:65:23
    mtu: 1500
    name: eno4
    subnets:
    - type: manual
    type: physical
  - address:
    - 192.168.3.8
    search:
    - maas
    - leaptocloud
    - lxk-cloud
    - sky
    type: nameserver
  version: 1
network_commands:
  builtin:
  - curtin
  - net-meta
  - custom
reporting:
  maas:
    consumer_key: VpaNza7FBgCEAYXu2f
    endpoint: http://192.168.3.8:5240/MAAS/metadata/status/xa34gx
    token_key: 7qWYWreer8YkraXKhw
    token_secret: unyV8q9uLGVRQydcLKdveB6EHk5UucP6
    type: webhook

420864K ........ ........ .... 100% 52.0M=11s

2018-06-28 14:47:30 (38.6 MB/s) - written to stdout [432307547/432307547]

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-3.10.0-693.17.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-693.17.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-0-rescue-185108680b7f9aa0ee36dc54acc3127c

Found initrd image: /boot/initramfs-0-rescue-185108680b7f9aa0ee36dc54acc3127c.img

done

Installing for x86_64-efi platform.

Installation finished. No error reported.

BootCurrent: 000B

Timeout: 0 seconds

BootOrder: 000B,000D,0004,0000,0003,0002,0001,0005,0006,0007,0008,0009

Boot0000 Embedded UEFI Shell

Boot0001 Diagnose Error

Boot0002 System Utilities

Boot0003 Intelligent Provisioning

Boot0004 Boot Menu

Boot0005 Network Boot

Boot0006 Embedded Diagnostics

Boot0007 View Integrated Management Log

Boot0008* Generic USB Boot

Boot0009* Embedded RAID 1 : Smart Array P440ar Controller - 1862.99 GiB, RAID 1 Logical Drive(Target:0, Lun:0)

Boot000A* iLO Virtual USB 2 : HPE iLO Virtual USB CD/DVD ROM

Boot000B* Embedded LOM 1 Port 1 : HPE Ethernet 1Gb 4-port 331i Adapter - NIC (PXE IPv4)

Boot000C* iLO Virtual USB 2 : HPE iLO Virtual USB CD/DVD ROM

Boot000D* centos

--2018-06-28 14:47:35-- http://192.168.3.8:5240/MAAS/metadata/latest/by-id/xa34gx/

Connecting to 192.168.3.8:5240... connected.

HTTP request sent, awaiting response... 200 OK

Length: 2 [text/plain]

Saving to: ‘/dev/null’

     0K 100% 268K=0s

2018-06-28 14:47:35 (268 KB/s) - ‘/dev/null’ saved [2/2]

curtin: Installation finished.

Tags: uefi
Revision history for this message
yinxingpan (yinxingpan) wrote :
Revision history for this message
yinxingpan (yinxingpan) wrote :

i try the HP, DELL, and huawei server , they all got this error,

Revision history for this message
yinxingpan (yinxingpan) wrote :

huawei service RH1288v3, new server ,

please check the log file.

Revision history for this message
Ryan Harper (raharper) wrote :

Hi,

Looking at the log file, it appears you;ve uploaded custom images, both windows[1] and rhel7[2]. For custom images, the image creator needs to embed curtin-hooks[3] within the image which handle reading environment variables to configure networking and making the image bootable.

1. http://192.168.3.8:5248/images/custom/amd64/generic/uefi_windows2012/uploaded/root-dd
2. http://192.168.3.8:5248/images/rhel/amd64/generic/rhel7/uploaded/root-tgz
3. http://curtin.readthedocs.io/en/latest/topics/curthooks.html

Changed in curtin:
status: New → Incomplete
Revision history for this message
yinxingpan (yinxingpan) wrote :

yel, i uploaded custom images, because i want to test maas.

but this error is not in the rhel or windows deployment.

i deployed centos7 (not custom image) in maas, in the legacy boot type, everything is ok, machine can boot, but when i change the uefi, the centos7 can not boot, and show this error.

Changed in curtin:
status: Incomplete → New
Revision history for this message
yinxingpan (yinxingpan) wrote :
Download full text (13.9 KiB)

curtin: Installation started. (18.1-5-g572ae5d6-0ubuntu1)

Creating new GPT entries.

The operation has completed successfully.

mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows

mkfs.fat 4.1 (2017-01-24)

--2018-06-30 10:51:22-- http://192.168.3.8:5248/images/centos/amd64/generic/centos70/daily/root-tgz

Connecting to 192.168.3.8:5248... connected.

HTTP request sent, awaiting response... 200 OK

Length: 487002044 (464M) [text/html]

Saving to: ‘STDOUT’

     0K ........ ........ ........ ........ ........ ........ 0% 18.6M 25s

  3072K ........ ........ ........ ........ ........ ........ 1% 42.6M 18s

  6144K ........ ........ ........ ........ ........ ........ 1% 24.9M 18s

  9216K ........ ........ ........ ........ ........ ........ 2% 23.4M 18s

 12288K ........ ........ ........ ........ ........ ........ 3% 27.3M 18s

 15360K ........ ........ ........ ........ ........ ........ 3% 26.5M 17s

 18432K ........ ........ ........ ........ ........ ........ 4% 26.8M 17s

 21504K ........ ........ ........ ........ ........ ........ 5% 26.5M 17s

 24576K ........ ........ ........ ........ ........ ........ 5% 39.5M 16s

 27648K ........ ........ ........ ........ ........ ........ 6% 37.0M 16s

 30720K ........ ........ ........ ........ ........ ........ 7% 38.7M 15s

 33792K ........ ........ ........ ........ ........ ........ 7% 36.9M 15s

 36864K ........ ........ ........ ........ ........ ........ 8% 38.8M 14s

 39936K ........ ........ ........ ........ ........ ........ 9% 35.9M 14s

 43008K ........ ........ ........ ........ ........ ........ 9% 35.9M 14s

 46080K ........ ........ ........ ........ ........ ........ 10% 36.3M 14s

 49152K ........ ........ ........ ........ ........ ........ 10% 36.9M 13s

 52224K ........ ........ ........ ........ ........ ........ 11% 36.3M 13s

 55296K ........ ........ ........ ........ ........ ........ 12% 36.9M 13s

 58368K ........ ........ ........ ........ ........ ........ 12% 38.7M 13s

 61440K ........ ........ ........ ........ ........ ........ 13% 40.7M 13s

 64512K ........ ........ ........ ........ ........ ........ 14% 34.6M 12s

 67584K ........ ........ ........ ........ ........ ........ 14% 32.7M 12s

 70656K ........ ........ ........ ........ ........ ........ 15% 39.8M 12s

 73728K ........ ........ ........ ........ ........ ........ 16% 36.6M 12s

 76800K ........ ........ ........ ........ ........ ........ 16% 28.0M 12s

 79872K ........ ........ ........ ........ ........ ........ 17% 44.9M 12s

 82944K ........ ........ ........ ........ ........ ........ 18% 43.0M 12s

 86016K ........ ........ ........ ........ ........ ........ 18% 68.2M 11s

 89088K ........ ........ ........ ........ ........ ........ 19% 71.6M 11s

 92160K ........ ........ ........ ........ ........ ........ 20% 56.8M 11s

 95232K ........ ........ ........ ........ ........ ........ 20% 47.0M 11s

 98304K ........ ........ ........ ........ ........ ........ 21% 62.5M 10s

101376K ........ ........ ........ ........ ........ ........ 21% 46.7M 10s

104448K ........ ........ ........ ........ ........ ........ 22% 47.1M 10s

107520K ......

Revision history for this message
yinxingpan (yinxingpan) wrote :

maas 2.4.0 beta2, deploy centos7 in uefi.

it was got this error:
    error: no such device : /efi/ubuntu/grubx64.efi

    error: File not found

Hardware information
System vendor: HP
System product: ProLiant DL360 Gen9 (844987-AA5)
System version: Unknown
System serial: CN7814006Q
Mainboard vendor: HP
Mainboard product: ProLiant DL360 Gen9
Mainboard firmware version: P89
Mainboard firmware date: 01/22/2018
CPU model: Intel(R) Xeon(R) CPU E5-2620 v4

when everything download, machine begun boot, this error came out.

and i change the "ubuntu" -> "centos", system booting.

Revision history for this message
Ryan Harper (raharper) wrote :

OK. it sounds like the current centos7 image in the maas repo is not working in UEFI mode, so let's open an issue against the image.

Changed in curtin:
status: New → Incomplete
Revision history for this message
Ryan Harper (raharper) wrote :

One last comment, when you switch between UEFI mode and legacy mode on the node, I believe you need to recommission the node in MAAS so it knows whether the machine is booting in UEFI or legacy mode.

Revision history for this message
yinxingpan (yinxingpan) wrote :

ok, i try it again.

Revision history for this message
yinxingpan (yinxingpan) wrote :

i try it again, and the error is still there.

i believe this error came from curtin command grub-install or something.

because when i changed the grub menu

press "e", change "/efi/ubuntu/grubx64.efi" -> "/efi/centos/grubx64.efi"

it boot successfully.

it means that the maas know it is booting in UEFI, is there any possible that curtin does not change the booting config in centos7 uefi.

Revision history for this message
yinxingpan (yinxingpan) wrote :

hi,maybe this is not the centos7 image error,

today, i try to deploy windows server r12 in UEFI model,

error came out again.

    error: no such device : /efi/ubuntu/grubx64.efi

    error: File not found

then i changed "/efi/ubuntu/grubx64.efi" -> "/efi/Microsoft/Boot/bootmgfw.efi"
it boots successfully.

Changed in curtin:
status: Incomplete → New
Revision history for this message
yinxingpan (yinxingpan) wrote :

i checkout the maas-4.2.0 beta2 , and i foud the bug.

in the maasserver/rpc/boot.py

        if purpose == 'local':
            return {
                "system_id": machine.system_id,
                "arch": arch,
                "subarch": subarch,
                "osystem": '',
                "release": '',
                "kernel": '',
                "initrd": '',
                "boot_dtb": '',
                "purpose": purpose,
                "hostname": hostname,
                "domain": domain,
                "preseed_url": preseed_url,
                "fs_host": local_ip,
                "log_host": server_host,
                "extra_opts": '',
                "http_boot": True,
            }

'osystem' is missing 'machine.osystem',

and in the provisioningserver/templates/uefi/config.local.amd64.template
there is a big difference in the new version.

so i change the provisioningserver/templates/uefi/config.local.amd64.template, everything is ok.

so it was maas 2.4.0 beta2 bug.

Changed in curtin:
status: New → Incomplete
Changed in maas-images:
status: New → Incomplete
Revision history for this message
Ryan Harper (raharper) wrote :

Marking invalid for curtin (and maas-images), looks to be an issue in maas provisioning templates, see comment #13

Changed in maas-images:
status: Incomplete → Invalid
Changed in curtin:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.