Results 1 to 4 of 4

Thread: error: cannot find commands 'linuxefi' or 'initrdefi'

  1. #1

    Default error: cannot find commands 'linuxefi' or 'initrdefi'

    I get those errors trying to boot openSUSE. They show up after it tries to load the linux 3.11.6-4 desktop and the initial ramdisk respectively.

    My problem is long, and the issues before this are all listed http://redd.it/2gtgxf there. I haven't updated it since my last install attempt. Basically all the same, but I put the 200MB boot partition set as bios grub (iirc, may have been efi boot) and mounted it on /boot/efi. The installer had me install grub2-efi, and I'm pretty sure I checked support secure boot.

    I ran both fdisk -l and parted -l on my /dev/sda, and the results are:
    fdisk -l:
    Code:
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
    
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk label type: gpt
     
     
    #         Start          End    Size  Type            Name
     1         2048       401407    195M  BIOS boot parti primary
     2       401408     33961983     16G  Microsoft basic primary
     3     33961984    453386239    200G  Microsoft basic primary
     4    453386240   3907028991    1.6T  Microsoft basic primary
    parted -l:
    Code:
                     
    Model: ATA ST2000DM001-9YN1 (scsi)
    Disk /dev/sda: 2000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt_sync_mbr
    
    Number  Start   End     Size    File system     Name     Flags
     1      1049kB  206MB   204MB   fat16           primary  bios_grub, legacy_boot
     2      206MB   17.4GB  17.2GB  linux-swap(v1)  primary
     3      17.4GB  232GB   215GB   ext4            primary
     4      232GB   2000GB  1768GB  ext4            primary
    Now I can FINALLY boot my HDD after all this trouble. I'm so close I can almost taste it. But I'm getting this error when booting into openSUSE:
    Code:
    Loading Linux 3.11.6-4-desktop ...
    error: can't find command 'linuxefi'.
    Loading initial ramdisk ...
    error: can't find command 'initrdefi'.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,170
    Blog Entries
    3

    Default Re: error: cannot find commands 'linuxefi' or 'initrdefi'

    I'm not sure what you have done here.

    You seem to have a "grub.cfg" that is intended to be used by grub2-efi, but you appear to instead be booting with plain grub2.

    If you want a "quick fix", you can try locating "grub.cfg" (should be in "/boot/grub2"), and edit it. Change "linuxefi" to "linux" everywhere, and change "initrdefi" to "initrd" everywhere. Then perhaps plain grub2 can boot it.

    Looking at your partitioning, I can see that you are confused. That's understandable, as UEFI can be confusing.

    Here's some "fdisk" output from my UEFI system. This is with the version of "fdisk" from factory:

    Code:
    # fdisk -l /dev/sdb
    
    Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: 684408B5-6977-4175-A06C-5A6CED930275
    
    Device         Start       End   Sectors  Size Type
    /dev/sdb1       2048   1026047   1024000  500M EFI System
    /dev/sdb2    1026048   2050047   1024000  500M Linux filesystem
    /dev/sdb3    2050048 232736767 230686720  110G Linux LVM
    /dev/sdb4  232736768 274679807  41943040   20G Linux filesystem
    /dev/sdb5  274679808 295651327  20971520   10G Linux swap
    /dev/sdb6  295651328 316622847  20971520   10G Linux filesystem
    And here's corresponding "parted" output:

    Code:
    # parted /dev/sdb print
    Model: ATA ST1000DM003-9YN1 (scsi)
    Disk /dev/sdb: 1000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start   End     Size    File system  Name              Flags
     1      1049kB  525MB   524MB   fat16        EFI System        boot
     2      525MB   1050MB  524MB   ext2         Linux filesystem
     3      1050MB  119GB   118GB                Linux LVM         lvm
     4      119GB   141GB   21.5GB  ext4         Linux filesystem
     5      141GB   151GB   10.7GB               Linux swap
     6      151GB   162GB   10.7GB               Linux filesystem
    The differences to note:

    (a) I have an EFI partition. You don't appear to have one. Your partition 1 is flagged as a BIOS boot partition, rather than as an EFI partition.

    (b) I do not have a BIOS Boot partition. You do appear to have one.

    Booting with UEFI needs an EFI partition, but it does not need a BIOS boot partition. Traditional MBR style booting on a GPT disk uses plain "grub2" and does need a BIOS boot partition (which normally won't use FAT).

    I'm not sure what to suggest. One possibility would be to delete all partitions and start over.

    --------

    Notes on "linuxefi" and "initrdefi".

    If you are not using secure-boot, you can continue to use "linux" and "initrd". If you want secure-boot, you must use "linuxefi" and "initrdefi". You cannot mix and match. That is, you cannot use "linuxefi" without "initrdefi" and if you instead use "linux", you must also use plain "initrd". What goes into the automatically generated "grub.cfg" depends on whether "/etc/default/grub" contains the line "GRUB_USE_LINUXEFI=true".

    Using "linuxefi" loads the kernel into memory in a different way (calls it at a special EFI entry point).

    I hope this gives you some pointers as to what went wrong. Feel free to ask additional questions if I have not been clear enough.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3

    Default Re: error: cannot find commands 'linuxefi' or 'initrdefi'

    Quote Originally Posted by nrickert View Post

    (a) I have an EFI partition. You don't appear to have one. Your partition 1 is flagged as a BIOS boot partition, rather than as an EFI partition.
    Reinstalled, did a FAT system on /boot/efi. Installed grub2 on it. It was so simple... I feel silly now. I thought I had done that...

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,580

    Default Re: error: cannot find commands 'linuxefi' or 'initrdefi'

    Should be default if you boot the media in EFI mode not legacy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •