This post [1] saved me today. But it’s instructions are not so clear for a newbie like me. So I referred to a post [2] on superuser as well.
Here is my steps of doing this in case anyone need an example. I wanted to post it to the original post, but it’s closed.
These were used on openSUSE Tumbleweed snapshot 20170329.
Burn the Rescue CD [3] to a USB stick using ImageUSB [4].
Boot into system using the USB stick and login as root without password.
Create mount points.
# mkdir /mounts
# mkdir /mounts/root
Mount necessary devices and paths.
# mount /dev/nvme0n1p<root> /mounts/root
# mount /dev/nvme0n1p<efi> /mounts/root/boot/efi
# mount --bind /dev /mounts/root/dev
# mount -B /proc /mounts/root/proc
# mount -B /sys /mounts/root/sys
The unix shell will take the “<” and “>” is input and output redirection. And that would be a mess.
You probably did not intend that line to be taken literally. But you did not make clear what you intended.
And, for additional clarification:
Using “efibootmgr -c” add an entry to the firmware (BIOS) boot menu. It does not affect the grub boot menu. You do not need to go to a “chroot” session for that, as long as you provide paths relative to the system that you are using at the time you run the command (such as the rescue system). The man pages for “efibootmgr” explain it reasonably well. And there are good example that can be found with google searches.
If the goal is to update the grub2 menu, then you instead need the “grub2-mkconfig” command and that does need to be run within a “chroot” shell.
Thank you for your corrections. I should’ve asked here first to make my move. Obviously, your words could save me a lot of trial-and-error.
And my sincere apologies to those have been or will be misguided by my post. I should never post such a summary based on my limited experience.
I wish I could rectify the post so that it will not misguide anyone in the future. Could any moderator or administrator of this forum add a warning message on the title or some text at the foremost of the content? The message could be “The codes and procedure in this post are not safe to be followed directly. Please refer to the 2nd floor for explanation.”
In order to clarify the misleading information I provided in this post, I made this description based on the explanation on this page: https://en.opensuse.org/openSUSE:UEFI.
What I wanted to do was actually to re-register the boot information for my openSUSE install in /boot/efi into EFI boot manager as an entry. This entry disappeared after I reset the BIOS of my computer. But the boot information in /boot/efi is still there. So, what I need is to add an entry to EFI boot manager so that it can pass the boot procedure to the existing boot information. There is no need to perform operations described in the first post in this thread. An acceptable procedure is,
Boot the computer using Rescue CD.
Enter a terminal and execute the following command as root.
where /dev/nvme0nX is the disk number X that holding the partition for /boot/efi as “EFI System”; -p M indicates the partition holding /boot/efi as “EFI System” on disk /dev/nvme0nX and M is a number that should be replaced with a proper number based on actual case. Here, my disk is /dev/nvme0 numbered 1, and the EFI partition is on partition 1.
Also, change shim.efi to grubx64.efi if not using Secure Boot.
You use “/dev/nvme0nX” for the disk. Apparently that’s what an SSD (solid state disk) shows up as. A hard drive (spinning magnetic disk) will instead be something like “/dev/sda” or “/dev/sdb”.
This is intended as a clarification for people who do not have SSDs on their systems.
@nrickert Thanks for your clarification. I forgot to mention this difference between /dev/sda and /dev/nvme.
@ gogalthorp
AFAIK, disk connected to SCSI/SATA interface is identified as /dev/sda while disk connected to PCIe based NVMe interface is identified as /dev/nvme (or /dev/nvme*n*? I’m not sure about this). As an example, here is a explain to the convention from Dell community:
Naming conventions:
The below explains the naming convention of the device nodes
The number immediately after the string “nvme” is the device number
Example:
nvme0n1 – Here the device number is 0
Partitions are appended after the device name with the prefix ‘p’
One of the new drives on a card. Interesting. Might want to check on what kernel supports these new PCI drives. May require a driver or newer kernel. This hardware is relatively new. Might have better luck with tumbleweed it runs a much newer kernel
As stated on ArchWiki, “The Linux NVMe driver is natively included in the kernel since version 3.3.” So I guess there is no support issue.
But like any SSD drive, the NVMe SSD also has a limited write endurance of about 50-500TB varying on different types. It’s especially critical to NVMe SSD given that it has very high input/output speed (1-3GB/s). It could be wore out shortly if the user use it excessively.