Unable to boot without usb stick

I have a dell inspiron 15 3000.
After searching everywhere i tried yast2- Boot Loader changed to grub2 for efi and I got : /usr/sbin/grub2-install: error:cannot find EFI directory

fdisk -l

/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 1067007 16384 8M BIOS boot
/dev/nvme0n1p3 1067008 84953087 83886080 40G Linux filesystem
/dev/nvme0n1p4 84953088 486940671 401987584 191.7G Linux filesystem
/dev/nvme0n1p5 486940672 500118158 13177487 6.3G Linux swap

gdisk

GPT fdisk (gdisk) version 1.0.1

efibootmgr -v

EFI variables are not supported on this system

Secure boot is disable

I m loss and I couldn’t find any solution , please help, thanks in advance

Le 22/05/2019 à 19:46, limonnana a écrit :
>
> I have a dell inspiron 15 3000.
> After searching everywhere i tried yast2- Boot Loader changed to grub2
> for efi and I got : /usr/sbin/grub2-install: error:cannot find EFI
> directory
>
> fdisk -l
>
> /dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
> /dev/nvme0n1p2 1050624 1067007 16384 8M BIOS boot
> /dev/nvme0n1p3 1067008 84953087 83886080 40G Linux filesystem
> /dev/nvme0n1p4 84953088 486940671 401987584 191.7G Linux filesystem
> /dev/nvme0n1p5 486940672 500118158 13177487 6.3G Linux swap
>
>
>
> I m loss and I couldn’t find any solution , please help, thanks in
> advance
>
>
is the efi partition mounted?

jdd

To sort this out we may ultimately need you to post output from these:

cat /etc/fstab
blkid

Please wrap commands and their ouput in code tags. Select output to wrap, then click the # ] button above the input window.

To get output of current state from gdisk requires -l switch and device name, e.g. ‘gdisk -l /dev/sda’.

The df command would satisfy jdd’s request.

How and when was 15.0 installed? IOW, is it recent or brand new? Was installation from the stick you are booting from now? What does the screen look like when you boot the stick and choose installation instead of installed system? Is there a row of 5-6 function keys and what they do at the bottom of the screen? If so, it is booting in legacy mode, not UEFI.

df

Filesystem     1K-blocks    Used Available Use% Mounted on
devtmpfs         3282256       0   3282256   0% /dev
tmpfs            3293852    2860   3290992   1% /dev/shm
tmpfs            3293852    9952   3283900   1% /run
tmpfs            3293852       0   3293852   0% /sys/fs/cgroup
/dev/nvme0n1p3  41943040 9967684  31774636  24% /
/dev/nvme0n1p4 200895652 1151800 199743852   1% /home
/dev/nvme0n1p3  41943040 9967684  31774636  24% /srv
/dev/nvme0n1p3  41943040 9967684  31774636  24% /boot/grub2/i386-pc
/dev/nvme0n1p3  41943040 9967684  31774636  24% /boot/grub2/x86_64-efi
/dev/nvme0n1p3  41943040 9967684  31774636  24% /.snapshots
/dev/nvme0n1p3  41943040 9967684  31774636  24% /var
/dev/nvme0n1p3  41943040 9967684  31774636  24% /usr/local
/dev/nvme0n1p3  41943040 9967684  31774636  24% /opt
/dev/nvme0n1p3  41943040 9967684  31774636  24% /root
/dev/nvme0n1p3  41943040 9967684  31774636  24% /tmp
tmpfs             658768      16    658752   1% /run/user/1000



cat /etc/fstab

UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /                       btrfs  defaults                      0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /var                    btrfs  subvol=/@/var                 0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /tmp                    btrfs  subvol=/@/tmp                 0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /root                   btrfs  subvol=/@/root                0  0
UUID=7c510b14-9472-4b51-bd27-86c2ac474779  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=302b7fec-6e5f-47a9-ba58-fb89d73fbd06  /home                   xfs    defaults                      0  0
UUID=18181192-053e-42cb-885e-c2aa3e98c5aa  swap                    swap   defaults                      0  0




blkid

/dev/nvme0n1: PTUUID="0c12b7a7-e66d-47e6-92ea-3a9611ce1f19" PTTYPE="gpt"
/dev/nvme0n1p1: UUID="276C-D28C" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="baecc7d0-81ca-466d-b736-07212712ce34"
/dev/nvme0n1p2: PARTUUID="7befa8c7-c5c0-4681-80e3-af719f4ef0ea"
/dev/nvme0n1p3: UUID="7c510b14-9472-4b51-bd27-86c2ac474779" UUID_SUB="28754272-fce2-43ee-9d5b-698341174231" TYPE="btrfs" PARTUUID="de4ed63e-d432-45ef-8053-f797
8074e646"
/dev/nvme0n1p4: UUID="302b7fec-6e5f-47a9-ba58-fb89d73fbd06" TYPE="xfs" PARTUUID="c71d934f-402a-45a7-b429-21f7bb091aad"
/dev/nvme0n1p5: UUID="18181192-053e-42cb-885e-c2aa3e98c5aa" TYPE="swap" PARTUUID="a38aab1a-f8aa-4932-ae6b-8f13299bc66e"


sudo gdisk -l /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.1

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

Found valid GPT with protective MBR; using GPT.
Disk /dev/nvme0n1: 500118192 sectors, 238.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0C12B7A7-E66D-47E6-92EA-3A9611CE1F19
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 500118158
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         1050623   512.0 MiB   EF00  EFI System Partition
   2         1050624         1067007   8.0 MiB     EF02   
   3         1067008        84953087   40.0 GiB    8300   
   4        84953088       486940671   191.7 GiB   8300   
   5       486940672       500118158   6.3 GiB     8200  


How and when was 15.0 installed? from usb stick 2 days ago

IOW, is it recent or brand new? what is iow ? the computer is new came with ubuntu preinstalled

Was installation from the stick you are booting from now? 2 days ago

What does the screen look like when you boot the stick and choose installation instead of installed system? Is there a row of 5-6 function keys

No

Thank you for your support

I’m not sure how this happened.

It looks as if you installed your system for traditional BIOS booting. But your system only boots with EFI. And that’s why it won’t boot without the install USB.

You can change your system to use UEFI booting, but that is tricky and depends on the BIOS as to how well it will work.

If you want to use UEFI booting, then you need to mount the EFI partition at “/boot/efi”. So start by doing that.

Maybe try adding the following line to “/etc/fstab”:


UUID=276C-D28C             /boot/efi  vfat  iocharset=utf8    0   0

I copied that from my Leap 15.0 system, except that I changed the UUID to match what you show in output above. The exact position of the line should not matter. On my system, it is just before the line for “swap”.

When you have made that change, reboot. And then provide the output of

df

from after that reboot.

This is a puzzle that I’m not sure how to suggest you deal with.

[ol]
[li] Your NVME is GPT partitioned for both UEFI and Legacy booting (nvme0n1p1 is ESP; nvme0n1p2 is BIOS boot for standard Grub to use)[/li][li] Leap is installed in Legacy mode (ESP partition is missing from fstab and df output)[/li][li] The stick booted to installation selection is in UEFI mode (no Function keys “menu” at bottom of first screen)[/li][/ol]

I’m guessing:[ol]
[li] Leap was installed by booting the stick in legacy mode, leaving Ubuntu’s existing ESP partition untouched, while creating 4 partitions for Leap to use[/li][li] Given it came with Ubuntu and an ESP partition, Leap should be able to be reconfigured as a UEFI installation:[/li][list=a]
[li] change fstab via YaST partitioner to include the ESP partition[/li][li] use YaST bootloader to switch Grub booting to UEFI mode[/li][/ol]
[li] Reboot without using USB stick[/li][/list]

#2 #2 seems to me to be partially consistent with NRickert’s recommendation in post #5, but through a different path, and with more steps.

You cannot switch to “booting in UEFI mode” while booted in legacy mode. It is impossible to write NVRAM boot entry. It is possible to run “grub2-install --no-nvram” to avoid error, manually select grubx64.efi on ESP and complete switch after openSUSE is booted by reinstalling bootloader again.

He booted the stick to UEFI mode installation. Can’t the stick be booted in UEFI to chroot to or boot installed system in UEFI mode? It’s what I thought was implied both possible and necessary by writing what I wrote.

https://drive.google.com/file/d/1aakd0Mei2n4K48yVAKD4fgC6mH3AKJa5/view?usp=sharing
Is this helping ?

https://drive.google.com/file/d/1aakd0Mei2n4K48yVAKD4fgC6mH3AKJa5/view?usp=sharing

https://drive.google.com/file/d/11mqc9-ddpQQTvGy96KDxKBRRkJS77gq4/view?usp=sharing

I m planing to do a new installation but I don’t want to have the same results.

I think will be the easier way ? may be trying tumbleweed instead, what do you suggest ?

Thanks

Really? It is not what original post says.

It’s what post #4 says:

[quote]What does the screen look like when you boot the stick and choose installation instead of installed system? Is there a row of 5-6 function keys
No[/quote]

Ok I m gonna try a little more, I did mount with:



sudo mount /dev/nvme0n1p1 /boot/efi


and



df

Filesystem     1K-blocks     Used Available Use% Mounted on
devtmpfs         3282256        0   3282256   0% /dev
tmpfs            3293852     2880   3290972   1% /dev/shm
tmpfs            3293852     9996   3283856   1% /run
tmpfs            3293852        0   3293852   0% /sys/fs/cgroup
/dev/nvme0n1p3  41943040 11590244  30263660  28% /
/dev/nvme0n1p1    523248     7716    515532   2% /boot/efi
/dev/nvme0n1p4 200895652 10059176 190836476   6% /home
/dev/nvme0n1p3  41943040 11590244  30263660  28% /tmp
/dev/nvme0n1p3  41943040 11590244  30263660  28% /var
/dev/nvme0n1p3  41943040 11590244  30263660  28% /srv
/dev/nvme0n1p3  41943040 11590244  30263660  28% /opt
/dev/nvme0n1p3  41943040 11590244  30263660  28% /boot/grub2/i386-pc
/dev/nvme0n1p3  41943040 11590244  30263660  28% /boot/grub2/x86_64-efi
/dev/nvme0n1p3  41943040 11590244  30263660  28% /usr/local
/dev/nvme0n1p3  41943040 11590244  30263660  28% /.snapshots
/dev/nvme0n1p3  41943040 11590244  30263660  28% /root
tmpfs             658768        8    658760   1% /run/user/1000


also I added

UUID=276C-D28C /boot/efi vfat iocharset=utf8 0 0

Yes, that will be the easiest way. Rather than Tumbleweed, I would suggest Leap 15.1 (just released yesterday, and seems to be working very well).

To avoid the same problem, be careful about how you boot the install media.

This is what the installer boot screen should look like:
https://nwrickert2.files.wordpress.com/2019/05/screenshot_leap151_2019-05-17_185613.png

Notice at the bottom, there a message for “C: Command line”. That what you will see if you boot the installer with UEFI booting.

And, for completeness, here is the installer boot screen if you accidentally boot it for legacy BIOS booting
https://nwrickert2.files.wordpress.com/2019/05/screenshot_legacy_2019-05-17_185323.png

Notice the function key notations. If you see the legacy boot screen, you are doing it wrong. So go back and try again to get the UEFI boot screen.

My experience with a Dell computer, is that you can hit F12 during boot, and get a boot menu. There you can select booting your USB. And it might give you two boot options (UEFI and CSM booting). Be sure to choose the UEFI booting).

By the way, those images are from a blog post that I recently made (about installing Leap 15.1).

Hi all
I think we still lack a bit of information.

Hey limonnana](https://forums.opensuse.org/member.php/110526-limonnana), did you boot the system from the stick, or what exactly did you do in order to boot?

Then

What did you search for, and why?
Look, my son once fiddled with YaST2-Boot Loader on his UEFI laptop and made it unbootable from the internal hard disk.
So, why did you try to change the boot loader to grub2-efi?
What did happen before that?

From the second photo of your BIOS setup it seems to me that the USB stick can boot in UEFI mode:

My guess is that the “SanDisk” entries there correspond to USB sticks, right?

But perhaps you should uncheck/disable “USB storage device” in the first photo/page, in order to make sure that the stick is not booted in ***legacy ***mode.

Further, what does not appear to be logical to me is that in the second of these photos, “ubuntu” is checked/enabled (in non-UEFI mode?), while your 256GB Toshiba drive in UEFI mode is unchecked/disabled.
Can you try and disable “ubuntu” and enable your 256GB Toshiba drive in UEFI mode on that setup page?
What happens then at boot?

Did you remove ubuntu, and if yes, how?

Finally, it would be helpful if you could post the complete output of

sudo parted -l

so that one could see the flags of the partitions.

Good luck!

sudo parted -l
[sudo] password for root:  
Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sda: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:  

Number  Start   End     Size    Type     File system  Flags
 1      1335kB  5335kB  4000kB  primary               esp, type=ef
 2      5335kB  3917MB  3912MB  primary               boot, hidden, type=17


Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:  

Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  538MB   537MB   fat32           EFI System Partition  boot, esp
 2      538MB   546MB   8389kB                                        bios_grub
 3      546MB   43.5GB  42.9GB  btrfs                                 legacy_boot
 4      43.5GB  249GB   206GB   xfs
 5      249GB   256GB   6747MB  linux-swap(v1)                        swap



Except for the extra partition with the ‘bios_grub’ flag, this listing of parted looks like the setup and flags on the UEFI booting laptop here, which has openSUSE 15.0 installed and running. The ‘legacy_boot’ flag on the root partition doesn’t seem to say much about the boot method, strange enough.

Did you try to enable your Toshiba 256GB disk for UEFI booting (while probably disabling that “ubuntu” entry) ?
See the photos of your BIOS setup that you posted links of.

Ok I finally reinstall : leap 15.1 Thanks to your help guys I understood that the problem was that my installation was not in uefi. When I loaded up the stick for the new installation I recognize because the 2 last pictures that it was loaded in not uefi so went back and selected a different option and this time because of your 2 picture shared I saw it was loaded in uefi and everything is ok now thank you very very much

I’m glad everything is now working.

The situation with UEFI is still somewhat confusing. And different computer manufacturers manage to make it even more complicated. That’s why I provided those images.